Skip to content

Commit

Permalink
Make affinity in charts more generic
Browse files Browse the repository at this point in the history
  • Loading branch information
yannick-roeder committed May 15, 2024
1 parent f3c0aa9 commit 3d67d3d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
9 changes: 3 additions & 6 deletions charts/producer-app-cleanup-job/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,19 @@ spec:
serviceAccountName: {{ .Values.serviceAccountName }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{ toYaml .Values.tolerations | indent 8 }}
tolerations: {{ toYaml .Values.tolerations | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity: {{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml .Values.imagePullSecrets | nindent 8 }}
imagePullSecrets: {{- toYaml .Values.imagePullSecrets | nindent 8 }}
{{- end }}
containers:
- name: {{ template "producer-app-cleanup-job.name" . }}
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
imagePullPolicy: "{{ .Values.imagePullPolicy }}"
resources:
{{ toYaml .Values.resources | indent 12 }}
resources: {{ toYaml .Values.resources | nindent 12 }}
env:
- name: ENV_PREFIX
value: {{ .Values.configurationEnvPrefix }}_
Expand Down
9 changes: 3 additions & 6 deletions charts/producer-app/templates/pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,19 @@ spec:
serviceAccountName: {{ .Values.serviceAccountName }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{ toYaml .Values.tolerations | indent 4 }}
tolerations: {{ toYaml .Values.tolerations | nindent 4 }}
{{- end }}
{{- with .Values.affinity }}
affinity: {{- toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml .Values.imagePullSecrets | nindent 8 }}
imagePullSecrets: {{- toYaml .Values.imagePullSecrets | nindent 4 }}
{{- end }}
containers:
- name: {{ template "producer-app.name" . }}
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
imagePullPolicy: "{{ .Values.imagePullPolicy }}"
resources:
{{ toYaml .Values.resources | indent 6 }}
resources: {{ toYaml .Values.resources | nindent 6 }}
env:
- name: ENV_PREFIX
value: {{ .Values.configurationEnvPrefix }}_
Expand Down
2 changes: 1 addition & 1 deletion charts/streams-app-cleanup-job/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ spec:
- name: {{ template "streams-app-cleanup-job.name" . }}
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
imagePullPolicy: "{{ .Values.imagePullPolicy }}"
resources: {{ toYaml .Values.resources | indent 12 }}
resources: {{ toYaml .Values.resources | nindent 12 }}
env:
- name: ENV_PREFIX
value: {{ .Values.configurationEnvPrefix }}_
Expand Down

0 comments on commit 3d67d3d

Please sign in to comment.