feat: add config.yaml to to operator

This commit is contained in:
Mohamad Khani 2024-12-09 00:54:40 +03:30
parent 454cd8aae8
commit 204f25a6af
9 changed files with 25 additions and 19 deletions

View File

@ -32,10 +32,16 @@ spec:
- name: FLINK_PROPERTIES - name: FLINK_PROPERTIES
value: | value: |
jobmanager.rpc.address: localhost jobmanager.rpc.address: localhost
jobmanager.memory.process.size: 2048m
taskmanager.memory.process.size: 2048m
taskmanager.data.port: 6125
taskmanager.numberOfTaskSlots: {{ .Values.flink.taskManager.numberOfTaskSlots }} taskmanager.numberOfTaskSlots: {{ .Values.flink.taskManager.numberOfTaskSlots }}
parallelism.default: {{ .Values.flink.parallelism.default }} parallelism.default: {{ .Values.flink.parallelism.default }}
state.backend: {{ .Values.flink.state.backend }} state.backend: {{ .Values.flink.state.backend }}
state.savepoints.dir: {{ .Values.flink.state.savepoints.dir }} # Savepoints path state.savepoints.dir: {{ .Values.flink.state.savepoints.dir }} # Savepoints path
rest.port: 8081
rootLogger.level = DEBUG
rootLogger.appenderRef.console.ref = ConsoleAppender
volumeMounts: volumeMounts:
- name: flink-data - name: flink-data
mountPath: /opt/flink/data mountPath: /opt/flink/data

View File

@ -1,7 +1,7 @@
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: {{ .Release.Name }}-flink-service # Adding the flink prefix to the service name name: flink # Adding the flink prefix to the service name
labels: labels:
app.kubernetes.io/name: {{ .Release.Name }}-flink # Adding the flink prefix to labels app.kubernetes.io/name: {{ .Release.Name }}-flink # Adding the flink prefix to labels
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}

View File

@ -0,0 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-config
data:
config.yaml: |
{{ .Values.config | toYaml | nindent 4 }}

View File

@ -42,14 +42,16 @@ spec:
protocol: TCP protocol: TCP
resources: resources:
{{- toYaml .Values.resources | nindent 12 }} {{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.volumeMounts }}
volumeMounts: volumeMounts:
{{- toYaml . | nindent 12 }} - name: config-volume
{{- end }} mountPath: /config.yaml
{{- with .Values.volumes }} subPath: config.yaml
volumes: volumes:
{{- toYaml . | nindent 8 }} - name: config-volume
{{- end }} configMap:
name: {{ .Release.Name }}-config # Name of the ConfigMap
{{- with .Values.nodeSelector }} {{- with .Values.nodeSelector }}
nodeSelector: nodeSelector:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}

View File

@ -103,18 +103,9 @@ autoscaling:
targetCPUUtilizationPercentage: 80 targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80 # targetMemoryUtilizationPercentage: 80
# Additional volumes on the output Deployment definition. config:
volumes: [] flinkApiUrl: flink:8081
# - name: foo
# secret:
# secretName: mysecret
# optional: false
# Additional volumeMounts on the output Deployment definition.
volumeMounts: []
# - name: foo
# mountPath: "/etc/foo"
# readOnly: true
nodeSelector: {} nodeSelector: {}
@ -138,7 +129,7 @@ flink:
pvcName: flink-savepoints-pvc # PVC for savepoints persistence pvcName: flink-savepoints-pvc # PVC for savepoints persistence
taskManager: taskManager:
numberOfTaskSlots: 1 # Number of task slots for TaskManager numberOfTaskSlots: 100 # Number of task slots for TaskManager
persistence: persistence:
enabled: true enabled: true