107 lines
3.9 KiB
YAML
Executable File
107 lines
3.9 KiB
YAML
Executable File
{{- if .Values.dex.enabled }}
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ template "argo-cd.dex.fullname" . }}
|
|
labels:
|
|
app.kubernetes.io/name: {{ include "argo-cd.name" . }}-{{ .Values.dex.name }}
|
|
helm.sh/chart: {{ include "argo-cd.chart" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
app.kubernetes.io/part-of: argocd
|
|
app.kubernetes.io/component: {{ .Values.dex.name }}
|
|
app.kubernetes.io/version: {{ .Values.dex.image.tag }}
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: {{ include "argo-cd.name" . }}-{{ .Values.dex.name }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
template:
|
|
metadata:
|
|
{{- if .Values.dex.podAnnotations }}
|
|
annotations:
|
|
{{- range $key, $value := .Values.dex.podAnnotations }}
|
|
{{ $key }}: {{ $value | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
labels:
|
|
app.kubernetes.io/name: {{ include "argo-cd.name" . }}-{{ .Values.dex.name }}
|
|
helm.sh/chart: {{ include "argo-cd.chart" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
app.kubernetes.io/part-of: argocd
|
|
app.kubernetes.io/component: {{ .Values.dex.name }}
|
|
app.kubernetes.io/version: {{ .Values.dex.image.tag }}
|
|
{{- if .Values.dex.podLabels }}
|
|
{{- toYaml .Values.dex.podLabels | nindent 8 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- with .Values.global.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.global.securityContext }}
|
|
securityContext: {{- toYaml .Values.global.securityContext | nindent 8 }}
|
|
{{- end }}
|
|
initContainers:
|
|
- name: copyutil
|
|
image: {{ default .Values.global.image.repository .Values.dex.initImage.repository }}:{{ default .Values.global.image.tag .Values.dex.initImage.tag }}
|
|
imagePullPolicy: {{ default .Values.global.image.imagePullPolicy .Values.dex.initImage.imagePullPolicy }}
|
|
resources:
|
|
{{- toYaml .Values.dex.resources | nindent 10 }}
|
|
{{- if .Values.dex.containerSecurityContext }}
|
|
securityContext: {{- toYaml .Values.dex.containerSecurityContext | nindent 10 }}
|
|
{{- end }}
|
|
command:
|
|
- cp
|
|
- /usr/local/bin/argocd-util
|
|
- /shared
|
|
volumeMounts:
|
|
- mountPath: /shared
|
|
name: static-files
|
|
containers:
|
|
- name: {{ .Values.dex.name }}
|
|
image: {{ .Values.dex.image.repository }}:{{ .Values.dex.image.tag }}
|
|
imagePullPolicy: {{ .Values.dex.image.imagePullPolicy }}
|
|
command:
|
|
- /shared/argocd-util
|
|
- rundex
|
|
{{- if .Values.dex.containerSecurityContext }}
|
|
securityContext: {{- toYaml .Values.dex.containerSecurityContext | nindent 10 }}
|
|
{{- end }}
|
|
{{- if .Values.dex.env }}
|
|
env:
|
|
{{- toYaml .Values.dex.env | nindent 8 }}
|
|
{{- end }}
|
|
ports:
|
|
- name: http
|
|
containerPort: {{ .Values.dex.containerPortHttp }}
|
|
protocol: TCP
|
|
- name: grpc
|
|
containerPort: {{ .Values.dex.containerPortGrpc }}
|
|
protocol: TCP
|
|
{{- if .Values.dex.volumeMounts }}
|
|
volumeMounts:
|
|
{{- toYaml .Values.dex.volumeMounts | nindent 10 }}
|
|
{{- end }}
|
|
resources:
|
|
{{- toYaml .Values.dex.resources | nindent 10 }}
|
|
{{- 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 }}
|
|
{{- end }}
|
|
serviceAccountName: {{ template "argo-cd.dexServiceAccountName" . }}
|
|
{{- if .Values.dex.volumes }}
|
|
volumes:
|
|
{{- toYaml .Values.dex.volumes | nindent 8}}
|
|
{{- end }}
|
|
{{- end }}
|