Skip to content

Controller selector should not default to template labels #50339

@crimsonfaith91

Description

@crimsonfaith91

/kind bug

What happened:
Currently, obj.Spec.Selector.MatchLabels is set to obj.Spec.Template.Labels if obj.Spec.Template.Labels != nil && obj.Spec.Selector == nil. We should not perform this defaulting operation as controller selectors are meant to be immutable.

What you expected to happen:
No defaulting operation happens for controller selectors.

/sig apps

Metadata

Metadata

Labels

kind/bugCategorizes issue or PR as related to a bug.sig/appsCategorizes an issue or PR as relevant to SIG Apps.

Type

No type
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