apiVersion: batch/v1
kind: CronJob
metadata:
  name: dns-updater
spec:
  schedule: "*/7 * * * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: dns-updater
            image: registry.poiuytre.nl/dns-updater:0.5
            imagePullPolicy: IfNotPresent
            envFrom:
            - configMapRef:
                name: dns-updater-config
            env:
              - name:  DNS_UPDATER_GO_DADDY_API_KEY
                valueFrom:
                  secretKeyRef:
                    name: dns-updater-secret
                    key: godaddy-apikey
          restartPolicy: OnFailure
