Skip to content

Commit 7633210

Browse files
committed
chore(helm): Adjust template files
1 parent 1d204c8 commit 7633210

4 files changed

Lines changed: 24 additions & 1 deletion

File tree

deploy/helm/opensearch-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/opensearch-operator/templates/roles.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ rules:
7777
- customresourcedefinitions
7878
verbs:
7979
- get
80+
# Required to maintain the CRD. The operator needs to do this, as it needs to enter e.g. it's
81+
# generated certificate in the conversion webhook.
82+
{{- if .Values.maintenance.customResourceDefinitions.maintain }}
83+
- create
84+
- patch
85+
{{- end }}
8086
- apiGroups:
8187
- listeners.stackable.tech
8288
resources:

deploy/helm/opensearch-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/opensearch-operator/values.yaml

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

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

0 commit comments

Comments
 (0)