Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: patch cas-schedule-active configmap instead of replacing #23

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Art3mK
Copy link

@Art3mK Art3mK commented Jul 9, 2024

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!

@Art3mK Art3mK requested a review from grieshaber as a code owner July 9, 2024 09:25
@Art3mK
Copy link
Author

Art3mK commented Aug 5, 2024

ping @grieshaber

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant