---
apiVersion: apps/v1
kind: Deployment

metadata:
  name: imagepullsecret-patcher
  labels:
    app.kubernetes.io/name: imagepullsecret-patcher
    app.kubernetes.io/component: operator

spec:
  replicas: 1
  revisionHistoryLimit: 3

  strategy:
    type: Recreate

  selector:
    matchLabels:
      app.kubernetes.io/name: imagepullsecret-patcher
      app.kubernetes.io/component: operator

  template:
    metadata:
      labels:
        app.kubernetes.io/name: imagepullsecret-patcher
        app.kubernetes.io/component: operator

    spec:
      enableServiceLinks: false
      serviceAccountName: imagepullsecret-patcher

      containers:
        - name: server
          image: imagepullsecret-patcher
          imagePullPolicy: IfNotPresent

          envFrom:
            - configMapRef:
                name: imagepullsecret-patcher

          resources:
            requests:
              cpu: "0.1"
              memory: "64Mi"
            limits:
              cpu: "0.5"
              memory: "512Mi"

          volumeMounts:
            - name: dockerconfig
              mountPath: /etc/docker
              readOnly: true

      volumes:
        - name: dockerconfig
          secret:
            secretName: imagepullsecret-patcher

...
