feat(argo-cd): Allow global configuration for pod annotations and labels (#894)
Signed-off-by: Petr Drastil <petr.drastil@gmail.com>
This commit is contained in:
parent
da73ab6a69
commit
536e98b72b
8 changed files with 28 additions and 32 deletions
|
|
@ -17,17 +17,15 @@ spec:
|
|||
replicas: {{ .Values.controller.replicas }}
|
||||
template:
|
||||
metadata:
|
||||
{{- if .Values.controller.podAnnotations }}
|
||||
{{- with (mergeOverwrite .Values.global.podAnnotations .Values.controller.podAnnotations) }}
|
||||
annotations:
|
||||
{{- range $key, $value := .Values.controller.podAnnotations }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 8 }}
|
||||
app.kubernetes.io/version: {{ default .Values.global.image.tag .Values.controller.image.tag | quote }}
|
||||
{{- if .Values.controller.podLabels }}
|
||||
{{- toYaml .Values.controller.podLabels | nindent 8 }}
|
||||
{{- with (mergeOverwrite .Values.global.podLabels .Values.controller.podLabels) }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- with .Values.global.imagePullSecrets }}
|
||||
|
|
|
|||
|
|
@ -16,17 +16,15 @@ spec:
|
|||
{{- end }}
|
||||
template:
|
||||
metadata:
|
||||
{{- if .Values.repoServer.podAnnotations }}
|
||||
{{- with (mergeOverwrite .Values.global.podAnnotations .Values.repoServer.podAnnotations) }}
|
||||
annotations:
|
||||
{{- range $key, $value := .Values.repoServer.podAnnotations }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.repoServer.name "name" .Values.repoServer.name) | nindent 8 }}
|
||||
app.kubernetes.io/version: {{ default .Values.global.image.tag .Values.repoServer.image.tag | quote }}
|
||||
{{- if .Values.repoServer.podLabels }}
|
||||
{{- toYaml .Values.repoServer.podLabels | nindent 8 }}
|
||||
{{- with (mergeOverwrite .Values.global.podLabels .Values.repoServer.podLabels) }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- with .Values.global.imagePullSecrets }}
|
||||
|
|
|
|||
|
|
@ -16,17 +16,15 @@ spec:
|
|||
{{- end }}
|
||||
template:
|
||||
metadata:
|
||||
{{- if .Values.server.podAnnotations }}
|
||||
{{- with (mergeOverwrite .Values.global.podAnnotations .Values.server.podAnnotations) }}
|
||||
annotations:
|
||||
{{- range $key, $value := .Values.server.podAnnotations }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 8 }}
|
||||
app.kubernetes.io/version: {{ default .Values.global.image.tag .Values.server.image.tag | quote }}
|
||||
{{- if .Values.server.podLabels }}
|
||||
{{- toYaml .Values.server.podLabels | nindent 8 }}
|
||||
{{- with (mergeOverwrite .Values.global.podLabels .Values.server.podLabels) }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- with .Values.global.imagePullSecrets }}
|
||||
|
|
|
|||
|
|
@ -12,17 +12,15 @@ spec:
|
|||
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.dex.name) | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
{{- if .Values.dex.podAnnotations }}
|
||||
{{- with (mergeOverwrite .Values.global.podAnnotations .Values.dex.podAnnotations) }}
|
||||
annotations:
|
||||
{{- range $key, $value := .Values.dex.podAnnotations }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.dex.name "name" .Values.dex.name) | nindent 8 }}
|
||||
app.kubernetes.io/version: {{ .Values.dex.image.tag | quote }}
|
||||
{{- if .Values.dex.podLabels }}
|
||||
{{- toYaml .Values.dex.podLabels | nindent 8 }}
|
||||
{{- with (mergeOverwrite .Values.global.podLabels .Values.dex.podLabels) }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- with .Values.global.imagePullSecrets }}
|
||||
|
|
|
|||
|
|
@ -13,17 +13,15 @@ spec:
|
|||
app.kubernetes.io/name: {{ include "argo-cd.name" . }}-{{ .Values.redis.name }}
|
||||
template:
|
||||
metadata:
|
||||
{{- if .Values.redis.podAnnotations }}
|
||||
{{- with (mergeOverwrite .Values.global.podAnnotations .Values.redis.podAnnotations) }}
|
||||
annotations:
|
||||
{{- range $key, $value := .Values.redis.podAnnotations }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 8 }}
|
||||
app.kubernetes.io/version: {{ .Values.redis.image.tag | quote }}
|
||||
{{- if .Values.redis.podLabels }}
|
||||
{{- toYaml .Values.redis.podLabels | nindent 8 }}
|
||||
{{- with (mergeOverwrite .Values.global.podLabels .Values.redis.podLabels) }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- with .Values.global.imagePullSecrets }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue