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
value: |
jobmanager.rpc.address: localhost
jobmanager.memory.process.size: 2048m
taskmanager.memory.process.size: 2048m
taskmanager.data.port: 6125
taskmanager.numberOfTaskSlots: {{ .Values.flink.taskManager.numberOfTaskSlots }}
parallelism.default: {{ .Values.flink.parallelism.default }}
state.backend: {{ .Values.flink.state.backend }}
state.savepoints.dir: {{ .Values.flink.state.savepoints.dir }} # Savepoints path
rest.port: 8081
rootLogger.level = DEBUG
rootLogger.appenderRef.console.ref = ConsoleAppender
volumeMounts:
- name: flink-data
mountPath: /opt/flink/data

View File

@ -1,7 +1,7 @@
apiVersion: v1
kind: Service
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:
app.kubernetes.io/name: {{ .Release.Name }}-flink # Adding the flink prefix to labels
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
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.volumes }}
- name: config-volume
mountPath: /config.yaml
subPath: config.yaml
volumes:
{{- toYaml . | nindent 8 }}
{{- end }}
- name: config-volume
configMap:
name: {{ .Release.Name }}-config # Name of the ConfigMap
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}

View File

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