apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/managed-by: karavel
    app.kubernetes.io/name: dex-operator
    app.kubernetes.io/part-of: dex
    app.kubernetes.io/version: 2.30.0
    karavel.io/component-name: dex
    karavel.io/component-version: 0.1.0-SNAPSHOT
  name: dex-operator
  namespace: dex
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/managed-by: karavel
      app.kubernetes.io/name: dex-operator
      app.kubernetes.io/part-of: dex
      karavel.io/component-name: dex
  template:
    metadata:
      labels:
        app.kubernetes.io/managed-by: karavel
        app.kubernetes.io/name: dex-operator
        app.kubernetes.io/part-of: dex
        app.kubernetes.io/version: 2.30.0
        karavel.io/component-name: dex
        karavel.io/component-version: 0.1.0-SNAPSHOT
    spec:
      containers:
      - args:
        - --health-probe-bind-address=:8081
        - --metrics-bind-address=127.0.0.1:8080
        - --leader-elect
        - --dex-default-image
        - ghcr.io/dexidp/dex:v2.30.0
        command:
        - /manager
        image: ghcr.io/karavel-io/dex-operator:main
        imagePullPolicy: IfNotPresent
        name: manager
        ports:
        - containerPort: 9443
          name: webhook-server
          protocol: TCP
        - containerPort: 8080
          name: metrics
          protocol: TCP
        resources:
          limits:
            cpu: 100m
            memory: 100Mi
          requests:
            cpu: 100m
            memory: 50Mi
        volumeMounts:
        - mountPath: /tmp/k8s-webhook-server/serving-certs
          name: cert
          readOnly: true
      restartPolicy: Always
      serviceAccountName: dex-operator
      terminationGracePeriodSeconds: 10
      volumes:
      - name: cert
        secret:
          defaultMode: 420
          secretName: dex-operator-cert
