allErrs=append(allErrs,field.Required(fldPath,fmt.Sprintf("when session affinity type is %s",api.ServiceAffinityClientIP)))
returnallErrs
}
ifconfig.ClientIP==nil{
allErrs=append(allErrs,field.Required(fldPath.Child("clientIP"),fmt.Sprintf("when session affinity type is %s",api.ServiceAffinityClientIP)))
returnallErrs
}
ifconfig.ClientIP.TimeoutSeconds==nil{
allErrs=append(allErrs,field.Required(fldPath.Child("clientIP").Child("timeoutSeconds"),fmt.Sprintf("when session affinity type is %s",api.ServiceAffinityClientIP)))
allErrs=append(allErrs,field.Forbidden(specPath.Child("sessionAffinityConfig"),fmt.Sprintf("must not be set when session affinity is %s",string(api.ServiceAffinityNone))))