Skip to content

Commit

Permalink
feat(lifecycle-operator): introduce blockDeployment parameter into Ke…
Browse files Browse the repository at this point in the history
…ptnConfig (#3111)

Signed-off-by: odubajDT <[email protected]>
  • Loading branch information
odubajDT authored Feb 23, 2024
1 parent 8610295 commit ab5b89d
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/scripts/.helm-tests/default/result.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2040,6 +2040,12 @@ spec:
description: OTelCollectorUrl can be used to set the Open Telemetry
collector that the lifecycle operator should use
type: string
blockDeployment:
default: true
description: |-
BlockDeployment is used to block the deployment of the application until the pre-deployment
tasks and evaluations succeed
type: boolean
cloudEventsEndpoint:
description: CloudEventsEndpoint can be used to set the endpoint where
Cloud Events should be posted by the lifecycle operator
Expand Down
6 changes: 6 additions & 0 deletions .github/scripts/.helm-tests/lifecycle-only/result.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1986,6 +1986,12 @@ spec:
description: OTelCollectorUrl can be used to set the Open Telemetry
collector that the lifecycle operator should use
type: string
blockDeployment:
default: true
description: |-
BlockDeployment is used to block the deployment of the application until the pre-deployment
tasks and evaluations succeed
type: boolean
cloudEventsEndpoint:
description: CloudEventsEndpoint can be used to set the endpoint where
Cloud Events should be posted by the lifecycle operator
Expand Down
6 changes: 6 additions & 0 deletions .github/scripts/.helm-tests/lifecycle-with-certs/result.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2015,6 +2015,12 @@ spec:
description: OTelCollectorUrl can be used to set the Open Telemetry
collector that the lifecycle operator should use
type: string
blockDeployment:
default: true
description: |-
BlockDeployment is used to block the deployment of the application until the pre-deployment
tasks and evaluations succeed
type: boolean
cloudEventsEndpoint:
description: CloudEventsEndpoint can be used to set the endpoint where
Cloud Events should be posted by the lifecycle operator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,6 @@ _Appears in:_
| `OTelCollectorUrl` _string_ | OTelCollectorUrl can be used to set the Open Telemetry collector that the lifecycle operator should use |||
| `keptnAppCreationRequestTimeoutSeconds` _integer_ | KeptnAppCreationRequestTimeoutSeconds is used to set the interval in which automatic app discovery searches for workload to put into the same auto-generated KeptnApp |30||
| `cloudEventsEndpoint` _string_ | CloudEventsEndpoint can be used to set the endpoint where Cloud Events should be posted by the lifecycle operator |||
| `blockDeployment` _boolean_ | BlockDeployment is used to block the deployment of the application until the pre-deployment tasks and evaluations succeed |true||


6 changes: 6 additions & 0 deletions lifecycle-operator/apis/options/v1alpha1/keptnconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ type KeptnConfigSpec struct {
// CloudEventsEndpoint can be used to set the endpoint where Cloud Events should be posted by the lifecycle operator
// +optional
CloudEventsEndpoint string `json:"cloudEventsEndpoint,omitempty"`

// BlockDeployment is used to block the deployment of the application until the pre-deployment
// tasks and evaluations succeed
// +kubebuilder:default:=true
// +optional
BlockDeployment bool `json:"blockDeployment,omitempty"`
}

// +kubebuilder:object:root=true
Expand Down
6 changes: 6 additions & 0 deletions lifecycle-operator/chart/templates/keptnconfig-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ spec:
description: OTelCollectorUrl can be used to set the Open Telemetry
collector that the lifecycle operator should use
type: string
blockDeployment:
default: true
description: |-
BlockDeployment is used to block the deployment of the application until the pre-deployment
tasks and evaluations succeed
type: boolean
cloudEventsEndpoint:
description: CloudEventsEndpoint can be used to set the endpoint where
Cloud Events should be posted by the lifecycle operator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ spec:
description: OTelCollectorUrl can be used to set the Open Telemetry
collector that the lifecycle operator should use
type: string
blockDeployment:
default: true
description: |-
BlockDeployment is used to block the deployment of the application until the pre-deployment
tasks and evaluations succeed
type: boolean
cloudEventsEndpoint:
description: CloudEventsEndpoint can be used to set the endpoint where
Cloud Events should be posted by the lifecycle operator
Expand Down
1 change: 1 addition & 0 deletions test/chainsaw/integration/keptn-config/00-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ metadata:
name: "some-config"
spec:
OTelCollectorUrl: "some-url"
blockDeployment: true
1 change: 1 addition & 0 deletions test/chainsaw/integration/keptn-config/00-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ metadata:
name: "some-config"
spec:
OTelCollectorUrl: "some-url"
blockDeployment: true

0 comments on commit ab5b89d

Please sign in to comment.