mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2026-01-09 00:31:48 +00:00
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 ```