---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: argocd-server
spec:
  selector:
    matchLabels:
      app: argocd-server
  template:
    metadata:
      labels:
        app: argocd-server
    spec:
      serviceAccountName: argocd-server
      initContainers:
      - name: copyutil
        image: argoproj/argocd-server:v0.7.0
        command: [cp, /argocd-util, /shared]
        volumeMounts:
        - mountPath: /shared
          name: static-files
      - name: ui
        image: argoproj/argocd-ui:v0.7.0
        command: [cp, -r, /app, /shared]
        volumeMounts:
        - mountPath: /shared
          name: static-files
      containers:
      - name: argocd-server
        image: argoproj/argocd-server:v0.7.0
        command: [/argocd-server, --staticassets, /shared/app, --repo-server, 'argocd-repo-server:8081']
        volumeMounts:
        - mountPath: /shared
          name: static-files
      - name: dex
        image: quay.io/coreos/dex:v2.10.0
        command: [/shared/argocd-util, rundex]
        volumeMounts:
        - mountPath: /shared
          name: static-files
      volumes:
      - emptyDir: {}
        name: static-files
