feat: add a whole-set form and clear for chart overrides

The `scheduler-k3s:charts:set` command only changed one chart override at a time, so matching a chart's stored overrides to a declared set meant reading the report, computing the difference in both directions and issuing one command per added, changed and removed property, with a failure partway through leaving a mixture of the two sets. A `--replace` flag on `scheduler-k3s:charts:set` now takes a chart name followed by `property=value` pairs and writes the declared map for that chart in a single call. Every pair is parsed before anything is written, so a rejected pair leaves the stored overrides untouched, and a pair ending in `=` stores an empty value, which the per-property form cannot express. An empty pair list is rejected rather than treated as a request to remove everything, and the new `scheduler-k3s:charts:clear` command handles that case by removing every override for a chart.
This commit is contained in:
Jose Diaz-Gonzalez committed 2026-10-24 19:34:13 -04:00
1 parent be291f3928
commit 00c3e48cf4
10 files changed
+278 -42

No files matched your search

+2 -3
View File
@@ -7,9 +7,8 @@ setup() {
}
teardown() {
dokku scheduler-k3s:charts:set traefik.service.annotations.prometheus.io/scrape >/dev/null 2>/dev/null || true
dokku scheduler-k3s:charts:set traefik.controller.config >/dev/null 2>/dev/null || true
dokku scheduler-k3s:charts:set cert-manager.installCRDs >/dev/null 2>/dev/null || true
dokku scheduler-k3s:charts:clear cert-manager >/dev/null 2>/dev/null || true
dokku scheduler-k3s:charts:clear traefik >/dev/null 2>/dev/null || true
global_teardown
}