mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
remove duplicate validation on services
The rest api for services was validating that, on updates, both the old and new service have the same type. That guarantees that the type is going to be the same after that, thus we don't need to validate the service type on the old and the new service.
This commit is contained in:
parent
017b359770
commit
fa7b5d86e6
@ -882,12 +882,6 @@ func isMatchingPreferDualStackClusterIPFields(oldService, service *api.Service)
|
||||
return false
|
||||
}
|
||||
|
||||
if oldService.Spec.Type != api.ServiceTypeClusterIP &&
|
||||
oldService.Spec.Type != api.ServiceTypeNodePort &&
|
||||
oldService.Spec.Type != api.ServiceTypeLoadBalancer {
|
||||
return false
|
||||
}
|
||||
|
||||
// both must be of IPFamilyPolicy==PreferDualStack
|
||||
if service.Spec.IPFamilyPolicy != nil && *(service.Spec.IPFamilyPolicy) != api.IPFamilyPolicyPreferDualStack {
|
||||
return false
|
||||
|
Loading…
Reference in New Issue
Block a user