feat: patch cas-schedule-active configmap instead of replacing
Hello!
I got a problem with current version, which force replaces cas-schedule-active configmap, cause I've deployed chart using argo cd. While configmap changes are configured to be ignored by argocd, force replacing (delete/create) forces argocd to sync originally deployed configmap, which overrides the configmap cronjob wants to create.
I got this script working fine with bitnami/kubectl:1.30 image, jq is missing from ghcr.io/codecentric/cluster-overprovisioner-helper:latest
yq in ghcr.io/codecentric/cluster-overprovisioner-helper:latest is acting weird giving me error for some reason, didn't bothered to investigate why, but this should do the same with yq, at least that works locally:
kubectl get cm "cas-schedule-{{- $schedule.name }}" -n "{{ $namespace }}" -o yaml | yq e '.data' - > /tmp/source_data.yaml
kubectl get cm "cas-schedule-active" -n "{{ $namespace }}" -o yaml | yq e '.data = load("/tmp/source_data.yaml")' - | kubectl apply -f -
Thanks!
ping @grieshaber
This pull request has been marked as stale because it has been open for 30 days with no activity. It will be automatically closed in 10 days if no further activity occurs.
ping @grieshaber
This pull request has been marked as stale because it has been open for 30 days with no activity. It will be automatically closed in 10 days if no further activity occurs.
ping @grieshaber
This pull request has been marked as stale because it has been open for 30 days with no activity. It will be automatically closed in 10 days if no further activity occurs.
ping @grieshaber @matthias-onpier
This pull request has been marked as stale because it has been open for 30 days with no activity. It will be automatically closed in 10 days if no further activity occurs.