Skip to content

Commit 627d44c

Browse files
committed
chore(helm): Adjust template files
1 parent a08e903 commit 627d44c

4 files changed

Lines changed: 30 additions & 1 deletion

File tree

deploy/helm/commons-operator/templates/deployment.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ spec:
2121
{{- toYaml . | nindent 8 }}
2222
{{- end }}
2323
labels:
24+
{{- if .Values.maintenance.customResourceDefinitions.maintain }}
25+
webhook.stackable.tech/conversion: enabled
26+
{{- end }}
2427
{{- include "operator.selectorLabels" . | nindent 8 }}
2528
spec:
2629
{{- with .Values.image.pullSecrets }}
@@ -78,7 +81,9 @@ spec:
7881
- name: KUBERNETES_CLUSTER_DOMAIN
7982
value: {{ .Values.kubernetesClusterDomain | quote }}
8083
{{- end }}
84+
8185
{{- include "telemetry.envVars" . | nindent 12 }}
86+
{{- include "maintenance.envVars" . | nindent 12 }}
8287
volumes:
8388
- name: config-spec
8489
configMap:

deploy/helm/commons-operator/templates/roles.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,15 @@ rules:
5353
verbs:
5454
- create
5555
- patch
56+
# Required to maintain the CRD. The operator needs to do this, as it needs to enter e.g. it's
57+
# generated certificate in the conversion webhook.
58+
{{ if .Values.maintenance.customResourceDefinitions.maintain }}
59+
- apiGroups:
60+
- apiextensions.k8s.io
61+
resources:
62+
- customresourcedefinitions
63+
verbs:
64+
- get
65+
- create
66+
- patch
67+
{{ end }}

deploy/helm/commons-operator/templates/service.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ metadata:
1111
{{- include "operator.labels" . | nindent 4 }}
1212
spec:
1313
selector:
14-
{{- include "operator.selectorLabels" . | nindent 6 }}
14+
{{- if .Values.maintenance.customResourceDefinitions.maintain }}
15+
webhook.stackable.tech/conversion: enabled
16+
{{- end }}
17+
{{- include "operator.selectorLabels" . | nindent 4 }}
1518
ports:
1619
- name: conversion-webhook
1720
protocol: TCP

deploy/helm/commons-operator/values.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,15 @@ affinity: {}
4646
# See the https://docs.stackable.tech/home/stable/guides/kubernetes-cluster-domain guide for details.
4747
# kubernetesClusterDomain: my-cluster.local
4848

49+
maintenance:
50+
endOfSupportCheck:
51+
enabled: true
52+
# mode: offline
53+
# interval: 24h
54+
55+
customResourceDefinitions:
56+
maintain: true
57+
4958
# See all available options and detailed explanations about the concept here:
5059
# https://docs.stackable.tech/home/stable/concepts/telemetry/
5160
telemetry:

0 commit comments

Comments
 (0)