apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/name: argocd-dex-server
    app.kubernetes.io/part-of: argocd
    app.kubernetes.io/component: dex-server
  name: argocd-dex-server
spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: argocd-dex-server
  template:
    metadata:
      labels:
        app.kubernetes.io/name: argocd-dex-server
    spec:
      serviceAccountName: argocd-dex-server
      initContainers:
      - name: copyutil
        image: argoproj/argocd:latest
        imagePullPolicy: Always
        command: [cp, /usr/local/bin/argocd-util, /shared]
        volumeMounts:
        - mountPath: /shared
          name: static-files
      containers:
      - name: dex
        image: quay.io/dexidp/dex:v2.14.0
        imagePullPolicy: Always
        command: [/shared/argocd-util, rundex]
        ports:
        - containerPort: 5556
        - containerPort: 5557
        volumeMounts:
        - mountPath: /shared
          name: static-files
      volumes:
      - emptyDir: {}
        name: static-files
