Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions config/crd/bases/keda.sh_scaledjobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9056,6 +9056,8 @@ spec:
type: object
minItems: 1
type: array
x-kubernetes-patch-merge-key: name
x-kubernetes-patch-strategy: merge
Comment on lines +9059 to +9060
Copy link

Copilot AI Mar 19, 2026

Choose a reason for hiding this comment

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

triggers is being made an associative list keyed by name, but ScaleTriggers.name is optional and (per schema) can be an empty string. With x-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 for triggers[].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.

Suggested change
x-kubernetes-patch-merge-key: name
x-kubernetes-patch-strategy: merge
x-kubernetes-list-type: atomic

Copilot uses AI. Check for mistakes.
required:
- jobTargetRef
- triggers
Expand Down
2 changes: 2 additions & 0 deletions config/crd/bases/keda.sh_scaledobjects.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link

Copilot AI Mar 19, 2026

Choose a reason for hiding this comment

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

triggers is being made an associative list keyed by name, but ScaleTriggers.name is optional and (per schema) can be an empty string. With x-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 for triggers[].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.

Copilot uses AI. Check for mistakes.
required:
- scaleTargetRef
- triggers
Expand Down
Loading