mirror of https://github.com/kubernetes/kops.git
Add cloud ipam behind a feature flag
This commit is contained in:
parent
dc4c559d41
commit
81177dc634
|
|
@ -262,6 +262,11 @@ func TestMinimalIPv6(t *testing.T) {
|
|||
|
||||
// TestIPv6CloudIPAM runs the test on a minimum IPv6 configuration, similar to kops create cluster minimal.example.com --zones us-west-1a
|
||||
func TestIPv6CloudIPAM(t *testing.T) {
|
||||
featureflag.ParseFlags("+AWSIPv6")
|
||||
unsetFeatureFlags := func() {
|
||||
featureflag.ParseFlags("-AWSIPv6")
|
||||
}
|
||||
defer unsetFeatureFlags()
|
||||
newIntegrationTest("minimal-ipv6.example.com", "ipv6-cloudipam").
|
||||
withAddons(dnsControllerAddon).
|
||||
runTestTerraformAWS(t)
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ import (
|
|||
"k8s.io/apimachinery/pkg/util/validation/field"
|
||||
"k8s.io/kops/pkg/apis/kops"
|
||||
"k8s.io/kops/pkg/dns"
|
||||
"k8s.io/kops/pkg/featureflag"
|
||||
"k8s.io/kops/pkg/model/components"
|
||||
"k8s.io/kops/pkg/model/iam"
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
|
|
@ -267,6 +268,13 @@ func validateClusterSpec(spec *kops.ClusterSpec, c *kops.Cluster, fieldPath *fie
|
|||
}
|
||||
}
|
||||
|
||||
if spec.PodCIDRFromCloud {
|
||||
if !featureflag.AWSIPv6.Enabled() {
|
||||
allErrs = append(allErrs, field.Forbidden(fieldPath.Child("podCIDRFromCloud", "serviceAccountExternalPermissions"), "podCIDRFromCloud requires the AWSIPv6 feature flag to be enabled"))
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return allErrs
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue