---
apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    linkerd.io/inject: enabled
  labels:
    app.kubernetes.io/version: v1
    app.kubernetes.io/name: dex
  name: dex
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/version: v1
      app.kubernetes.io/name: dex
  template:
    metadata:
      labels:
        app.kubernetes.io/version: v1
        app.kubernetes.io/name: dex
    spec:
      containers:
        - image: dexidp/dex:v2.31.1
          imagePullPolicy: IfNotPresent
          name: dex
          command:
            - dex
          args:
            - serve
            - /config/config.yml
          ports:
            - name: callback
              containerPort: 5555
              protocol: TCP
            - name: web
              containerPort: 5556
              protocol: TCP
            - name: telemetry
              containerPort: 5558
              protocol: TCP
            - name: grpc
              containerPort: 5557
              protocol: TCP
          volumeMounts:
            - mountPath: /config
              name: config
              readOnly: true
      volumes:
        - name: config
          configMap:
            name: dex-config
            items:
              - key: config.yml
                path: config.yml
