Skip to content

Commit

Permalink
add extra volumes and extra init containers support for operator helm…
Browse files Browse the repository at this point in the history
… chart deployment (#238)

* helm: add extraVolumes, extraVolumeMounts, extraInitContainers, extraEnvs

* bump operator version to 0.5.22
  • Loading branch information
nikitka authored Jul 16, 2024
1 parent d743114 commit b5c4253
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
4 changes: 2 additions & 2 deletions deploy/ydb-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.5.21
version: 0.5.22

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.5.21"
appVersion: "0.5.22"
16 changes: 15 additions & 1 deletion deploy/ydb-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.extraInitContainers }}
initContainers:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- args:
- --health-probe-bind-address=:8081
Expand Down Expand Up @@ -86,12 +90,19 @@ spec:
- mountPath: /mgmt-cluster
name: mgmt-cluster-kubeconfig
{{- end }}
{{- with .Values.extraVolumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
{{- with .Values.extraEnvs }}
env:
{{ toYaml . | nindent 12 }}
{{- end }}
securityContext:
runAsNonRoot: true
serviceAccountName: {{ include "ydb.fullname" . }}
terminationGracePeriodSeconds: 10
{{- if or .Values.webhook.enabled .Values.mgmtCluster.enabled }}
{{- if or .Values.webhook.enabled .Values.mgmtCluster.enabled .Values.extraVolumes }}
volumes:
{{- if .Values.webhook.enabled }}
- name: webhook-tls
Expand All @@ -112,6 +123,9 @@ spec:
secret:
secretName: {{ .Values.mgmtCluster.kubeconfig }}
{{- end }}
{{- with .Values.extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if .Values.imagePullSecrets }}
{{- with .Values.imagePullSecrets }}
Expand Down
5 changes: 5 additions & 0 deletions deploy/ydb-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,8 @@ webhook:
# issuerRef:
# name: "issuer"
# kind: "ClusterIssuer"

extraVolumes: []
extraVolumeMounts: []
extraInitContainers: []
extraEnvs: []

0 comments on commit b5c4253

Please sign in to comment.