Skip to content

Commit

Permalink
feat(chart): Support specified operator time zone.
Browse files Browse the repository at this point in the history
fix: #511
  • Loading branch information
runkecheng committed Jun 7, 2022
1 parent 03736d0 commit e4f6053
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions charts/mysql-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ spec:
secret:
defaultMode: 420
secretName: "{{ template "webhook.name" . }}-certs"
- name: timezone
hostPath:
{{- if (empty .Values.timeZone) }}
path: /etc/localtime
{{- else }}
path: /usr/share/zoneinfo/{{ .Values.timeZone }}
{{- end }}
containers:
{{- if .Values.rbacProxy.create }}
- name: kube-rbac-proxy
Expand All @@ -42,6 +49,9 @@ spec:
ports:
- containerPort: 8443
name: https
volumeMounts:
- name: timezone
mountPath: /etc/localtime
{{- end }}
- name: manager
ports:
Expand All @@ -52,6 +62,8 @@ spec:
- name: cert
mountPath: /tmp/k8s-webhook-server/serving-certs/
readOnly: true
- name: timezone
mountPath: /etc/localtime
command:
- /manager
args:
Expand Down
3 changes: 3 additions & 0 deletions charts/mysql-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ imagePullPolicy: IfNotPresent
nameOverride: ""
fullnameOverride: ""
imagePrefix: ""
## Mount the host time zone by default.
## You can refer to the time zone listed in `/usr/share/zoneinfo/` to specify timezone, like `Asia/Shanghai`.
timeZone: ""

## node.kubernetes.io/not-ready:NoExecute
## node.kubernetes.io/unreachable:NoExecute
Expand Down

0 comments on commit e4f6053

Please sign in to comment.