diff --git a/helm/chart/Chart.yaml b/helm/chart/Chart.yaml index f8beb72..cf94e9e 100644 --- a/helm/chart/Chart.yaml +++ b/helm/chart/Chart.yaml @@ -2,9 +2,5 @@ apiVersion: v2 name: flink-kube-operator description: Helm chart for flink kube operator type: application -version: 1.1.2 +version: 1.2.0 appVersion: "0.1.1" -dependencies: - - name: minio - repository: https://charts.bitnami.com/bitnami - version: 16.0.2 \ No newline at end of file diff --git a/helm/chart/charts/minio-16.0.2.tgz b/helm/chart/charts/minio-16.0.2.tgz deleted file mode 100644 index 624d25b..0000000 Binary files a/helm/chart/charts/minio-16.0.2.tgz and /dev/null differ diff --git a/helm/chart/templates/flink/savepoint.pvc.yaml b/helm/chart/templates/flink/checkpoint-pvc.yaml similarity index 74% rename from helm/chart/templates/flink/savepoint.pvc.yaml rename to helm/chart/templates/flink/checkpoint-pvc.yaml index ef03774..8ddb59d 100644 --- a/helm/chart/templates/flink/savepoint.pvc.yaml +++ b/helm/chart/templates/flink/checkpoint-pvc.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.flink.state.checkpoint.storageType "filesystem" }} apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -8,3 +9,4 @@ spec: resources: requests: storage: {{ .Values.flink.state.checkpoint.size }} +{{- end }} \ No newline at end of file diff --git a/helm/chart/templates/flink/config.yaml b/helm/chart/templates/flink/config.yaml index 2569a3d..df1e8d6 100644 --- a/helm/chart/templates/flink/config.yaml +++ b/helm/chart/templates/flink/config.yaml @@ -27,7 +27,11 @@ {{- end }} state.backend.rocksdb.localdir: /opt/flink/rocksdb high-availability.storageDir: /opt/flink/ha + {{- if eq .Values.flink.state.savepoint.storageType "filesystem" }} + state.savepoints.dir: file:///opt/flink/checkpoints/ + {{- else if eq .Values.flink.state.savepoint.storageType "s3" }} state.savepoints.dir: s3://flink/savepoints/ + {{- end }} state.backend.incremental: {{ .Values.flink.state.incremental }} rest.profiling.enabled: true s3.endpoint: http://{{ .Release.Name }}-minio:9000 diff --git a/helm/chart/templates/flink/job-manager-deploy.yaml b/helm/chart/templates/flink/job-manager-deploy.yaml index 210d4e3..f8d1bf0 100644 --- a/helm/chart/templates/flink/job-manager-deploy.yaml +++ b/helm/chart/templates/flink/job-manager-deploy.yaml @@ -68,6 +68,10 @@ spec: - name: flink-checkpoint mountPath: /opt/flink/checkpoints {{- end }} + {{- if eq .Values.flink.state.savepoint.storageType "filesystem" }} + - name: flink-savepoint + mountPath: /opt/flink/savepoint + {{- end }} volumes: - name: flink-ha persistentVolumeClaim: @@ -77,6 +81,11 @@ spec: persistentVolumeClaim: claimName: {{ .Release.Name }}-flink-checkpoint-pvc {{- end }} + {{- if eq .Values.flink.state.savepoint.storageType "filesystem" }} + - name: flink-savepoint + persistentVolumeClaim: + claimName: {{ .Release.Name }}-flink-savepoint-pvc + {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/helm/chart/templates/flink/savepoint-pvc.yaml b/helm/chart/templates/flink/savepoint-pvc.yaml new file mode 100644 index 0000000..3a26713 --- /dev/null +++ b/helm/chart/templates/flink/savepoint-pvc.yaml @@ -0,0 +1,12 @@ +{{- if eq .Values.flink.state.savepoint.storageType "filesystem" }} +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ .Release.Name }}-flink-savepoint-pvc +spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: {{ .Values.flink.state.savepoint.size }} +{{- end }} \ No newline at end of file diff --git a/helm/chart/values.yaml b/helm/chart/values.yaml index 937792b..47308fa 100644 --- a/helm/chart/values.yaml +++ b/helm/chart/values.yaml @@ -38,8 +38,7 @@ podAnnotations: {} # For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ podLabels: {} -podSecurityContext: {} - # fsGroup: 2000 +podSecurityContext: {} # fsGroup: 2000 securityContext: {} # capabilities: @@ -64,10 +63,10 @@ ingress: # kubernetes.io/ingress.class: nginx # kubernetes.io/tls-acme: "true" hosts: - - host: chart-example.local - paths: - - path: / - pathType: ImplementationSpecific + - host: chart-example.local + paths: + - path: / + pathType: ImplementationSpecific tls: [] # - secretName: chart-example-tls # hosts: @@ -106,7 +105,6 @@ autoscaling: config: flinkApiUrl: flink:8081 - nodeSelector: {} tolerations: [] @@ -120,13 +118,13 @@ flink: tag: 1.20.1-scala_2.12-java17-minicluster parallelism: - default: 1 # Default parallelism for Flink jobs + default: 1 # Default parallelism for Flink jobs state: - backend: rocksdb # Use RocksDB for state backend + backend: rocksdb # Use RocksDB for state backend incremental: true ha: - dir: "/opt/flink/ha" # Directory to store ha data + dir: "/opt/flink/ha" # Directory to store ha data pvcName: flink-ha-pvc # PVC for ha size: 10Gi # PVC size for ha checkpoint: @@ -134,25 +132,27 @@ flink: interval: 5min mode: EXACTLY_ONCE size: 8Gi - + savepoint: + storageType: s3 + size: 8Gi + jobManager: processMemory: 4096m # Size of job manager process memory properties: jobmanager.rpc.timeout: 300s - taskManager: - numberOfTaskSlots: 12 # Number of task slots for task manager + numberOfTaskSlots: 12 # Number of task slots for task manager processMemory: 4096m # Size of task manager process memory replicas: 1 # Number of task manager replicas storage: rocksDb: size: 4Gi - resources: + resources: limits: cpu: 3 memory: 4Gi requests: cpu: 1 - memory: 2Gi \ No newline at end of file + memory: 2Gi diff --git a/helm/flink-kube-operator-1.2.0.tgz b/helm/flink-kube-operator-1.2.0.tgz new file mode 100644 index 0000000..cd8179d Binary files /dev/null and b/helm/flink-kube-operator-1.2.0.tgz differ diff --git a/helm/index.yaml b/helm/index.yaml index e7617c1..d9b5914 100644 --- a/helm/index.yaml +++ b/helm/index.yaml @@ -1,6 +1,20 @@ apiVersion: v1 entries: flink-kube-operator: + - apiVersion: v2 + appVersion: 0.1.1 + created: "2025-05-17T12:47:25.848097207+03:30" + dependencies: + - name: minio + repository: https://charts.bitnami.com/bitnami + version: 16.0.2 + description: Helm chart for flink kube operator + digest: 3458b9be97d2a4bcf8574706e44ea9f7fdeb11e83058a615566e6e094a51b920 + name: flink-kube-operator + type: application + urls: + - flink-kube-operator-1.2.0.tgz + version: 1.2.0 - apiVersion: v2 appVersion: 0.1.1 created: "2025-04-15T12:06:59.425538953+03:30"