Skip to content

Globbing conflicts for cluster prefixes #224

@mwarkentin

Description

@mwarkentin

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions