Skip to content

feat: configurable _values.yaml merging #145

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

Merged
merged 4 commits into from
Jul 31, 2025
Merged

Conversation

keeakita
Copy link
Member

Allow a service to add a metadata file from its root: ./sentry-kube/merge.yaml, that specifies config for how conflicting keys should be handled. This enables behavior like having mappings in different files that can be merged in an append fashion.

Fixes RELENG-3

@keeakita keeakita requested a review from rgibert July 23, 2025 19:12
@keeakita keeakita requested a review from a team as a code owner July 23, 2025 19:12
@keeakita keeakita added enhancement New feature or request Feature labels Jul 23, 2025
Copy link

linear bot commented Jul 23, 2025

Copy link
Member

@mwarkentin mwarkentin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there some examples of how this is expected to be used? Eg. within ops which services would use reject vs overwrite vs append? Which ones need alternate strategies (and why)?

Is there a good way for someone working on a service to understand which strategy the service is using?

What's the current behaviour? Is that changing?

@keeakita
Copy link
Member Author

I've updated the unit tests which will hopefully be illuminating. The defaults aren't changing here -- the default is still reject which gives you the same current day behavior. append is what we're really after -- the ability to merge hierarchies (such as a list of worker configs). replace is only included for completeness, I'm actually struggling to think of a good use case here.

@keeakita
Copy link
Member Author

As far as someone working on a service understanding the strategy, it should be pretty obvious from looking at the merge.yaml: There's a default, and then one single layer of overrides for paths (specific keys). Right now it doesn't even support any kind of recursion or paths deeper than the root. Should be pretty straightforward:

default: reject
paths:
  workers: append

@keeakita keeakita requested a review from mwarkentin July 23, 2025 22:11
@keeakita keeakita force-pushed the keeakita/merge-take2 branch 2 times, most recently from 6f2dd92 to 1d7e529 Compare July 31, 2025 17:14
@keeakita keeakita force-pushed the keeakita/merge-take2 branch from 1d7e529 to c4cd1cd Compare July 31, 2025 17:15
@keeakita keeakita merged commit a145bde into main Jul 31, 2025
7 checks passed
@keeakita keeakita deleted the keeakita/merge-take2 branch July 31, 2025 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants