You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by gy...@apache.org on 2022/12/25 16:22:28 UTC

[flink-kubernetes-operator] branch release-1.3 updated: [FLINK-30329] Mount flink-operator-config-volume at /opt/flink/conf without subPath

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

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


The following commit(s) were added to refs/heads/release-1.3 by this push:
     new 35259597 [FLINK-30329] Mount flink-operator-config-volume at /opt/flink/conf without subPath
35259597 is described below

commit 352595977d12c8c477f183b74a1c650090749c91
Author: Ottomata <ao...@wikimedia.org>
AuthorDate: Wed Dec 7 14:48:15 2022 -0500

    [FLINK-30329] Mount flink-operator-config-volume at /opt/flink/conf without subPath
    
    When mounted volumes use subPath, the volume that uses them is not updated automatically.
    So, even you do update the ConfigMap in k8s, the flink-conf.yaml file will never see those updates.
    All of the entires in the flink-operator-config-volume configMap are mounted in each
    container anyway, so we might as well just mount the flink-operator-config-volume
    directly at /opt/flink/conf witihout specifying the subPath of each file.
    
    This allows for Dynamic Operator Configuration to work when deployed with
    these helm charts.
    https://nightlies.apache.org/flink/flink-kubernetes-operator-docs-main/docs/operations/configuration/#dynamic-operator-configuration
---
 .../templates/flink-operator.yaml                      | 18 ++----------------
 1 file changed, 2 insertions(+), 16 deletions(-)

diff --git a/helm/flink-kubernetes-operator/templates/flink-operator.yaml b/helm/flink-kubernetes-operator/templates/flink-operator.yaml
index f94c2198..f8da1543 100644
--- a/helm/flink-kubernetes-operator/templates/flink-operator.yaml
+++ b/helm/flink-kubernetes-operator/templates/flink-operator.yaml
@@ -100,14 +100,7 @@ spec:
             {{- toYaml .Values.operatorSecurityContext | nindent 12 }}
           volumeMounts:
             - name: flink-operator-config-volume
-              mountPath: /opt/flink/conf/flink-conf.yaml
-              subPath: flink-conf.yaml
-            - name: flink-operator-config-volume
-              mountPath: /opt/flink/conf/log4j-operator.properties
-              subPath: log4j-operator.properties
-            - name: flink-operator-config-volume
-              mountPath: /opt/flink/conf/log4j-console.properties
-              subPath: log4j-console.properties
+              mountPath: /opt/flink/conf
             {{- if .Values.operatorVolumeMounts.create }}
                 {{- toYaml .Values.operatorVolumeMounts.data | nindent 12 }}
             {{- end }}
@@ -167,14 +160,7 @@ spec:
             mountPath: "/certs"
             readOnly: true
           - name: flink-operator-config-volume
-            mountPath: /opt/flink/conf/flink-conf.yaml
-            subPath: flink-conf.yaml
-          - name: flink-operator-config-volume
-            mountPath: /opt/flink/conf/log4j-operator.properties
-            subPath: log4j-operator.properties
-          - name: flink-operator-config-volume
-            mountPath: /opt/flink/conf/log4j-console.properties
-            subPath: log4j-console.properties
+            mountPath: /opt/flink/conf
         {{- end }}
       {{- if index (.Values.operatorPod) "dnsPolicy" }}
       dnsPolicy: {{ .Values.operatorPod.dnsPolicy | quote }}