Преглед на файлове

Add additional JVM arg to override security.properties

vkropotko преди 5 години
родител
ревизия
d9736ce41d
променени са 5 файла, в които са добавени 21 реда и са изтрити 1 реда
  1. 1 1
      Chart.yaml
  2. 3 0
      templates/configmap.yaml
  3. 7 0
      templates/jobmanager-statefulset.yaml
  4. 4 0
      templates/taskmanager-statefulset.yaml
  5. 6 0
      values.yaml

+ 1 - 1
Chart.yaml

@@ -2,4 +2,4 @@ apiVersion: v1
 appVersion: "1.9.1"
 description: Chart for Apache Flink
 name: flink-helmchart
-version: 0.1.1
+version: 0.1.2

+ 3 - 0
templates/configmap.yaml

@@ -25,6 +25,9 @@ data:
     log4j.appender.file.layout=org.apache.log4j.PatternLayout
     log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %-60c %x - %m%n
     log4j.logger.org.apache.flink.shaded.akka.org.jboss.netty.channel.DefaultChannelPipeline=ERROR, file
+  security.properties:
+    # The java-level namelookup cache policy for successful lookups
+    networkaddress.cache.ttl=5
 {{- if .Values.jobmanager.highAvailability.enabled }}
   masters: |
   {{- range $i, $e := until (.Values.jobmanager.replicaCount | int) }}

+ 7 - 0
templates/jobmanager-statefulset.yaml

@@ -40,6 +40,8 @@ spec:
             - "-c"
             - {{ include "jobmanager.command" . | quote }}
           env:
+            - name: JVM_ARGS
+              value: {{ tpl .Values.jobmanager.jvmArgs . | quote }}
           {{- if .Values.extraEnvs }}
           {{- toYaml .Values.extraEnvs | nindent 12 }}
           {{- end }}
@@ -80,6 +82,9 @@ spec:
             - name: flink-config-volume
               mountPath: {{ .Values.flink.workDir }}/conf/log4j.properties
               subPath: log4j.properties
+            - name: flink-config-volume
+              mountPath: {{ .Values.flink.workDir }}/conf/security.properties
+              subPath: security.properties
               {{- if .Values.jobmanager.highAvailability.enabled }}
             - name: flink-config-volume
               mountPath: {{ .Values.flink.workDir }}/conf/masters
@@ -101,6 +106,8 @@ spec:
                 path: flink-conf.yaml.tpl
               - key: log4j.properties
                 path: log4j.properties
+              - key: security.properties
+                path: security.properties
               {{- if .Values.jobmanager.highAvailability.enabled }}
               - key: masters
                 path: masters

+ 4 - 0
templates/taskmanager-statefulset.yaml

@@ -39,6 +39,8 @@ spec:
             - "-c"
             - {{ include "taskmanager.command" . | quote }}
           env:
+            - name: JVM_ARGS
+              value: {{ tpl .Values.taskmanager.jvmArgs . | quote }}
           {{- if .Values.extraEnvs }}
           {{- toYaml .Values.extraEnvs | nindent 12 }}
           {{- end }}
@@ -78,6 +80,8 @@ spec:
                 path: flink-conf.yaml
               - key: log4j.properties
                 path: log4j.properties
+              - key: security.properties
+                path: security.properties
               {{- if .Values.jobmanager.highAvailability.enabled }}
               - key: masters
                 path: masters

+ 6 - 0
values.yaml

@@ -87,6 +87,9 @@ jobmanager:
       then tail -f -n +1 log/*jobmanager*.log;
       fi;
       done
+  # Additional param for JVM to support security.properties override
+  # check configMap for more information
+  jvmArgs: "-Djava.security.properties={{ .Values.flink.workDir }}/conf/security.properties"
   # extraEnvs passes envs to Jobmanagers
   extraEnvs: []
   ports:
@@ -160,6 +163,9 @@ jobmanager:
     initialDelaySeconds: 20
 
 taskmanager:
+  # Additional param for JVM to support security.properties override
+  # check configMap for more information
+  jvmArgs: "-Djava.security.properties={{ .Values.flink.workDir }}/conf/security.properties"
   # extraEnvs passes envs to Taskmanagers
   extraEnvs: []
   ports: