func ValidateConditionalService(service, oldService *api.Service, allowedIPFamilies []api.IPFamily) field.ErrorList {
	var errs field.ErrorList
	// If the SCTPSupport feature is disabled, and the old object isn't using the SCTP feature, prevent the new object from using it
	if !utilfeature.DefaultFeatureGate.Enabled(features.SCTPSupport) && len(serviceSCTPFields(oldService)) == 0 {
		for _, f := range serviceSCTPFields(service) {
			errs = append(errs, field.NotSupported(f, api.ProtocolSCTP, []string{string(api.ProtocolTCP), string(api.ProtocolUDP)}))
		}
	}

	errs = append(errs, validateIPFamily(service, oldService, allowedIPFamilies)...)

	return errs
}
// ValidateConditionalService validates conditionally valid fields. allowedIPFamilies is an ordered
// list of the valid IP families (IPv4 or IPv6) that are supported. The first family in the slice
// is the cluster default, although the clusterIP here dictates the family defaulting.
ValidateConditionalService validates conditionally valid fields. allowedIPFamilies is an ordered
list of the valid IP families (IPv4 or IPv6) that are supported. The first family in the slice
is the cluster default, although the clusterIP here dictates the family defaulting.
// ValidateConditionalService validates conditionally valid fields . allowedIPFamilies is an ordered // list of the valid IP families ( IPv4 or IPv6 ) that are supported . The first family in the slice // is the cluster default although the clusterIP here dictates the family defaulting .
func ValidateConditionalService(service, oldService *api.Service, allowedIPFamilies []api.IPFamily) field.ErrorList {
	var errs field.ErrorList
	if !utilfeature.DefaultFeatureGate.Enabled(features.SCTPSupport) && len(serviceSCTPFields(oldService)) == 0 {
		for _, f := range serviceSCTPFields(service) {
			errs = append(errs, field.NotSupported(f, api.ProtocolSCTP, []string{string(api.ProtocolTCP), string(api.ProtocolUDP)}))
		}
	}
	errs = append(errs, validateIPFamily(service, oldService, allowedIPFamilies)...)
	return errs
}
func ValidateConditionalService ( service , oldService * api . Service , allowedIPFamilies [ ] api . IPFamily ) field . ErrorList { var errs field . ErrorList if ! utilfeature . DefaultFeatureGate . Enabled ( features . SCTPSupport ) && len ( serviceSCTPFields ( oldService ) ) == 0 { for _ , f := range serviceSCTPFields ( service ) { errs = append ( errs , field . NotSupported ( f , api . ProtocolSCTP , [ ] string { string ( api . ProtocolTCP ) , string ( api . ProtocolUDP ) } ) ) } } errs = append ( errs , validateIPFamily ( service , oldService , allowedIPFamilies ) ... ) return errs }
ValidateConditionalService validates conditionally valid fields.
ValidateConditionalService validates conditionally valid fields .
// If the SCTPSupport feature is disabled, and the old object isn't using the SCTP feature, prevent the new object from using it