-
Notifications
You must be signed in to change notification settings - Fork 3.8k
api: add listType markers to AlertmanagerConfig v1alpha1 #8207
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
api: add listType markers to AlertmanagerConfig v1alpha1 #8207
Conversation
4f39d3f to
ef01795
Compare
|
@simonpasquier Could you review these, please |
simonpasquier
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job! For listType=set, I'd reserve it for lists which Alertmanager rejects if they are not sets.
|
@simonpasquier have pushed the changes, please review again |
| // Labels must not be repeated (unique list). | ||
| // Special label "..." (aggregate by all possible labels), if provided, must be the only element in the list. | ||
| // +listType=set | ||
| // +listType=atomic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for being unclear but a set here is ok (because Alertmanager would fail if duplicated groupby values are provided)
|
|
||
| // muteTimeIntervals is a list of MuteTimeInterval names that will mute this route when matched, | ||
| // +listType=set | ||
| // +listType=atomic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
| MuteTimeIntervals []string `json:"muteTimeIntervals,omitempty"` | ||
| // activeTimeIntervals is a list of MuteTimeInterval names when this route should be active. | ||
| // +listType=set | ||
| // +listType=atomic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
|
@simonpasquier my bad, reverted those specific changes |
simonpasquier
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Description
Add SSA (Server-Side Apply) listType markers to all slice fields in
v1alpha1/alertmanager_config_types.goto satisfy the KAL ssatags linter.listType=atomicfor complex object lists (configs, matchers, etc.)listType=setfor unique string lists (GroupBy, MuteTimeIntervals, ActiveTimeIntervals, MrkdwnIn, Equal)Related to: #8131
Type of change
CHANGE(fix or feature that would cause existing functionality to not work as expected)FEATURE(non-breaking change which adds functionality)BUGFIX(non-breaking change which fixes an issue)ENHANCEMENT(non-breaking change which improves existing functionality)NONE(if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)Verification
Ran the linter locally, no violations left in this file
Changelog entry