mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-06 11:42:14 +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:
@@ -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
|
||||
|
Reference in New Issue
Block a user