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