apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: cert-manager
    app.kubernetes.io/component: cert-manager
    app.kubernetes.io/instance: cert-manager-v1.0.0
    app.kubernetes.io/managed-by: kfctl
    app.kubernetes.io/name: cert-manager
    app.kubernetes.io/part-of: kubeflow
    app.kubernetes.io/version: v1.0.0
    kustomize.component: cert-manager
  name: cert-manager
  namespace: cert-manager
spec:
  replicas: 1
  selector:
    matchLabels:
      app: cert-manager
      app.kubernetes.io/component: cert-manager
      app.kubernetes.io/instance: cert-manager-v1.0.0
      app.kubernetes.io/managed-by: kfctl
      app.kubernetes.io/name: cert-manager
      app.kubernetes.io/part-of: kubeflow
      app.kubernetes.io/version: v1.0.0
      kustomize.component: cert-manager
  template:
    metadata:
      annotations:
        prometheus.io/path: /metrics
        prometheus.io/port: "9402"
        prometheus.io/scrape: "true"
      labels:
        app: cert-manager
        app.kubernetes.io/component: cert-manager
        app.kubernetes.io/instance: cert-manager-v1.0.0
        app.kubernetes.io/managed-by: kfctl
        app.kubernetes.io/name: cert-manager
        app.kubernetes.io/part-of: kubeflow
        app.kubernetes.io/version: v1.0.0
        kustomize.component: cert-manager
    spec:
      containers:
      - args:
        - --v=2
        - --cluster-resource-namespace=$(POD_NAMESPACE)
        - --leader-election-namespace=kube-system
        - --webhook-namespace=$(POD_NAMESPACE)
        - --webhook-ca-secret=cert-manager-webhook-ca
        - --webhook-serving-secret=cert-manager-webhook-tls
        - --webhook-dns-names=cert-manager-webhook,cert-manager-webhook.cert-manager,cert-manager-webhook.cert-manager.svc
        env:
        - name: POD_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        image: quay.io/jetstack/cert-manager-controller:v0.11.0
        imagePullPolicy: IfNotPresent
        name: cert-manager
        ports:
        - containerPort: 9402
        resources:
          requests:
            cpu: 10m
            memory: 32Mi
      serviceAccountName: cert-manager
