sentry-kube supports merging of values and override files based on globbing files based on a name prefix. Eg.
default.yaml
default_teamfoo.yaml
will both be picked up and merged.
In https://github.com/getsentry/ops/pull/19846 I added a 2nd gke cluster as part of a migration. I didn't want to destroy and recreate the existing cluster (yet) so I decided to name the 2nd cluster <cluster>-v2.
This ended up causing a "merge conflict" because the override files for both clusters were being picked up by the original cluster.
Example CI failure: https://github.com/getsentry/ops/actions/runs/23512108724/job/68435488008?pr=19846
ValueError: Conflict detected when merging file 'seer-sandbox.yaml': duplicate key 'namespaces'
Unsure of the best way to fix it, some possible options:
- Use filename conventions - I believe all of our clusters generally use
- as separator, and our values files use _ when they're meant to be globbed - we could explicitly glob only on _ suffix matches
- Provide a way to configure whether globbing should be enabled or not for a cluster or service
- Other options?
sentry-kube supports merging of values and override files based on globbing files based on a name prefix. Eg.
default.yamldefault_teamfoo.yamlwill both be picked up and merged.
In https://github.com/getsentry/ops/pull/19846 I added a 2nd gke cluster as part of a migration. I didn't want to destroy and recreate the existing cluster (yet) so I decided to name the 2nd cluster
<cluster>-v2.This ended up causing a "merge conflict" because the override files for both clusters were being picked up by the original cluster.
Example CI failure: https://github.com/getsentry/ops/actions/runs/23512108724/job/68435488008?pr=19846
Unsure of the best way to fix it, some possible options:
-as separator, and our values files use_when they're meant to be globbed - we could explicitly glob only on_suffix matches