mirror of https://github.com/kubernetes/kops.git
				
				
				
			Allow multi-CNI setups to set usesSecondaryIP (#10828)
* validation.go: remove checks on CNI * move CNI block check to allow option with others CNI
This commit is contained in:
		
							parent
							
								
									c802127528
								
							
						
					
					
						commit
						9d8dec60d6
					
				| 
						 | 
				
			
			@ -541,13 +541,6 @@ func validateNetworking(cluster *kops.Cluster, v *kops.NetworkingSpec, fldPath *
 | 
			
		|||
		optionTaken = true
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if v.CNI != nil {
 | 
			
		||||
		if optionTaken {
 | 
			
		||||
			allErrs = append(allErrs, field.Forbidden(fldPath.Child("cni"), "only one networking option permitted"))
 | 
			
		||||
		}
 | 
			
		||||
		optionTaken = true
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if v.Kopeio != nil {
 | 
			
		||||
		if optionTaken {
 | 
			
		||||
			allErrs = append(allErrs, field.Forbidden(fldPath.Child("kopeio"), "only one networking option permitted"))
 | 
			
		||||
| 
						 | 
				
			
			@ -555,6 +548,10 @@ func validateNetworking(cluster *kops.Cluster, v *kops.NetworkingSpec, fldPath *
 | 
			
		|||
		optionTaken = true
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if v.CNI != nil && optionTaken {
 | 
			
		||||
		allErrs = append(allErrs, field.Forbidden(fldPath.Child("cni"), "only one networking option permitted"))
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if v.Weave != nil {
 | 
			
		||||
		if optionTaken {
 | 
			
		||||
			allErrs = append(allErrs, field.Forbidden(fldPath.Child("weave"), "only one networking option permitted"))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue