Skip to content

Commit 67339a7

Browse files
authored
feat(chart): add scheduling controls to lago-data-rev-rec (#232)
1 parent 3635414 commit 67339a7

3 files changed

Lines changed: 46 additions & 0 deletions

File tree

charts/lago-data-rev-rec/templates/deployment.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,40 @@ spec:
3333
replicas: {{ .Values.jobManager.replicas }}
3434
resource:
3535
{{- toYaml .Values.jobManager.resource | nindent 6 }}
36+
{{- if or .Values.nodeSelector .Values.tolerations .Values.affinity }}
37+
podTemplate:
38+
spec:
39+
{{- with .Values.nodeSelector }}
40+
nodeSelector:
41+
{{- toYaml . | nindent 10 }}
42+
{{- end }}
43+
{{- with .Values.tolerations }}
44+
tolerations:
45+
{{- toYaml . | nindent 10 }}
46+
{{- end }}
47+
{{- with .Values.affinity }}
48+
affinity:
49+
{{- toYaml . | nindent 10 }}
50+
{{- end }}
51+
{{- end }}
3652
taskManager:
3753
replicas: {{ .Values.taskManager.replicas }}
3854
resource:
3955
{{- toYaml .Values.taskManager.resource | nindent 6 }}
4056
podTemplate:
4157
spec:
58+
{{- with .Values.nodeSelector }}
59+
nodeSelector:
60+
{{- toYaml . | nindent 10 }}
61+
{{- end }}
62+
{{- with .Values.tolerations }}
63+
tolerations:
64+
{{- toYaml . | nindent 10 }}
65+
{{- end }}
66+
{{- with .Values.affinity }}
67+
affinity:
68+
{{- toYaml . | nindent 10 }}
69+
{{- end }}
4270
containers:
4371
- name: flink-main-container
4472
# operator injects flink config; nothing else to set here

charts/lago-data-rev-rec/templates/submitter-job.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@ spec:
1818
{{- include "lago-data-rev-rec.labels" . | nindent 8 }}
1919
app.kubernetes.io/component: submitter
2020
spec:
21+
{{- with .Values.nodeSelector }}
22+
nodeSelector:
23+
{{- toYaml . | nindent 8 }}
24+
{{- end }}
25+
{{- with .Values.tolerations }}
26+
tolerations:
27+
{{- toYaml . | nindent 8 }}
28+
{{- end }}
29+
{{- with .Values.affinity }}
30+
affinity:
31+
{{- toYaml . | nindent 8 }}
32+
{{- end }}
2133
restartPolicy: Never
2234
serviceAccountName: {{ include "lago-data-rev-rec.serviceAccountName" . }}
2335
containers:

charts/lago-data-rev-rec/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ image:
1515
tag: ""
1616
pullPolicy: IfNotPresent
1717

18+
# Applied to every pod this chart creates: the FlinkDeployment's JobManager
19+
# and TaskManagers, and the submitter Job. Empty by default.
20+
nodeSelector: {}
21+
tolerations: []
22+
affinity: {}
23+
1824
# Annotations applied to the FlinkDeployment resource.
1925
annotations: {}
2026

0 commit comments

Comments
 (0)