fluxcd-flux2/manifests/integrations/registry-credentials-sync/_cronjobs/_base/kubectl-patch.yaml
Stefan Prodan 8a3e5790f5
Use multi-arch image for kubectl
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-09-30 11:04:04 +03:00

30 lines
750 B
YAML

apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: credentials-sync
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: {}