From 5543f5ea7931b5c6cf766ae966abd9ba36a3c4cf Mon Sep 17 00:00:00 2001 From: Mohammadreza Khani Date: Fri, 13 Dec 2024 02:49:21 +0330 Subject: [PATCH] feat(helm): enable ha for Flink cluster deployment --- helm/templates/flink/deploy.yaml | 9 ++++++++- helm/templates/operator/role.yaml | 12 ++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/helm/templates/flink/deploy.yaml b/helm/templates/flink/deploy.yaml index 067fe99..06a8a88 100644 --- a/helm/templates/flink/deploy.yaml +++ b/helm/templates/flink/deploy.yaml @@ -40,12 +40,16 @@ spec: 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 + state.savepoints.dir: {{ .Values.flink.state.savepoints.dir }} rest.port: 8081 rootLogger.level = DEBUG rootLogger.appenderRef.console.ref = ConsoleAppender web.upload.dir: /opt/flink/data/web-upload state.checkpoints.dir: file:///tmp/flink-checkpoints + high-availability.type: kubernetes + high-availability.storageDir: file:///opt/flink/ha + kubernetes.cluster-id: cluster-one + kubernetes.namespace: {{ .Release.Namespace }} volumeMounts: - name: flink-data mountPath: /opt/flink/data @@ -55,6 +59,9 @@ spec: subPath: web-upload - name: flink-savepoints mountPath: /opt/flink/savepoints + - name: flink-savepoints + mountPath: /opt/flink/ha + subPath: ha volumes: - name: flink-data diff --git a/helm/templates/operator/role.yaml b/helm/templates/operator/role.yaml index 78ea39d..99c8d30 100644 --- a/helm/templates/operator/role.yaml +++ b/helm/templates/operator/role.yaml @@ -18,6 +18,18 @@ rules: - delete - patch - watch + - apiGroups: [""] + resources: ["configmaps", "pods", "services"] + verbs: ["create", "get", "list", "watch", "update", "delete", "patch"] + - apiGroups: ["apps"] + resources: ["statefulsets"] + verbs: ["get", "list", "watch"] + - apiGroups: ["storage.k8s.io"] + resources: ["persistentvolumeclaims"] + verbs: ["get", "list", "create", "delete"] + - apiGroups: [""] + resources: ["persistentvolumes"] + verbs: ["get", "list"] ---