Add cluster options for using cloud ipam

This commit is contained in:
Ole Markus With 2021-08-22 12:36:40 +02:00
parent 5594f66df1
commit 8b76b08b4d
4 changed files with 13 additions and 0 deletions

View File

@ -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

View File

@ -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"`

View File

@ -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

View File

@ -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