Skip to content
This repository was archived by the owner on Dec 21, 2023. It is now read-only.
This repository was archived by the owner on Dec 21, 2023. It is now read-only.

Implement looping-mechanism via shipyard-controller #3683

@johannes-b

Description

@johannes-b

Use-case: A remediation config can contains multiple actions that wait to get executed as response to an open problem, e.g.:
remediation.yaml:

apiVersion: spec.keptn.sh/0.1.4
kind: Remediation
metadata:
  name: carts-remediation
spec:
  remediations:
    - problemType: Response time degradation
      actionsOnOpen:
        - action: scaling
          name: scaling
          description: Scale up
          value: "1"
        - action: toggle-feature
          name: Toogle feature flag
          description: Toogle feature flag EnablePromotion to OFF
          value: 
            EnablePromotion: "off"

A remediation sequence will execute just one action:

- name: "production" 
  sequences: 
  - name: remediation
      tasks:
      - name: get-action                           < get action - "scaling"
      - name: action                                 < execute action - "scaling"
      - name: evaluation

To achieve a looping mechanism, the remediation sequence should get re-triggered when the evaluation task failed.

Proposal:

  • Advance the trigger filters to consider the result of an individual task:
- name: "production" 
  sequences: 
  - name: remediation
      triggeredOn: 
      - event: production.remediation.finished
          selector:
            match:
              evaluation.result: fail                             < see here
      tasks:
      - name: get-action 
      - name: action
      - name: evaluation 

Tasks:

Definition of Done:

  • When I have multiple actions in a remediation.yaml configured, they get executed by a single remediation sequence (get-action, action, evaluation) run.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions