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: ui
        image: argoproj/argocd-ui:latest
        command: [cp, -r, /app, /shared]
        volumeMounts:
        - mountPath: /shared
          name: static-files
      containers:
      - name: argocd-server
        image: argoproj/argocd:latest
        imagePullPolicy: Always
        command: [argocd-server, --staticassets, /shared/app]
        volumeMounts:
        - mountPath: /shared
          name: static-files
        ports:
        - containerPort: 8080
        readinessProbe:
          httpGet:
            path: /healthz
            port: 8080
          initialDelaySeconds: 3
          periodSeconds: 30
      volumes:
      - emptyDir: {}
        name: static-files
