---
apiVersion: batch/v1
kind: Job
metadata:
  name: registry-aliases-patch-core-dns
  namespace: kube-system
spec:
  ttlSecondsAfterFinished: 100
  template:
    spec:
      serviceAccountName: registry-aliases-sa
      volumes:
       - name: minikube
         hostPath: 
           path: /var/lib/minikube/binaries
      containers:
       - name: core-dns-patcher
         image:  {{default "quay.io" .ImageRepository}}/{{.Images.CoreDNSPatcher}}
         imagePullPolicy: IfNotPresent
         # using the kubectl from the minikube instance
         volumeMounts:
           - mountPath: /var/lib/minikube/binaries
             name: minikube
             readOnly: true
      restartPolicy: Never
  backoffLimit: 4