You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Automatic merge from submit-queue
remove apps/v1beta2 defaulting codes for obj.Spec.Selector and obj.Labels
**What this PR does / why we need it**:
This PR removes defaulting codes for `obj.Spec.Selector`. 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 controllers selectors are immutable.
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes#50339
**Special notes for your reviewer**:
This PR removes defaulting codes for `apps/v1beta2` only. The defaulting codes for validation will be removed in another PR.
**Release note**:
```NONE
```
/kind bug
What happened:
Currently,
obj.Spec.Selector.MatchLabels
is set toobj.Spec.Template.Labels
ifobj.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
The text was updated successfully, but these errors were encountered: