2019-11-04 16:17:25 -08:00
|
|
|
{{- if .Values.dex.enabled }}
|
|
|
|
|
apiVersion: apps/v1
|
|
|
|
|
kind: Deployment
|
|
|
|
|
metadata:
|
|
|
|
|
name: {{ template "argo-cd.dex.fullname" . }}
|
|
|
|
|
labels:
|
2021-03-22 21:15:37 +01:00
|
|
|
{{- include "argo-cd.labels" (dict "context" . "component" .Values.dex.name "name" .Values.dex.name) | nindent 4 }}
|
2021-01-22 20:23:36 +09:00
|
|
|
app.kubernetes.io/version: {{ .Values.dex.image.tag | quote }}
|
2019-11-04 16:17:25 -08:00
|
|
|
spec:
|
|
|
|
|
selector:
|
|
|
|
|
matchLabels:
|
2021-03-22 21:15:37 +01:00
|
|
|
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.dex.name) | nindent 6 }}
|
2019-11-04 16:17:25 -08:00
|
|
|
template:
|
|
|
|
|
metadata:
|
2021-09-15 19:30:54 +09:00
|
|
|
{{- with (mergeOverwrite (deepCopy .Values.global.podAnnotations) .Values.dex.podAnnotations) }}
|
2020-03-09 11:39:21 +01:00
|
|
|
annotations:
|
2022-01-31 20:26:04 +01:00
|
|
|
{{- range $key, $value := . }}
|
|
|
|
|
{{ $key }}: {{ $value | quote }}
|
|
|
|
|
{{- end }}
|
2020-03-09 11:39:21 +01:00
|
|
|
{{- end }}
|
2019-11-04 16:17:25 -08:00
|
|
|
labels:
|
2021-03-22 21:15:37 +01:00
|
|
|
{{- include "argo-cd.labels" (dict "context" . "component" .Values.dex.name "name" .Values.dex.name) | nindent 8 }}
|
2021-01-22 20:23:36 +09:00
|
|
|
app.kubernetes.io/version: {{ .Values.dex.image.tag | quote }}
|
2021-09-15 19:30:54 +09:00
|
|
|
{{- with (mergeOverwrite (deepCopy .Values.global.podLabels) .Values.dex.podLabels) }}
|
2021-08-24 14:48:03 +02:00
|
|
|
{{- toYaml . | nindent 8 }}
|
2020-03-09 11:39:21 +01:00
|
|
|
{{- end }}
|
2019-11-04 16:17:25 -08:00
|
|
|
spec:
|
2020-03-06 13:26:18 +03:00
|
|
|
{{- with .Values.global.imagePullSecrets }}
|
|
|
|
|
imagePullSecrets:
|
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
|
{{- end }}
|
2020-02-22 03:14:00 +01:00
|
|
|
{{- if .Values.global.securityContext }}
|
|
|
|
|
securityContext: {{- toYaml .Values.global.securityContext | nindent 8 }}
|
|
|
|
|
{{- end }}
|
2019-11-04 16:17:25 -08:00
|
|
|
initContainers:
|
|
|
|
|
- name: copyutil
|
2021-10-21 22:55:34 +02:00
|
|
|
image: {{ default .Values.global.image.repository .Values.dex.initImage.repository }}:{{ default (include "argo-cd.defaultTag" .) .Values.dex.initImage.tag }}
|
2019-11-21 15:40:15 +11:00
|
|
|
imagePullPolicy: {{ default .Values.global.image.imagePullPolicy .Values.dex.initImage.imagePullPolicy }}
|
2020-01-13 06:18:35 +01:00
|
|
|
resources:
|
2020-02-22 03:14:00 +01:00
|
|
|
{{- toYaml .Values.dex.resources | nindent 10 }}
|
2020-01-13 06:18:35 +01:00
|
|
|
{{- if .Values.dex.containerSecurityContext }}
|
|
|
|
|
securityContext: {{- toYaml .Values.dex.containerSecurityContext | nindent 10 }}
|
2020-02-22 03:14:00 +01:00
|
|
|
{{- end }}
|
2019-11-04 16:17:25 -08:00
|
|
|
command:
|
|
|
|
|
- cp
|
2020-10-08 23:30:53 +01:00
|
|
|
- -n
|
2021-04-07 08:42:39 -07:00
|
|
|
- /usr/local/bin/argocd
|
|
|
|
|
- /shared/argocd-dex
|
2019-11-04 16:17:25 -08:00
|
|
|
volumeMounts:
|
|
|
|
|
- mountPath: /shared
|
|
|
|
|
name: static-files
|
|
|
|
|
containers:
|
|
|
|
|
- name: {{ .Values.dex.name }}
|
|
|
|
|
image: {{ .Values.dex.image.repository }}:{{ .Values.dex.image.tag }}
|
2019-11-07 02:04:00 -08:00
|
|
|
imagePullPolicy: {{ .Values.dex.image.imagePullPolicy }}
|
2019-11-04 16:17:25 -08:00
|
|
|
command:
|
2021-04-07 08:42:39 -07:00
|
|
|
- /shared/argocd-dex
|
2019-11-04 16:17:25 -08:00
|
|
|
- rundex
|
2022-02-23 20:02:22 +09:00
|
|
|
{{- with .Values.dex.extraArgs }}
|
|
|
|
|
{{- . | toYaml | nindent 8 }}
|
|
|
|
|
{{- end }}
|
2020-01-13 06:18:35 +01:00
|
|
|
{{- if .Values.dex.containerSecurityContext }}
|
|
|
|
|
securityContext: {{- toYaml .Values.dex.containerSecurityContext | nindent 10 }}
|
2020-02-22 03:14:00 +01:00
|
|
|
{{- end }}
|
2019-12-06 00:50:47 +01:00
|
|
|
{{- if .Values.dex.env }}
|
|
|
|
|
env:
|
|
|
|
|
{{- toYaml .Values.dex.env | nindent 8 }}
|
2021-05-21 18:43:24 +02:00
|
|
|
{{- end }}
|
|
|
|
|
{{- with .Values.dex.envFrom }}
|
|
|
|
|
envFrom: {{- toYaml . | nindent 8 }}
|
2019-12-06 00:50:47 +01:00
|
|
|
{{- end }}
|
2019-11-04 16:17:25 -08:00
|
|
|
ports:
|
|
|
|
|
- name: http
|
|
|
|
|
containerPort: {{ .Values.dex.containerPortHttp }}
|
|
|
|
|
protocol: TCP
|
|
|
|
|
- name: grpc
|
|
|
|
|
containerPort: {{ .Values.dex.containerPortGrpc }}
|
|
|
|
|
protocol: TCP
|
2020-09-22 09:50:19 +08:00
|
|
|
- name: metrics
|
|
|
|
|
containerPort: {{ .Values.dex.containerPortMetrics }}
|
|
|
|
|
protocol: TCP
|
2021-08-24 14:37:34 +02:00
|
|
|
{{- if .Values.dex.livenessProbe.enabled }}
|
|
|
|
|
livenessProbe:
|
|
|
|
|
httpGet:
|
|
|
|
|
path: /healthz/live
|
|
|
|
|
port: metrics
|
|
|
|
|
{{- with .Values.dex.livenessProbe }}
|
|
|
|
|
{{- omit . "enabled" | toYaml | nindent 10 }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- if .Values.dex.readinessProbe.enabled }}
|
|
|
|
|
readinessProbe:
|
|
|
|
|
httpGet:
|
|
|
|
|
path: /healthz/ready
|
|
|
|
|
port: metrics
|
|
|
|
|
{{- with .Values.dex.readinessProbe }}
|
|
|
|
|
{{- omit . "enabled" | toYaml | nindent 10 }}
|
|
|
|
|
{{- end }}
|
2020-09-22 09:50:19 +08:00
|
|
|
{{- end }}
|
2019-11-04 16:17:25 -08:00
|
|
|
volumeMounts:
|
2021-03-10 11:16:21 +01:00
|
|
|
- mountPath: /tmp
|
|
|
|
|
name: tmp-dir
|
|
|
|
|
{{- if .Values.dex.volumeMounts }}
|
|
|
|
|
{{- toYaml .Values.dex.volumeMounts | nindent 8 }}
|
|
|
|
|
{{- end }}
|
2021-10-12 20:49:14 +02:00
|
|
|
{{- if .Values.dex.extraVolumeMounts }}
|
|
|
|
|
{{- toYaml .Values.dex.extraVolumeMounts | nindent 8 }}
|
|
|
|
|
{{- end }}
|
2019-11-04 16:17:25 -08:00
|
|
|
resources:
|
2021-09-17 02:59:20 +09:00
|
|
|
{{- toYaml .Values.dex.resources | nindent 10 }}
|
|
|
|
|
{{- with .Values.dex.extraContainers }}
|
|
|
|
|
{{- toYaml . | nindent 6 }}
|
|
|
|
|
{{- end }}
|
2019-11-04 16:17:25 -08:00
|
|
|
{{- if .Values.dex.nodeSelector }}
|
|
|
|
|
nodeSelector:
|
|
|
|
|
{{- toYaml .Values.dex.nodeSelector | nindent 8 }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- if .Values.dex.tolerations }}
|
|
|
|
|
tolerations:
|
|
|
|
|
{{- toYaml .Values.dex.tolerations | nindent 8 }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- if .Values.dex.affinity }}
|
|
|
|
|
affinity:
|
|
|
|
|
{{- toYaml .Values.dex.affinity | nindent 8 }}
|
2021-09-17 15:57:26 +02:00
|
|
|
{{- end }}
|
|
|
|
|
{{- with .Values.dex.topologySpreadConstraints }}
|
|
|
|
|
topologySpreadConstraints:
|
|
|
|
|
{{- range $constraint := . }}
|
|
|
|
|
- {{ toYaml $constraint | nindent 8 | trim }}
|
|
|
|
|
{{- if not $constraint.labelSelector }}
|
|
|
|
|
labelSelector:
|
|
|
|
|
matchLabels:
|
|
|
|
|
{{- include "argo-cd.selectorLabels" (dict "context" $ "name" $.Values.dex.name) | nindent 12 }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- end }}
|
2019-11-04 16:17:25 -08:00
|
|
|
{{- end }}
|
|
|
|
|
serviceAccountName: {{ template "argo-cd.dexServiceAccountName" . }}
|
2021-09-27 19:04:14 +09:00
|
|
|
{{- with .Values.global.hostAliases }}
|
|
|
|
|
hostAliases:
|
|
|
|
|
{{- toYaml . | nindent 6 }}
|
|
|
|
|
{{- end }}
|
2019-11-04 16:17:25 -08:00
|
|
|
volumes:
|
2021-03-10 11:16:21 +01:00
|
|
|
- emptyDir: {}
|
|
|
|
|
name: tmp-dir
|
|
|
|
|
{{- if .Values.dex.volumes }}
|
|
|
|
|
{{- toYaml .Values.dex.volumes | nindent 6 }}
|
|
|
|
|
{{- end }}
|
2021-10-12 20:49:14 +02:00
|
|
|
{{- if .Values.dex.extraVolumes }}
|
|
|
|
|
{{- toYaml .Values.dex.extraVolumes | nindent 6 }}
|
|
|
|
|
{{- end }}
|
2021-11-29 10:50:39 +00:00
|
|
|
{{- if .Values.dex.initContainers }}
|
|
|
|
|
initContainers:
|
|
|
|
|
{{- toYaml .Values.dex.initContainers | nindent 6 }}
|
|
|
|
|
{{- end }}
|
2020-07-11 13:00:29 -04:00
|
|
|
{{- if .Values.dex.priorityClassName }}
|
|
|
|
|
priorityClassName: {{ .Values.dex.priorityClassName }}
|
|
|
|
|
{{- end }}
|
2019-11-21 15:40:15 +11:00
|
|
|
{{- end }}
|