apiVersion: apps/v1
kind: Deployment
metadata:
  name: configmapsecret-controller
  namespace: kube-system
  labels:
    app.kubernetes.io/name: configmapsecret-controller
    app.kubernetes.io/version: 0.4.0
spec:
  selector:
    matchLabels: 
      app.kubernetes.io/name: configmapsecret-controller
  template:
    metadata:
      labels:
        app.kubernetes.io/name: configmapsecret-controller
        app.kubernetes.io/version: 0.4.0
    spec:
      containers:
        - name: controller
          image: mzinc/configmapsecret-controller:v0.5.1
          imagePullPolicy: Always
          command:
            - /configmapsecret-controller
            - --health-addr=:9090
            - --metrics-addr=:9091
            - --enable-leader-election
          ports:
            - name: http-health
              containerPort: 9090
            - name: http-metrics
              containerPort: 9091
          livenessProbe:
            httpGet:
              path: /healthz
              port: http-health
          resources:
            limits:
              cpu: 100m
              memory: 50Mi
            requests:
              cpu: 100m
              memory: 50Mi
      securityContext:
        runAsNonRoot: true
        runAsUser: 65534
      serviceAccountName: configmapsecret-controller
