-
Notifications
You must be signed in to change notification settings - Fork 1.4k
CRDs: allow patch merge for ScaledObject's and ScaledJob's triggers #7553
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -367,6 +367,8 @@ spec: | |
| type: object | ||
| minItems: 1 | ||
| type: array | ||
| x-kubernetes-patch-merge-key: name | ||
| x-kubernetes-patch-strategy: merge | ||
|
Comment on lines
+370
to
+371
|
||
| required: | ||
| - scaleTargetRef | ||
| - triggers | ||
|
|
||
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.
triggersis being made an associative list keyed byname, butScaleTriggers.nameis optional and (per schema) can be an empty string. Withx-kubernetes-patch-strategy: merge, unnamed/empty-name triggers will all share the same merge key, which can cause Kustomize/strategic-merge patches to unexpectedly overwrite or drop triggers. Consider tightening the schema fortriggers[].name(eg minLength + clear description that it must be set uniquely when using overlays), and/or using the structural-schema list markers (x-kubernetes-list-type: map+x-kubernetes-list-map-keys: ["name"]) to make the intent explicit.