This is an automated email from the ASF dual-hosted git repository.

thw pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-kubernetes-operator.git


The following commit(s) were added to refs/heads/main by this push:
     new 9619ae6c [FLINK-37662][helm] Support init and side car containers
9619ae6c is described below

commit 9619ae6cf55d51e8c9af1d0f523267fdbd776a5f
Author: Thomas Weise <[email protected]>
AuthorDate: Tue Apr 22 21:58:36 2025 -0400

    [FLINK-37662][helm] Support init and side car containers
---
 helm/flink-kubernetes-operator/templates/flink-operator.yaml | 11 +++++++++--
 helm/flink-kubernetes-operator/values.yaml                   |  6 ++++++
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/helm/flink-kubernetes-operator/templates/flink-operator.yaml 
b/helm/flink-kubernetes-operator/templates/flink-operator.yaml
index 737520df..4fa0c669 100644
--- a/helm/flink-kubernetes-operator/templates/flink-operator.yaml
+++ b/helm/flink-kubernetes-operator/templates/flink-operator.yaml
@@ -75,6 +75,10 @@ spec:
       {{- if .Values.operatorPod.topologySpreadConstraints }}
       topologySpreadConstraints: {{ toYaml 
.Values.operatorPod.topologySpreadConstraints | nindent 8 }}
       {{- end }}
+      {{- if .Values.operatorPod.initContainers }}
+      initContainers:
+      {{- toYaml .Values.operatorPod.initContainers | nindent 8 }}
+      {{- end }}
       containers:
         - name: {{ .Chart.Name }}
           image: {{ include "flink-operator.imagePath" . }}
@@ -115,7 +119,7 @@ spec:
             - name: FLINK_PLUGINS_DIR
               value: /opt/flink/plugins
             - name: LOG_CONFIG
-              value: 
-Dlog4j.configurationFile=/opt/flink/conf/log4j-operator.properties
+              value: {{ .Values.jvmArgs.logConfig }}
             - name: JVM_ARGS
               value: {{ .Values.jvmArgs.operator }}
             {{- if .Values.tls.create }}
@@ -196,7 +200,7 @@ spec:
             - name: WEBHOOK_SERVER_PORT
               value: "9443"
             - name: LOG_CONFIG
-              value: 
-Dlog4j.configurationFile=/opt/flink/conf/log4j-operator.properties
+              value: {{ .Values.jvmArgs.logConfig }}
             - name: JVM_ARGS
               value: {{ .Values.jvmArgs.webhook }}
             - name: FLINK_CONF_DIR
@@ -221,6 +225,9 @@ spec:
           - name: flink-operator-config-volume
             mountPath: /opt/flink/conf
         {{- end }}
+        {{- if .Values.operatorPod.sidecarContainers }}
+        {{- toYaml .Values.operatorPod.sidecarContainers | nindent 8 }}
+        {{- end }}
       {{- if index (.Values.operatorPod) "dnsPolicy" }}
       dnsPolicy: {{ .Values.operatorPod.dnsPolicy | quote }}
       {{- end }}
diff --git a/helm/flink-kubernetes-operator/values.yaml 
b/helm/flink-kubernetes-operator/values.yaml
index e81c2a3e..42843b8f 100644
--- a/helm/flink-kubernetes-operator/values.yaml
+++ b/helm/flink-kubernetes-operator/values.yaml
@@ -102,6 +102,11 @@ operatorPod:
       env:
       # - name: ""
       #   value: ""
+  # optional init containers for operator pod
+  initContainers: []
+
+  # optional extra containers for operator pod
+  sidecarContainers: []
 
 operatorServiceAccount:
   create: true
@@ -190,6 +195,7 @@ fullnameOverride: ""
 jvmArgs:
   webhook: ""
   operator: ""
+  logConfig: 
"-Dlog4j.configurationFile=/opt/flink/conf/log4j-operator.properties"
 
 # Configure health probes for the operator
 operatorHealth:

Reply via email to