Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(charts/flink-job): add nodeselector to job spec #326

Merged
merged 1 commit into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: [email protected]
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
Loading