apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/component: controller
    app.kubernetes.io/managed-by: karavel
    app.kubernetes.io/name: cert-manager
    app.kubernetes.io/part-of: cert-manager
    app.kubernetes.io/version: 1.6.0
    karavel.io/component-name: cert-manager
    karavel.io/component-version: 0.1.0-SNAPSHOT
  name: cert-manager
  namespace: cert-manager
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/component: controller
      app.kubernetes.io/managed-by: karavel
      app.kubernetes.io/name: cert-manager
      app.kubernetes.io/part-of: cert-manager
      karavel.io/component-name: cert-manager
  template:
    metadata:
      labels:
        app.kubernetes.io/component: controller
        app.kubernetes.io/managed-by: karavel
        app.kubernetes.io/name: cert-manager
        app.kubernetes.io/part-of: cert-manager
        app.kubernetes.io/version: 1.6.0
        karavel.io/component-name: cert-manager
        karavel.io/component-version: 0.1.0-SNAPSHOT
    spec:
      containers:
      - args:
        - --v=2
        - --cluster-resource-namespace=$(POD_NAMESPACE)
        - --leader-election-namespace=$(POD_NAMESPACE)
        - --cluster-resource-namespace=$(POD_NAMESPACE)
        - --enable-certificate-owner-ref=true
        env:
        - name: POD_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        image: quay.io/jetstack/cert-manager-controller:v1.6.0
        imagePullPolicy: IfNotPresent
        name: cert-manager
        ports:
        - containerPort: 9402
          name: metrics
          protocol: TCP
      priorityClassName: system-cluster-critical
      securityContext:
        fsGroup: 1001
        runAsNonRoot: true
        runAsUser: 1001
      serviceAccountName: cert-manager
