---
kind: Deployment
apiVersion: apps/v1
metadata:
  name: cert-manager
  namespace: cert-manager
  labels:
    app.kubernetes.io/name: cert-manager
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: cert-manager
  template:
    metadata:
      labels:
        app.kubernetes.io/name: cert-manager
    spec:
      serviceAccountName: cert-manager
      nodeSelector:
        kubernetes.io/role: worker
      containers:
        - name: cert-manager
          image: 'quay.io/jetstack/cert-manager-controller:v0.6.0-alpha.0'
          args:
            - '--cluster-resource-namespace=$(POD_NAMESPACE)'
            - '--leader-election-namespace=$(POD_NAMESPACE)'
          env:
            - name: POD_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
          resources:
            requests:
              cpu: 10m
              memory: 32Mi
