Skip to content

Commit b5c4253

Browse files
authored
add extra volumes and extra init containers support for operator helm chart deployment (ydb-platform#238)
* helm: add extraVolumes, extraVolumeMounts, extraInitContainers, extraEnvs * bump operator version to 0.5.22
1 parent d743114 commit b5c4253

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

deploy/ydb-operator/Chart.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.5.21
18+
version: 0.5.22
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
24-
appVersion: "0.5.21"
24+
appVersion: "0.5.22"

deploy/ydb-operator/templates/deployment.yaml

+15-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ spec:
3131
tolerations:
3232
{{- toYaml . | nindent 8 }}
3333
{{- end }}
34+
{{- with .Values.extraInitContainers }}
35+
initContainers:
36+
{{- toYaml . | nindent 8 }}
37+
{{- end }}
3438
containers:
3539
- args:
3640
- --health-probe-bind-address=:8081
@@ -86,12 +90,19 @@ spec:
8690
- mountPath: /mgmt-cluster
8791
name: mgmt-cluster-kubeconfig
8892
{{- end }}
93+
{{- with .Values.extraVolumeMounts }}
94+
{{- toYaml . | nindent 12 }}
95+
{{- end }}
8996
{{- end }}
97+
{{- with .Values.extraEnvs }}
98+
env:
99+
{{ toYaml . | nindent 12 }}
100+
{{- end }}
90101
securityContext:
91102
runAsNonRoot: true
92103
serviceAccountName: {{ include "ydb.fullname" . }}
93104
terminationGracePeriodSeconds: 10
94-
{{- if or .Values.webhook.enabled .Values.mgmtCluster.enabled }}
105+
{{- if or .Values.webhook.enabled .Values.mgmtCluster.enabled .Values.extraVolumes }}
95106
volumes:
96107
{{- if .Values.webhook.enabled }}
97108
- name: webhook-tls
@@ -112,6 +123,9 @@ spec:
112123
secret:
113124
secretName: {{ .Values.mgmtCluster.kubeconfig }}
114125
{{- end }}
126+
{{- with .Values.extraVolumes }}
127+
{{- toYaml . | nindent 8 }}
128+
{{- end }}
115129
{{- end }}
116130
{{- if .Values.imagePullSecrets }}
117131
{{- with .Values.imagePullSecrets }}

deploy/ydb-operator/values.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,8 @@ webhook:
119119
# issuerRef:
120120
# name: "issuer"
121121
# kind: "ClusterIssuer"
122+
123+
extraVolumes: []
124+
extraVolumeMounts: []
125+
extraInitContainers: []
126+
extraEnvs: []

0 commit comments

Comments
 (0)