feat: add config.yaml to to operator

This commit is contained in:
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 }}