You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
allErrs=append(allErrs, field.Invalid(field.NewPath("Cluster", "Spec", "ClusterNetwork", "Services", "CIDRBlocks"), serviceCIDR, fmt.Sprintf("failed to parse cluster service cidr: %v", err)))
423
411
}
424
-
ip:=net.ParseIP(*m.Spec.DNSServiceIP)
425
-
if!cidr.Contains(ip) {
412
+
413
+
dnsIP:=net.ParseIP(*m.Spec.DNSServiceIP)
414
+
ifdnsIP==nil { // dnsIP will be nil if the string is not a valid IP
415
+
allErrs=append(allErrs, field.Invalid(field.NewPath("Spec", "DNSServiceIP"), *m.Spec.DNSServiceIP, "must be a valid IP address"))
416
+
}
417
+
418
+
ifdnsIP!=nil&&!cidr.Contains(dnsIP) {
426
419
allErrs=append(allErrs, field.Invalid(field.NewPath("Cluster", "Spec", "ClusterNetwork", "Services", "CIDRBlocks"), serviceCIDR, "DNSServiceIP must reside within the associated cluster serviceCIDR"))
427
420
}
421
+
422
+
// AKS only supports .10 as the last octet for the DNSServiceIP.
423
+
// Refer to: https://learn.microsoft.com/en-us/azure/aks/configure-kubenet#create-an-aks-cluster-with-system-assigned-managed-identities
0 commit comments