Skip to content

Commit

Permalink
feat(charts/flink-job): add nodeselector to job spec (#326)
Browse files Browse the repository at this point in the history
  • Loading branch information
schahal authored Aug 9, 2024
1 parent 4fa52fe commit 7a1b40e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/flink-job/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "1.0"
description: Flink job cluster on k8s
name: flink-job
version: 0.1.21
version: 0.1.22
maintainers:
- name: Zedive
email: albert@nextdoor.com
3 changes: 2 additions & 1 deletion charts/flink-job/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Flink job cluster on k8s

![Version: 0.1.21](https://img.shields.io/badge/Version-0.1.21-informational?style=flat-square) ![AppVersion: 1.0](https://img.shields.io/badge/AppVersion-1.0-informational?style=flat-square)
![Version: 0.1.22](https://img.shields.io/badge/Version-0.1.22-informational?style=flat-square) ![AppVersion: 1.0](https://img.shields.io/badge/AppVersion-1.0-informational?style=flat-square)

This chart deploys a flink job cluster and runs a simple word counting flink app as an example.
This chart includes some production ready set-ups such as
Expand Down Expand Up @@ -40,6 +40,7 @@ See metrics reporter in the flink properties for more details.
| job.initContainers | object | `{"enabled":false}` | Init containers of the Job pod. It can be used to download a remote job jar to your job pod. It is only needed if you have no other way to download your job files into the Flink job cluster. |
| job.jarFile | String | `"./examples/streaming/WordCount.jar"` | JAR file of the job |
| job.mode | String | `"Detached"` | JobMode of the job submitter, either Detached or Blocking |
| job.nodeSelector | string | `nil` | The node selector for the job |
| job.parallelism | `int` | `1` | Parallelism of the job |
| job.restartPolicy | String | `"FromSavepointOnFailure"` | Restart policy when the job fails, enum("Never", "FromSavepointOnFailure") |
| job.savepointGeneration | `int` | `nil` | Update this field to jobStatus.savepointGeneration + 1 for a running job cluster to trigger a new savepoint to savepointsDir on demand. |
Expand Down
6 changes: 5 additions & 1 deletion charts/flink-job/templates/flinkjobcluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,10 @@ spec:
{{- if .Values.job.savepointGeneration }}
savepointGeneration: {{ .Values.job.savepointGenaration }}
{{- end }}
{{- with .Values.job.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 6 }}
{{- end }}
noLoggingToStdout: false
parallelism: {{ .Values.job.parallelism }}
restartPolicy: {{ .Values.job.restartPolicy }}
Expand Down Expand Up @@ -451,4 +455,4 @@ spec:
{{ $property }}: {{ tpl $value $ | quote }}
{{- end }}
{{- end }}
{{- end -}}
{{- end -}}
2 changes: 2 additions & 0 deletions charts/flink-job/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ job:
afterJobFails: KeepCluster
afterJobCancelled: KeepCluster
afterJobSucceeds: KeepCluster
# -- The node selector for the job
nodeSelector:
# -- Init containers of the Job pod. It can be used to download a remote job jar to your job pod.
# It is only needed if you have no other way to download your job files into the Flink job cluster.
initContainers:
Expand Down

0 comments on commit 7a1b40e

Please sign in to comment.