Skip to content

Commit 841943f

Browse files
authored
Update keptn-lifecycle-operator Helm chart (#182)
BREAKING CHANGE: The Lifecycle Operator helm chart was adapted after removal of the Keptn Scheduler and many Helm values were simplified, please double check your values files and adapt them accordingly.
1 parent ff640cd commit 841943f

12 files changed

+227
-779
lines changed

charts/keptn-lifecycle-operator/Chart.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ annotations:
2626
artifacthub.io/license: Apache-2.0
2727
artifacthub.io/operator: 'true'
2828
artifacthub.io/operatorCapabilities: Full Lifecycle
29-
kubeVersion: '>= 1.24.0-0'
29+
kubeVersion: '>= 1.27.0-0'
3030
type: application
31-
version: 0.5.0
32-
appVersion: v1.2.0 # x-release-please-version
31+
version: 0.6.0 # Helm Chart version
32+
appVersion: v2.0.0 # x-release-please-version
3333
dependencies:
3434
- name: common
3535
repository: https://charts.lifecycle.keptn.sh

charts/keptn-lifecycle-operator/README.md

Lines changed: 61 additions & 88 deletions
Large diffs are not rendered by default.
Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
{{/*
22
Return the proper Image Registry Secret Names for lifecycle operator
33
*/}}
4-
{{- define "lifecycleOperator.imagePullSecrets" -}}
5-
{{ include "common.images.renderPullSecrets" (dict "images" (list .Values.lifecycleOperator.image) "context" $) }}
6-
{{- end -}}
7-
8-
{{/*
9-
Return the proper Image Registry Secret Names for scheduler
10-
*/}}
11-
{{- define "scheduler.imagePullSecrets" -}}
12-
{{ include "common.images.renderPullSecrets" (dict "images" (list .Values.scheduler.image) "context" $) }}
4+
{{- define "imagePullSecrets" -}}
5+
{{ include "common.images.renderPullSecrets" (dict "images" (list .Values.image) "context" $) }}
136
{{- end -}}
Lines changed: 35 additions & 144 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
1-
{{- if or (le .Capabilities.KubeVersion.Minor "26") (not .Values.schedulingGatesEnabled) }}
2-
---
3-
apiVersion: v1
4-
kind: ServiceAccount
5-
metadata:
6-
name: keptn-scheduler
7-
namespace: {{ .Release.Namespace | quote }}
8-
{{- $annotations := include "common.annotations" (dict "context" .) }}
9-
{{- with $annotations }}
10-
annotations: {{- . -}}
11-
{{- end }}
12-
labels:
13-
{{- include "common.labels.standard" ( dict "context" . ) | nindent 4 }}
14-
{{- end }}
151
---
162
apiVersion: v1
173
kind: ServiceAccount
@@ -34,7 +20,7 @@ metadata:
3420
{{- include "common.labels.standard" ( dict "context" . ) | nindent 4 }}
3521
{{- include "common.annotations" ( dict "context" . ) }}
3622
spec:
37-
replicas: {{ .Values.lifecycleOperator.replicas }}
23+
replicas: {{ .Values.replicas }}
3824
selector:
3925
matchLabels:
4026
control-plane: lifecycle-operator
@@ -67,40 +53,37 @@ spec:
6753
fieldRef:
6854
fieldPath: metadata.name
6955
- name: FUNCTION_RUNNER_IMAGE
70-
value: {{ .Values.lifecycleOperator.env.functionRunnerImage | quote }}
56+
value: {{ .Values.env.functionRunnerImage | quote }}
7157
- name: PYTHON_RUNNER_IMAGE
72-
value: {{ .Values.lifecycleOperator.env.pythonRunnerImage | quote }}
58+
value: {{ .Values.env.pythonRunnerImage | quote }}
7359
- name: KEPTN_APP_CONTROLLER_LOG_LEVEL
74-
value: {{ .Values.lifecycleOperator.env.keptnAppControllerLogLevel | quote
60+
value: {{ .Values.env.keptnAppControllerLogLevel | quote
7561
}}
7662
- name: KEPTN_APP_CREATION_REQUEST_CONTROLLER_LOG_LEVEL
77-
value: {{ .Values.lifecycleOperator.env.keptnAppCreationRequestControllerLogLevel
63+
value: {{ .Values.env.keptnAppCreationRequestControllerLogLevel
7864
| quote }}
7965
- name: KEPTN_APP_VERSION_CONTROLLER_LOG_LEVEL
80-
value: {{ .Values.lifecycleOperator.env.keptnAppVersionControllerLogLevel
66+
value: {{ .Values.env.keptnAppVersionControllerLogLevel
8167
| quote }}
8268
- name: KEPTN_EVALUATION_CONTROLLER_LOG_LEVEL
83-
value: {{ .Values.lifecycleOperator.env.keptnEvaluationControllerLogLevel
69+
value: {{ .Values.env.keptnEvaluationControllerLogLevel
8470
| quote }}
8571
- name: KEPTN_TASK_CONTROLLER_LOG_LEVEL
86-
value: {{ .Values.lifecycleOperator.env.keptnTaskControllerLogLevel | quote
72+
value: {{ .Values.env.keptnTaskControllerLogLevel | quote
8773
}}
8874
- name: KEPTN_TASK_DEFINITION_CONTROLLER_LOG_LEVEL
89-
value: {{ .Values.lifecycleOperator.env.keptnTaskDefinitionControllerLogLevel
75+
value: {{ .Values.env.keptnTaskDefinitionControllerLogLevel
9076
| quote }}
9177
- name: KEPTN_WORKLOAD_CONTROLLER_LOG_LEVEL
92-
value: {{ .Values.lifecycleOperator.env.keptnWorkloadControllerLogLevel
78+
value: {{ .Values.env.keptnWorkloadControllerLogLevel
9379
| quote }}
9480
- name: KEPTN_WORKLOAD_VERSION_CONTROLLER_LOG_LEVEL
95-
value: {{ .Values.lifecycleOperator.env.keptnWorkloadVersionControllerLogLevel
81+
value: {{ .Values.env.keptnWorkloadVersionControllerLogLevel
9682
| quote }}
9783
- name: KEPTN_DORA_METRICS_PORT
98-
value: {{ .Values.lifecycleOperator.env.keptnDoraMetricsPort | quote }}
84+
value: {{ .Values.env.keptnDoraMetricsPort | quote }}
9985
- name: OPTIONS_CONTROLLER_LOG_LEVEL
100-
value: {{ .Values.lifecycleOperator.env.optionsControllerLogLevel | quote
101-
}}
102-
- name: SCHEDULING_GATES_ENABLED
103-
value: {{ .Values.schedulingGatesEnabled | quote
86+
value: {{ .Values.env.optionsControllerLogLevel | quote
10487
}}
10588
- name: PROMOTION_TASKS_ENABLED
10689
value: {{ .Values.promotionTasksEnabled | quote
@@ -109,8 +92,8 @@ spec:
10992
value: {{ .Values.kubernetesClusterDomain }}
11093
- name: CERT_MANAGER_ENABLED
11194
value: {{ .Values.global.certManagerEnabled | quote }}
112-
image: {{ include "common.images.image" ( dict "imageRoot" .Values.lifecycleOperator.image "global" .Values.global ) }}
113-
imagePullPolicy: {{ .Values.lifecycleOperator.image.imagePullPolicy | default (.Values.global.imagePullPolicy | default "IfNotPresent") }}
95+
image: {{ include "common.images.image" ( dict "imageRoot" .Values.image "global" .Values.global ) }}
96+
imagePullPolicy: {{ .Values.image.imagePullPolicy | default (.Values.global.imagePullPolicy | default "IfNotPresent") }}
11497
name: lifecycle-operator
11598
ports:
11699
- containerPort: 9443
@@ -119,29 +102,29 @@ spec:
119102
- containerPort: 2222
120103
name: metrics
121104
protocol: TCP
122-
resources: {{- toYaml .Values.lifecycleOperator.resources | nindent 10 }}
105+
resources: {{- toYaml .Values.resources | nindent 10 }}
123106
securityContext:
124-
allowPrivilegeEscalation: {{ .Values.lifecycleOperator.containerSecurityContext.allowPrivilegeEscalation
107+
allowPrivilegeEscalation: {{ .Values.containerSecurityContext.allowPrivilegeEscalation
125108
}}
126-
capabilities: {{- include "common.tplvalues.render" (dict "value" .Values.lifecycleOperator.containerSecurityContext.capabilities
109+
capabilities: {{- include "common.tplvalues.render" (dict "value" .Values.containerSecurityContext.capabilities
127110
"context" $) | nindent 12 }}
128-
privileged: {{ .Values.lifecycleOperator.containerSecurityContext.privileged
111+
privileged: {{ .Values.containerSecurityContext.privileged
129112
}}
130113
{{- if not .Values.global.openShift.enabled }}
131-
runAsGroup: {{ .Values.lifecycleOperator.containerSecurityContext.runAsGroup
114+
runAsGroup: {{ .Values.containerSecurityContext.runAsGroup
132115
}}
133-
runAsUser: {{ .Values.lifecycleOperator.containerSecurityContext.runAsUser
116+
runAsUser: {{ .Values.containerSecurityContext.runAsUser
134117
}}
135118
{{- end }}
136-
runAsNonRoot: {{ .Values.lifecycleOperator.containerSecurityContext.runAsNonRoot
119+
runAsNonRoot: {{ .Values.containerSecurityContext.runAsNonRoot
137120
}}
138-
seccompProfile: {{- include "common.tplvalues.render" (dict "value" .Values.lifecycleOperator.containerSecurityContext.seccompProfile
121+
seccompProfile: {{- include "common.tplvalues.render" (dict "value" .Values.containerSecurityContext.seccompProfile
139122
"context" $) | nindent 12 }}
140123
volumeMounts:
141124
- name: keptn-certs
142125
mountPath: /tmp/webhook/certs/
143-
{{- if .Values.lifecycleOperator.livenessProbe }}
144-
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.lifecycleOperator.livenessProbe "context" $) | nindent 10 }}
126+
{{- if .Values.livenessProbe }}
127+
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.livenessProbe "context" $) | nindent 10 }}
145128
{{- else }}
146129
livenessProbe:
147130
httpGet:
@@ -150,8 +133,8 @@ spec:
150133
initialDelaySeconds: 15
151134
periodSeconds: 20
152135
{{- end }}
153-
{{- if .Values.lifecycleOperator.readinessProbe }}
154-
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.lifecycleOperator.readinessProbe "context" $) | nindent 10 }}
136+
{{- if .Values.readinessProbe }}
137+
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.readinessProbe "context" $) | nindent 10 }}
155138
{{- else }}
156139
readinessProbe:
157140
httpGet:
@@ -160,114 +143,22 @@ spec:
160143
initialDelaySeconds: 5
161144
periodSeconds: 10
162145
{{- end }}
163-
{{- include "lifecycleOperator.imagePullSecrets" . | nindent 6 }}
146+
{{- include "imagePullSecrets" . | nindent 6 }}
164147
securityContext:
165148
runAsNonRoot: true
166149
serviceAccountName: lifecycle-operator
167150
terminationGracePeriodSeconds: 10
168-
hostNetwork: {{ .Values.lifecycleOperator.hostNetwork }}
151+
hostNetwork: {{ .Values.hostNetwork }}
169152
volumes:
170153
- name: keptn-certs
171154
secret:
172155
secretName: keptn-certs
173-
{{- if .Values.lifecycleOperator.topologySpreadConstraints }}
174-
topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.lifecycleOperator.topologySpreadConstraints "context" $) | nindent 8 }}
175-
{{- end }}
176-
{{- if .Values.lifecycleOperator.nodeSelector }}
177-
nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.lifecycleOperator.nodeSelector "context" $) | nindent 8 }}
178-
{{- end }}
179-
{{- if .Values.lifecycleOperator.tolerations }}
180-
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.lifecycleOperator.tolerations "context" .) | nindent 8 }}
181-
{{- end }}
182-
183-
{{- if or (le .Capabilities.KubeVersion.Minor "26") (not .Values.schedulingGatesEnabled) }}
184-
---
185-
apiVersion: apps/v1
186-
kind: Deployment
187-
metadata:
188-
name: scheduler
189-
namespace: {{ .Release.Namespace | quote }}
190-
labels:
191-
component: scheduler
192-
{{- include "common.labels.standard" ( dict "context" . ) | nindent 4 }}
193-
{{- include "common.annotations" ( dict "context" . ) }}
194-
spec:
195-
replicas: {{ .Values.scheduler.replicas }}
196-
selector:
197-
matchLabels:
198-
component: scheduler
199-
{{- include "common.selectorLabels" ( dict "context" . ) | nindent 6 }}
200-
template:
201-
metadata:
202-
labels:
203-
component: scheduler
204-
{{- include "common.selectorLabels" ( dict "context" . ) | nindent 8 }}
205-
spec:
206-
containers:
207-
- command:
208-
- /bin/kube-scheduler
209-
- --config=/etc/kubernetes/scheduler-config.yaml
210-
env:
211-
- name: OTEL_COLLECTOR_URL
212-
value: {{ .Values.scheduler.env.otelCollectorUrl | quote }}
213-
- name: KUBERNETES_CLUSTER_DOMAIN
214-
value: {{ .Values.kubernetesClusterDomain }}
215-
image: {{ include "common.images.image" ( dict "imageRoot" .Values.scheduler.image "global" .Values.global ) }}
216-
imagePullPolicy: {{.Values.scheduler.image.imagePullPolicy | default (.Values.global.imagePullPolicy | default "IfNotPresent") }}
217-
name: scheduler
218-
resources: {{- toYaml .Values.scheduler.resources | nindent 10 }}
219-
securityContext:
220-
allowPrivilegeEscalation: {{ .Values.scheduler.containerSecurityContext.allowPrivilegeEscalation
221-
}}
222-
capabilities: {{- include "common.tplvalues.render" (dict "value" .Values.scheduler.containerSecurityContext.capabilities
223-
"context" $) | nindent 12 }}
224-
privileged: {{ .Values.scheduler.containerSecurityContext.privileged
225-
}}
226-
readOnlyRootFilesystem: {{ .Values.scheduler.containerSecurityContext.readOnlyRootFilesystem
227-
}}
228-
runAsNonRoot: {{ .Values.scheduler.containerSecurityContext.runAsNonRoot
229-
}}
230-
{{- if not .Values.global.openShift.enabled }}
231-
runAsUser: {{ .Values.scheduler.containerSecurityContext.runAsUser }}
232-
{{- end }}
233-
seccompProfile: {{- include "common.tplvalues.render" (dict "value" .Values.scheduler.containerSecurityContext.seccompProfile
234-
"context" $) | nindent 12 }}
235-
volumeMounts:
236-
- mountPath: /etc/kubernetes
237-
name: scheduler-config
238-
readOnly: true
239-
{{- if .Values.scheduler.livenessProbe }}
240-
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.scheduler.livenessProbe "context" $) | nindent 10 }}
241-
{{- else }}
242-
livenessProbe:
243-
httpGet:
244-
path: /healthz
245-
port: 10259
246-
scheme: HTTPS
247-
initialDelaySeconds: 15
248-
{{- end }}
249-
{{- if .Values.scheduler.readinessProbe }}
250-
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.scheduler.readinessProbe "context" $) | nindent 10 }}
251-
{{- else }}
252-
readinessProbe:
253-
httpGet:
254-
path: /healthz
255-
port: 10259
256-
scheme: HTTPS
257-
{{- end }}
258-
{{- include "scheduler.imagePullSecrets" . | nindent 6 }}
259-
serviceAccountName: keptn-scheduler
260-
volumes:
261-
- configMap:
262-
name: scheduler-config
263-
name: scheduler-config
264-
{{- if .Values.scheduler.topologySpreadConstraints }}
265-
topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.scheduler.topologySpreadConstraints "context" $) | nindent 8 }}
266-
{{- end }}
267-
{{- if .Values.scheduler.nodeSelector }}
268-
nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.scheduler.nodeSelector "context" $) | nindent 8 }}
156+
{{- if .Values.topologySpreadConstraints }}
157+
topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.topologySpreadConstraints "context" $) | nindent 8 }}
269158
{{- end }}
270-
{{- if .Values.scheduler.tolerations }}
271-
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.scheduler.tolerations "context" .) | nindent 8 }}
159+
{{- if .Values.nodeSelector }}
160+
nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
272161
{{- end }}
162+
{{- if .Values.tolerations }}
163+
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" .) | nindent 8 }}
273164
{{- end }}

charts/keptn-lifecycle-operator/templates/extension-apiserver-authentication-reader-rbac.yaml

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)