diff --git a/k8s/crds/kops.k8s.io_clusters.yaml b/k8s/crds/kops.k8s.io_clusters.yaml index b90f247291..cc394129fe 100644 --- a/k8s/crds/kops.k8s.io_clusters.yaml +++ b/k8s/crds/kops.k8s.io_clusters.yaml @@ -4268,6 +4268,11 @@ spec: podCIDR: description: PodCIDR is the CIDR from which we allocate IPs for pods type: string + podCIDRFromCloud: + description: PodCIDRFromCloud determines if the Node's podCIDR should + be set by the cloud provider. This requires ipv6 enabled and that + instances can be given full ipv6 prefixes. + type: boolean project: description: Project is the cloud project we should use, required on GCE diff --git a/pkg/apis/kops/cluster.go b/pkg/apis/kops/cluster.go index 9330666e4b..ab4aac60dd 100644 --- a/pkg/apis/kops/cluster.go +++ b/pkg/apis/kops/cluster.go @@ -111,6 +111,9 @@ type ClusterSpec struct { ServiceClusterIPRange string `json:"serviceClusterIPRange,omitempty"` // PodCIDR is the CIDR from which we allocate IPs for pods PodCIDR string `json:"podCIDR,omitempty"` + // PodCIDRFromCloud determines if the Node's podCIDR should be set by the cloud provider. + // This requires ipv6 enabled and that instances can be given full ipv6 prefixes. + PodCIDRFromCloud bool `json:"podCIDRFromCloud,omitempty"` // NonMasqueradeCIDR is the CIDR for the internal k8s network (on which pods & services live) // It cannot overlap ServiceClusterIPRange NonMasqueradeCIDR string `json:"nonMasqueradeCIDR,omitempty"` diff --git a/pkg/apis/kops/v1alpha2/cluster.go b/pkg/apis/kops/v1alpha2/cluster.go index 0943fd9c68..783beada1f 100644 --- a/pkg/apis/kops/v1alpha2/cluster.go +++ b/pkg/apis/kops/v1alpha2/cluster.go @@ -106,6 +106,9 @@ type ClusterSpec struct { ServiceClusterIPRange string `json:"serviceClusterIPRange,omitempty"` // PodCIDR is the CIDR from which we allocate IPs for pods PodCIDR string `json:"podCIDR,omitempty"` + // PodCIDRFromCloud determines if the Node's podCIDR should be set by the cloud provider. + // This requires ipv6 enabled and that instances can be given full ipv6 prefixes. + PodCIDRFromCloud bool `json:"podCIDRFromCloud,omitempty"` //MasterIPRange string `json:",omitempty"` // NonMasqueradeCIDR is the CIDR for the internal k8s network (on which pods & services live) // It cannot overlap ServiceClusterIPRange diff --git a/pkg/apis/kops/v1alpha2/zz_generated.conversion.go b/pkg/apis/kops/v1alpha2/zz_generated.conversion.go index f2fa90b009..efcf6c4a96 100644 --- a/pkg/apis/kops/v1alpha2/zz_generated.conversion.go +++ b/pkg/apis/kops/v1alpha2/zz_generated.conversion.go @@ -2367,6 +2367,7 @@ func autoConvert_v1alpha2_ClusterSpec_To_kops_ClusterSpec(in *ClusterSpec, out * out.ClusterDNSDomain = in.ClusterDNSDomain out.ServiceClusterIPRange = in.ServiceClusterIPRange out.PodCIDR = in.PodCIDR + out.PodCIDRFromCloud = in.PodCIDRFromCloud out.NonMasqueradeCIDR = in.NonMasqueradeCIDR out.SSHAccess = in.SSHAccess out.NodePortAccess = in.NodePortAccess @@ -2779,6 +2780,7 @@ func autoConvert_kops_ClusterSpec_To_v1alpha2_ClusterSpec(in *kops.ClusterSpec, out.ClusterDNSDomain = in.ClusterDNSDomain out.ServiceClusterIPRange = in.ServiceClusterIPRange out.PodCIDR = in.PodCIDR + out.PodCIDRFromCloud = in.PodCIDRFromCloud out.NonMasqueradeCIDR = in.NonMasqueradeCIDR out.SSHAccess = in.SSHAccess out.NodePortAccess = in.NodePortAccess