diff --git a/templates/deployment_backend.yaml b/templates/deployment_backend.yaml index 66d8b1ba..a9919606 100644 --- a/templates/deployment_backend.yaml +++ b/templates/deployment_backend.yaml @@ -19,11 +19,17 @@ spec: annotations: {{- if .Values.podAnnotations }} {{ toYaml .Values.podAnnotations | indent 8 }} +{{- end }} +{{- if .Values.backend.annotations }} +{{ toYaml .Values.backend.annotations | indent 8 }} {{- end }} labels: {{- include "retool.selectorLabels" . | nindent 8 }} {{- if .Values.podLabels }} {{ toYaml .Values.podLabels | indent 8 }} +{{- end }} +{{- if .Values.backend.labels }} +{{ toYaml .Values.backend.labels | indent 8 }} {{- end }} spec: serviceAccountName: {{ template "retool.serviceAccountName" . }} diff --git a/templates/deployment_jobs.yaml b/templates/deployment_jobs.yaml index 26b42028..646f6671 100644 --- a/templates/deployment_jobs.yaml +++ b/templates/deployment_jobs.yaml @@ -21,12 +21,18 @@ spec: annotations: {{- if .Values.podAnnotations }} {{ toYaml .Values.podAnnotations | indent 8 }} +{{- end }} +{{- if .Values.jobRunner.annotations }} +{{ toYaml .Values.jobRunner.annotations | indent 8 }} {{- end }} labels: app.kubernetes.io/name: {{ include "retool.name" . }}-jobs-runner app.kubernetes.io/instance: {{ .Release.Name }} {{- if .Values.podLabels }} {{ toYaml .Values.podLabels | indent 8 }} +{{- end }} +{{- if .Values.jobRunner.labels }} +{{ toYaml .Values.jobRunner.labels | indent 8 }} {{- end }} spec: serviceAccountName: {{ template "retool.serviceAccountName" . }} diff --git a/values.yaml b/values.yaml index c18388dc..8ee7b178 100644 --- a/values.yaml +++ b/values.yaml @@ -179,7 +179,9 @@ tolerations: [] # Ref: https://kubernetes.io/docs/user-guide/node-selection/ nodeSelector: {} +# Common annotations for all pods (backend and job runner). podAnnotations: {} + # Increasing replica count will deploy a separate pod for backend and jobs # Example: with 3 replicas, you will end up with 3 backends + 1 jobs pod replicaCount: 1 @@ -194,9 +196,23 @@ revisionHistoryLimit: 3 # podDisruptionBudget: # maxUnavailable: 1 -# Custom labels for pod assignment +# Common labels for all pods (backend and job runner) for pod assignment podLabels: {} +jobRunner: + # Annotations for job runner pods + annotations: {} + + # Labels for job runner pods + labels: {} + +backend: + # Annotations for backendpods + annotations: {} + + # Labels for backend pods + labels: {} + persistentVolumeClaim: # set to true to use pvc enabled: false