From 11733fb792cc1915eee1795b4296b331ba7b4734 Mon Sep 17 00:00:00 2001 From: pegtrifork Date: Fri, 4 Aug 2023 11:39:49 +0200 Subject: [PATCH 1/2] Support init containers --- charts/flink-job/Chart.yaml | 2 +- charts/flink-job/README.md | 11 ++++------- charts/flink-job/values.yaml | 19 +++++++++++++++++++ 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/charts/flink-job/Chart.yaml b/charts/flink-job/Chart.yaml index 6225fb54..62eae146 100644 --- a/charts/flink-job/Chart.yaml +++ b/charts/flink-job/Chart.yaml @@ -7,7 +7,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.3.7 +version: 0.3.8 dependencies: - name: image-automation diff --git a/charts/flink-job/README.md b/charts/flink-job/README.md index 54c25973..43769745 100644 --- a/charts/flink-job/README.md +++ b/charts/flink-job/README.md @@ -1,15 +1,9 @@ # flink-job -![Version: 0.3.7](https://img.shields.io/badge/Version-0.3.7-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) +![Version: 0.3.8](https://img.shields.io/badge/Version-0.3.8-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) A Helm chart for handling Cheetah Data Platform Flink jobs -## Requirements - -| Repository | Name | Version | -|------------|------|---------| -| file://../image-automation | image-automation | * | - ## Usage ### Changing CPU limits @@ -142,6 +136,7 @@ Read more about Flink and highly available job-managers [here](https://nightlies | volumeMounts | list | `[]` | List of additional volume mounts for the both job- and task-manager | | podLabels | object | `{}` | Additional labels attached to the pods | | podAnnotations | object | `{}` | Additional annotations attached to the pods | +| initContainers | list | `[]` | InitContainers for the pods | | job.jarURI | string | `""` | The path of the job jar | | job.entryClass | string | `""` | The name of the job class | | job.args | list | `[]` | Arguments for the job | @@ -163,6 +158,7 @@ Read more about Flink and highly available job-managers [here](https://nightlies | taskManager.volumeMounts | list | `[]` | List of additional volume mounts | | taskManager.podLabels | object | `{}` | Additional labels attached to the pods | | taskManager.podAnnotations | object | `{}` | Additional annotations attached to the pods | +| taskManager.initContainers | list | `[]` | InitContainers for the pods | | taskManager.podTemplate | string | (see values.yaml) | Pod template. Overrides the main `podTemplate`. The main flink-container must be called "flink-main-container" | | jobManager.replicas | int | `1` | Number of replicas | | jobManager.resource.memory | string | `"1Gb"` | Memory to reserve for the Job Manager. The default value should be ok for most jobs. | @@ -174,6 +170,7 @@ Read more about Flink and highly available job-managers [here](https://nightlies | jobManager.volumeMounts | list | `[]` | List of additional volume mounts | | jobManager.podLabels | object | `{}` | Additional labels attached to the pods | | jobManager.podAnnotations | object | `{}` | Additional annotations attached to the pods | +| jobManager.initContainers | list | `[]` | InitContainers for the pods | | jobManager.podTemplate | string | (see values.yaml) | Pod template. Overrides the main `podTemplate`. The main flink-container must be called "flink-main-container" | | metrics.enabled | bool | `true` | Enable metrics scraping. Define flinkProperties to define the monitoring properties | | metrics.port | int | `9249` | Port on both job- and task-manager where metrics are exposed | diff --git a/charts/flink-job/values.yaml b/charts/flink-job/values.yaml index 94c8de0e..56c4821e 100644 --- a/charts/flink-job/values.yaml +++ b/charts/flink-job/values.yaml @@ -89,6 +89,8 @@ volumeMounts: [] podLabels: {} # -- Additional annotations attached to the pods podAnnotations: {} +# -- InitContainers for the pods +initContainers: [] job: # -- The path of the job jar @@ -164,6 +166,10 @@ podTemplate: |- imagePullSecrets: {{- toYaml . | nindent 4 }} {{- end }} + {{- with .Values.initContainers }} + initContainers: + {{- toYaml . | nindent 4 }} + {{- end }} taskManager: # -- Number of replicas @@ -188,6 +194,8 @@ taskManager: podLabels: {} # -- Additional annotations attached to the pods podAnnotations: {} + # -- InitContainers for the pods + initContainers: [] # -- Pod template. Overrides the main `podTemplate`. # The main flink-container must be called "flink-main-container" @@ -227,6 +235,10 @@ taskManager: volumes: {{- toYaml . | nindent 4 -}} {{- end }} + {{- with .Values.taskManager.initContainers }} + initContainers: + {{- toYaml . | nindent 4 }} + {{- end }} jobManager: # -- Number of replicas @@ -251,6 +263,8 @@ jobManager: podLabels: {} # -- Additional annotations attached to the pods podAnnotations: {} + # -- InitContainers for the pods + initContainers: [] # -- Pod template. Overrides the main `podTemplate`. # The main flink-container must be called "flink-main-container" @@ -290,6 +304,11 @@ jobManager: volumes: {{- toYaml . | nindent 4 -}} {{- end }} + + {{- with .Values.jobManager.initContainers }} + initContainers: + {{- toYaml . | nindent 4 }} + {{- end }} metrics: # -- Enable metrics scraping. Define flinkProperties to define the monitoring properties From c4caba0e6648e74e4da189a19d2e49ecfdc1eb6d Mon Sep 17 00:00:00 2001 From: pegtrifork Date: Fri, 4 Aug 2023 11:50:02 +0200 Subject: [PATCH 2/2] linting --- charts/flink-job/README.md | 6 ++++++ charts/flink-job/values.yaml | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/charts/flink-job/README.md b/charts/flink-job/README.md index 43769745..e7386110 100644 --- a/charts/flink-job/README.md +++ b/charts/flink-job/README.md @@ -4,6 +4,12 @@ A Helm chart for handling Cheetah Data Platform Flink jobs +## Requirements + +| Repository | Name | Version | +|------------|------|---------| +| file://../image-automation | image-automation | * | + ## Usage ### Changing CPU limits diff --git a/charts/flink-job/values.yaml b/charts/flink-job/values.yaml index 56c4821e..98babd55 100644 --- a/charts/flink-job/values.yaml +++ b/charts/flink-job/values.yaml @@ -167,7 +167,7 @@ podTemplate: |- {{- toYaml . | nindent 4 }} {{- end }} {{- with .Values.initContainers }} - initContainers: + initContainers: {{- toYaml . | nindent 4 }} {{- end }} @@ -236,7 +236,7 @@ taskManager: {{- toYaml . | nindent 4 -}} {{- end }} {{- with .Values.taskManager.initContainers }} - initContainers: + initContainers: {{- toYaml . | nindent 4 }} {{- end }} @@ -304,9 +304,9 @@ jobManager: volumes: {{- toYaml . | nindent 4 -}} {{- end }} - + {{- with .Values.jobManager.initContainers }} - initContainers: + initContainers: {{- toYaml . | nindent 4 }} {{- end }}