diff --git a/.github/scripts/.helm-tests/default/result.yaml b/.github/scripts/.helm-tests/default/result.yaml index b6db62156db..990a23cff66 100644 --- a/.github/scripts/.helm-tests/default/result.yaml +++ b/.github/scripts/.helm-tests/default/result.yaml @@ -11478,6 +11478,8 @@ spec: value: "0" - name: SCHEDULING_GATES_ENABLED value: "false" + - name: PROMOTION_TASKS_ENABLED + value: "false" - name: KUBERNETES_CLUSTER_DOMAIN value: cluster.local - name: CERT_MANAGER_ENABLED diff --git a/.github/scripts/.helm-tests/lifecycle-only/result.yaml b/.github/scripts/.helm-tests/lifecycle-only/result.yaml index 0658703748f..18b132c3d44 100644 --- a/.github/scripts/.helm-tests/lifecycle-only/result.yaml +++ b/.github/scripts/.helm-tests/lifecycle-only/result.yaml @@ -8887,6 +8887,8 @@ spec: value: "0" - name: SCHEDULING_GATES_ENABLED value: "false" + - name: PROMOTION_TASKS_ENABLED + value: "true" - name: KUBERNETES_CLUSTER_DOMAIN value: cluster.local - name: CERT_MANAGER_ENABLED diff --git a/.github/scripts/.helm-tests/lifecycle-only/values.yaml b/.github/scripts/.helm-tests/lifecycle-only/values.yaml index 62396aa88ac..f8c17819320 100644 --- a/.github/scripts/.helm-tests/lifecycle-only/values.yaml +++ b/.github/scripts/.helm-tests/lifecycle-only/values.yaml @@ -8,6 +8,7 @@ global: lifecycleOperator: enabled: true + promotionTasksEnabled: true lifecycleOperator: image: repository: myrep diff --git a/.github/scripts/.helm-tests/lifecycle-with-certs/result.yaml b/.github/scripts/.helm-tests/lifecycle-with-certs/result.yaml index 8cf7adce8b7..950c252e5bd 100644 --- a/.github/scripts/.helm-tests/lifecycle-with-certs/result.yaml +++ b/.github/scripts/.helm-tests/lifecycle-with-certs/result.yaml @@ -9201,6 +9201,8 @@ spec: value: "0" - name: SCHEDULING_GATES_ENABLED value: "false" + - name: PROMOTION_TASKS_ENABLED + value: "false" - name: KUBERNETES_CLUSTER_DOMAIN value: cluster.local - name: CERT_MANAGER_ENABLED diff --git a/lifecycle-operator/chart/README.md b/lifecycle-operator/chart/README.md index 577640dc958..aff594ffa1e 100644 --- a/lifecycle-operator/chart/README.md +++ b/lifecycle-operator/chart/README.md @@ -75,6 +75,7 @@ and application health checks | `annotations` | add deployment level annotations | `{}` | | `podAnnotations` | adds pod level annotations | `{}` | | `schedulingGatesEnabled` | enables the scheduling gates in lifecycle-operator. This feature is available in alpha version from K8s 1.27 or 1.26 enabling the alpha version | `false` | +| `promotionTasksEnabled` | enables the promotion task feature in the lifecycle-operator. | `false` | | `allowedNamespaces` | specifies the allowed namespaces for the lifecycle orchestration functionality | `[]` | | `deniedNamespaces` | specifies a list of namespaces where the lifecycle orchestration functionality is disabled, ignored if `allowedNamespaces` is set | `["cert-manager","keptn-system","observability","monitoring"]` | diff --git a/lifecycle-operator/chart/templates/deployment.yaml b/lifecycle-operator/chart/templates/deployment.yaml index 81b5be0a37a..74f7fb9f878 100644 --- a/lifecycle-operator/chart/templates/deployment.yaml +++ b/lifecycle-operator/chart/templates/deployment.yaml @@ -102,6 +102,9 @@ spec: - name: SCHEDULING_GATES_ENABLED value: {{ .Values.schedulingGatesEnabled | quote }} + - name: PROMOTION_TASKS_ENABLED + value: {{ .Values.promotionTasksEnabled | quote + }} - name: KUBERNETES_CLUSTER_DOMAIN value: {{ .Values.kubernetesClusterDomain }} - name: CERT_MANAGER_ENABLED diff --git a/lifecycle-operator/chart/values.yaml b/lifecycle-operator/chart/values.yaml index 0a02d0d9219..ec3c6a3d9e6 100644 --- a/lifecycle-operator/chart/values.yaml +++ b/lifecycle-operator/chart/values.yaml @@ -164,7 +164,7 @@ lifecycleOperatorMetricsService: type: ClusterIP ## @section Global -## Current available parameters: kubernetesClusterDomain, imagePullSecrets, schedulingGatesEnabled, allowedNamespaces, deniedNamespaces +## Current available parameters: kubernetesClusterDomain, imagePullSecrets, schedulingGatesEnabled, allowedNamespaces, deniedNamespaces, promotionTasksEnabled ## @param kubernetesClusterDomain overrides cluster.local kubernetesClusterDomain: cluster.local ## @param annotations add deployment level annotations @@ -173,6 +173,8 @@ annotations: {} podAnnotations: {} ## @param schedulingGatesEnabled enables the scheduling gates in lifecycle-operator. This feature is available in alpha version from K8s 1.27 or 1.26 enabling the alpha version schedulingGatesEnabled: false +## @param promotionTasksEnabled enables the promotion task feature in the lifecycle-operator. +promotionTasksEnabled: false ## @param allowedNamespaces specifies the allowed namespaces for the lifecycle orchestration functionality allowedNamespaces: [] ## @param deniedNamespaces specifies a list of namespaces where the lifecycle orchestration functionality is disabled, ignored if `allowedNamespaces` is set diff --git a/lifecycle-operator/config/manager/manager.yaml b/lifecycle-operator/config/manager/manager.yaml index a3b25595d46..33ed6e04013 100644 --- a/lifecycle-operator/config/manager/manager.yaml +++ b/lifecycle-operator/config/manager/manager.yaml @@ -81,6 +81,8 @@ spec: value: "0" - name: SCHEDULING_GATES_ENABLED value: "false" + - name: PROMOTION_TASKS_ENABLED + value: "false" - name: CERT_MANAGER_ENABLED value: "true" securityContext: diff --git a/lifecycle-operator/main.go b/lifecycle-operator/main.go index 91f5fe33d8e..56e2afa1214 100644 --- a/lifecycle-operator/main.go +++ b/lifecycle-operator/main.go @@ -104,6 +104,7 @@ type envConfig struct { KeptnOptionsControllerLogLevel int `envconfig:"OPTIONS_CONTROLLER_LOG_LEVEL" default:"0"` SchedulingGatesEnabled bool `envconfig:"SCHEDULING_GATES_ENABLED" default:"false"` + PromotionTasksEnabled bool `envconfig:"PROMOTION_TASKS_ENABLED" default:"false"` CertManagerEnabled bool `envconfig:"CERT_MANAGER_ENABLED" default:"true"` }