Skip to content

Commit bcbb685

Browse files
authoredFeb 23, 2024
[Enhancement] support annotations and image filed for init-password job (#454)
Signed-off-by: yandongxiao <[email protected]>
1 parent 9aac3e3 commit bcbb685

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed
 

‎helm-charts/charts/kube-starrocks/charts/starrocks/templates/init-pwd/job.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ kind: Job
44
metadata:
55
name: starrocks-initpwd
66
namespace: {{ template "starrockscluster.namespace" . }}
7+
{{- if .Values.initPassword.annotations }}
8+
annotations:
9+
{{- toYaml .Values.initPassword.annotations | nindent 4 }}
10+
{{- end }}
711
spec:
812
template:
913
spec:
@@ -17,7 +21,11 @@ spec:
1721
{{- end }}
1822
containers:
1923
- name: {{ template "starrockscluster.name" . }}-initpwd
24+
{{- if .Values.initPassword.image }}
25+
image: {{ .Values.initPassword.image }}
26+
{{- else }}
2027
image: {{ .Values.starrocksFESpec.image.repository }}:{{ include "starrockscluster.fe.image.tag" . }}
28+
{{- end }}
2129
imagePullPolicy: IfNotPresent
2230
command:
2331
- /bin/bash

‎helm-charts/charts/kube-starrocks/charts/starrocks/values.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ initPassword:
1717
password: ""
1818
# The secret name that contains password, the key of the secret is "password", and you should create it first.
1919
passwordSecret: ""
20+
# The image of the initPassword job, if it is not set, the FE image will be used.
21+
# see https://github.com/StarRocks/starrocks-kubernetes-operator/issues/453 for why we need to set the image.
22+
image: ""
23+
# The annotations for the initPassword job.
24+
annotations: {}
2025

2126
# TimeZone is used to set the environment variable TZ for pod, with Asia/Shanghai as the default.
2227
timeZone: Asia/Shanghai

‎helm-charts/charts/kube-starrocks/values.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ starrocks:
110110
password: ""
111111
# The secret name that contains password, the key of the secret is "password", and you should create it first.
112112
passwordSecret: ""
113+
# The image of the initPassword job, if it is not set, the FE image will be used.
114+
# see https://github.com/StarRocks/starrocks-kubernetes-operator/issues/453 for why we need to set the image.
115+
image: ""
116+
# The annotations for the initPassword job.
117+
annotations: {}
113118

114119
# TimeZone is used to set the environment variable TZ for pod, with Asia/Shanghai as the default.
115120
timeZone: Asia/Shanghai

0 commit comments

Comments
 (0)
Please sign in to comment.