apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: credentials-sync-eventhub
  namespace: flux-system
spec:
  jobTemplate:
    spec:
      template:
        spec:
          initContainers:
          - image: ghcr.io/fluxcd/flux-cli:v0.17.2
            name: copy-kubectl
            # it's okay to do this because kubectl is a statically linked binary
            command:
            - sh
            - -ceu
            - cp $(which kubectl) /kbin/
            resources: {}
            volumeMounts:
            - name: kbin
              mountPath: /kbin
          containers:
          - name: sync
            volumeMounts:
            - name: kbin
              mountPath: /kbin
          volumes:
          - name: kbin
            emptyDir: {}