Skip to content

Commit 9619ae6

Browse files
committed
[FLINK-37662][helm] Support init and side car containers
1 parent 1ae2f33 commit 9619ae6

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

helm/flink-kubernetes-operator/templates/flink-operator.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ spec:
7575
{{- if .Values.operatorPod.topologySpreadConstraints }}
7676
topologySpreadConstraints: {{ toYaml .Values.operatorPod.topologySpreadConstraints | nindent 8 }}
7777
{{- end }}
78+
{{- if .Values.operatorPod.initContainers }}
79+
initContainers:
80+
{{- toYaml .Values.operatorPod.initContainers | nindent 8 }}
81+
{{- end }}
7882
containers:
7983
- name: {{ .Chart.Name }}
8084
image: {{ include "flink-operator.imagePath" . }}
@@ -115,7 +119,7 @@ spec:
115119
- name: FLINK_PLUGINS_DIR
116120
value: /opt/flink/plugins
117121
- name: LOG_CONFIG
118-
value: -Dlog4j.configurationFile=/opt/flink/conf/log4j-operator.properties
122+
value: {{ .Values.jvmArgs.logConfig }}
119123
- name: JVM_ARGS
120124
value: {{ .Values.jvmArgs.operator }}
121125
{{- if .Values.tls.create }}
@@ -196,7 +200,7 @@ spec:
196200
- name: WEBHOOK_SERVER_PORT
197201
value: "9443"
198202
- name: LOG_CONFIG
199-
value: -Dlog4j.configurationFile=/opt/flink/conf/log4j-operator.properties
203+
value: {{ .Values.jvmArgs.logConfig }}
200204
- name: JVM_ARGS
201205
value: {{ .Values.jvmArgs.webhook }}
202206
- name: FLINK_CONF_DIR
@@ -221,6 +225,9 @@ spec:
221225
- name: flink-operator-config-volume
222226
mountPath: /opt/flink/conf
223227
{{- end }}
228+
{{- if .Values.operatorPod.sidecarContainers }}
229+
{{- toYaml .Values.operatorPod.sidecarContainers | nindent 8 }}
230+
{{- end }}
224231
{{- if index (.Values.operatorPod) "dnsPolicy" }}
225232
dnsPolicy: {{ .Values.operatorPod.dnsPolicy | quote }}
226233
{{- end }}

helm/flink-kubernetes-operator/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ operatorPod:
102102
env:
103103
# - name: ""
104104
# value: ""
105+
# optional init containers for operator pod
106+
initContainers: []
107+
108+
# optional extra containers for operator pod
109+
sidecarContainers: []
105110

106111
operatorServiceAccount:
107112
create: true
@@ -190,6 +195,7 @@ fullnameOverride: ""
190195
jvmArgs:
191196
webhook: ""
192197
operator: ""
198+
logConfig: "-Dlog4j.configurationFile=/opt/flink/conf/log4j-operator.properties"
193199

194200
# Configure health probes for the operator
195201
operatorHealth:

0 commit comments

Comments
 (0)