apiVersion: apps/v1
kind: Deployment
metadata:
  name: certmanager-cert-manager
  namespace: "{{.NameSpace}}"
  labels:
    app: alameda
    component: certmanager-cert-manager
spec:
  replicas: 1
  selector:
    matchLabels:
      app: alameda
      component: certmanager-cert-manager
  template:
    metadata:
      labels:
        app: alameda
        component: certmanager-cert-manager 
    spec:
      serviceAccountName: certmanager-cert-manager
      containers:
        - name: cert-manager
          image: "quay.io/jetstack/cert-manager-controller:v0.9.1"
          imagePullPolicy: IfNotPresent
          args:
          - --v=2
          - --cluster-resource-namespace=$(POD_NAMESPACE)
          - --leader-election-namespace=$(POD_NAMESPACE)
          ports:
          - containerPort: 9402
          env:
          - name: POD_NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
            
