mirror of https://github.com/kubernetes/kops.git
Merge pull request #15612 from johngmyers/gcp-network
v1alpha3: Rename GCE networking to GCP
This commit is contained in:
commit
b915c6047c
|
|
@ -1003,7 +1003,7 @@ func completeNetworking(options *CreateClusterOptions) func(cmd *cobra.Command,
|
||||||
}
|
}
|
||||||
|
|
||||||
if options.CloudProvider == "gce" || options.CloudProvider == "" {
|
if options.CloudProvider == "gce" || options.CloudProvider == "" {
|
||||||
completions = append(completions, "gce")
|
completions = append(completions, "gcp")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1645,6 +1645,7 @@ the removal of fields no longer in use.
|
||||||
| networking.cilium.IPTablesRulesNoinstall | networking.cilium.installIptablesRules (value inverted) |
|
| networking.cilium.IPTablesRulesNoinstall | networking.cilium.installIptablesRules (value inverted) |
|
||||||
| networking.cilium.toFqdnsDnsRejectResponseCode | networking.cilium.toFQDNsDNSRejectResponseCode |
|
| networking.cilium.toFqdnsDnsRejectResponseCode | networking.cilium.toFQDNsDNSRejectResponseCode |
|
||||||
| networking.cilium.toFqdnsEnablePoller | networking.cilium.toFQDNsEnablePoller |
|
| networking.cilium.toFqdnsEnablePoller | networking.cilium.toFQDNsEnablePoller |
|
||||||
|
| networking.gce | networking.gcp |
|
||||||
| networking.kuberouter | networking.kubeRouter |
|
| networking.kuberouter | networking.kubeRouter |
|
||||||
| nodeTerminationHandler | cloudProvider.aws.nodeTerminationHandler |
|
| nodeTerminationHandler | cloudProvider.aws.nodeTerminationHandler |
|
||||||
| nonMasqueradeCIDR | networking.nonMasqueradeCIDR |
|
| nonMasqueradeCIDR | networking.nonMasqueradeCIDR |
|
||||||
|
|
|
||||||
|
|
@ -5181,8 +5181,8 @@ spec:
|
||||||
type: integer
|
type: integer
|
||||||
type: object
|
type: object
|
||||||
gce:
|
gce:
|
||||||
description: GCENetworkingSpec is the specification of GCE's native
|
description: GCPNetworkingSpec is the specification of GCP's native
|
||||||
networking mode, using IP aliases
|
networking mode, using IP aliases.
|
||||||
type: object
|
type: object
|
||||||
kopeio:
|
kopeio:
|
||||||
description: KopeioNetworkingSpec declares that we want Kopeio
|
description: KopeioNetworkingSpec declares that we want Kopeio
|
||||||
|
|
|
||||||
|
|
@ -400,7 +400,7 @@ func (b *ContainerdBuilder) buildIPMasqueradeRules(c *fi.NodeupModelBuilderConte
|
||||||
// skips masquerading for all private CIDR ranges, but this depends on an assumption that is likely GCE-specific.
|
// skips masquerading for all private CIDR ranges, but this depends on an assumption that is likely GCE-specific.
|
||||||
// On GCE custom routes are at the network level, on AWS they are at the route-table / subnet level.
|
// On GCE custom routes are at the network level, on AWS they are at the route-table / subnet level.
|
||||||
// We cannot generally assume that because something is in the private network space, that it can reach us.
|
// We cannot generally assume that because something is in the private network space, that it can reach us.
|
||||||
// If we adopt "native" pod IPs (GCE ip-alias, AWS VPC CNI, etc) we can likely move to rules closer to the upstream ones.
|
// If we adopt "native" pod IPs (GCP ip-alias, AWS VPC CNI, etc) we can likely move to rules closer to the upstream ones.
|
||||||
script := `#!/bin/bash
|
script := `#!/bin/bash
|
||||||
# Built by kOps - do not edit
|
# Built by kOps - do not edit
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ type NetworkingSpec struct {
|
||||||
AmazonVPC *AmazonVPCNetworkingSpec `json:"amazonVPC,omitempty"`
|
AmazonVPC *AmazonVPCNetworkingSpec `json:"amazonVPC,omitempty"`
|
||||||
Cilium *CiliumNetworkingSpec `json:"cilium,omitempty"`
|
Cilium *CiliumNetworkingSpec `json:"cilium,omitempty"`
|
||||||
LyftVPC *LyftVPCNetworkingSpec `json:"lyftvpc,omitempty"`
|
LyftVPC *LyftVPCNetworkingSpec `json:"lyftvpc,omitempty"`
|
||||||
GCE *GCENetworkingSpec `json:"gce,omitempty"`
|
GCP *GCPNetworkingSpec `json:"gcp,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// UsesKubenet returns true if our networking is derived from kubenet
|
// UsesKubenet returns true if our networking is derived from kubenet
|
||||||
|
|
@ -87,8 +87,8 @@ func (n *NetworkingSpec) UsesKubenet() bool {
|
||||||
}
|
}
|
||||||
if n.Kubenet != nil {
|
if n.Kubenet != nil {
|
||||||
return true
|
return true
|
||||||
} else if n.GCE != nil {
|
} else if n.GCP != nil {
|
||||||
// GCE IP Alias networking is based on kubenet
|
// GCP IP Alias networking is based on kubenet
|
||||||
return true
|
return true
|
||||||
} else if n.External != nil {
|
} else if n.External != nil {
|
||||||
// external is based on kubenet
|
// external is based on kubenet
|
||||||
|
|
@ -505,5 +505,5 @@ type LyftVPCNetworkingSpec struct {
|
||||||
SubnetTags map[string]string `json:"subnetTags,omitempty"`
|
SubnetTags map[string]string `json:"subnetTags,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// GCENetworkingSpec is the specification of GCE's native networking mode, using IP aliases
|
// GCPNetworkingSpec is the specification of GCP's native networking mode, using IP aliases.
|
||||||
type GCENetworkingSpec struct{}
|
type GCPNetworkingSpec struct{}
|
||||||
|
|
|
||||||
|
|
@ -48,13 +48,13 @@ type NetworkingSpec struct {
|
||||||
AmazonVPC *AmazonVPCNetworkingSpec `json:"amazonvpc,omitempty"`
|
AmazonVPC *AmazonVPCNetworkingSpec `json:"amazonvpc,omitempty"`
|
||||||
Cilium *CiliumNetworkingSpec `json:"cilium,omitempty"`
|
Cilium *CiliumNetworkingSpec `json:"cilium,omitempty"`
|
||||||
LyftVPC *LyftVPCNetworkingSpec `json:"lyftvpc,omitempty"`
|
LyftVPC *LyftVPCNetworkingSpec `json:"lyftvpc,omitempty"`
|
||||||
GCE *GCENetworkingSpec `json:"gce,omitempty"`
|
GCP *GCPNetworkingSpec `json:"gce,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *NetworkingSpec) IsEmpty() bool {
|
func (s *NetworkingSpec) IsEmpty() bool {
|
||||||
return s.Classic == nil && s.Kubenet == nil && s.External == nil && s.CNI == nil && s.Kopeio == nil &&
|
return s.Classic == nil && s.Kubenet == nil && s.External == nil && s.CNI == nil && s.Kopeio == nil &&
|
||||||
s.Weave == nil && s.Flannel == nil && s.Calico == nil && s.Canal == nil && s.KubeRouter == nil &&
|
s.Weave == nil && s.Flannel == nil && s.Calico == nil && s.Canal == nil && s.KubeRouter == nil &&
|
||||||
s.Romana == nil && s.AmazonVPC == nil && s.Cilium == nil && s.LyftVPC == nil && s.GCE == nil
|
s.Romana == nil && s.AmazonVPC == nil && s.Cilium == nil && s.LyftVPC == nil && s.GCP == nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// ClassicNetworkingSpec is the specification of classic networking mode, integrated into kubernetes.
|
// ClassicNetworkingSpec is the specification of classic networking mode, integrated into kubernetes.
|
||||||
|
|
@ -626,5 +626,5 @@ type LyftVPCNetworkingSpec struct {
|
||||||
SubnetTags map[string]string `json:"subnetTags,omitempty"`
|
SubnetTags map[string]string `json:"subnetTags,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// GCENetworkingSpec is the specification of GCE's native networking mode, using IP aliases
|
// GCPNetworkingSpec is the specification of GCP's native networking mode, using IP aliases.
|
||||||
type GCENetworkingSpec struct{}
|
type GCPNetworkingSpec struct{}
|
||||||
|
|
|
||||||
|
|
@ -454,13 +454,13 @@ func RegisterConversions(s *runtime.Scheme) error {
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err := s.AddGeneratedConversionFunc((*GCENetworkingSpec)(nil), (*kops.GCENetworkingSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
if err := s.AddGeneratedConversionFunc((*GCPNetworkingSpec)(nil), (*kops.GCPNetworkingSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||||
return Convert_v1alpha2_GCENetworkingSpec_To_kops_GCENetworkingSpec(a.(*GCENetworkingSpec), b.(*kops.GCENetworkingSpec), scope)
|
return Convert_v1alpha2_GCPNetworkingSpec_To_kops_GCPNetworkingSpec(a.(*GCPNetworkingSpec), b.(*kops.GCPNetworkingSpec), scope)
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err := s.AddGeneratedConversionFunc((*kops.GCENetworkingSpec)(nil), (*GCENetworkingSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
if err := s.AddGeneratedConversionFunc((*kops.GCPNetworkingSpec)(nil), (*GCPNetworkingSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||||
return Convert_kops_GCENetworkingSpec_To_v1alpha2_GCENetworkingSpec(a.(*kops.GCENetworkingSpec), b.(*GCENetworkingSpec), scope)
|
return Convert_kops_GCPNetworkingSpec_To_v1alpha2_GCPNetworkingSpec(a.(*kops.GCPNetworkingSpec), b.(*GCPNetworkingSpec), scope)
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
@ -3782,22 +3782,22 @@ func Convert_kops_FlannelNetworkingSpec_To_v1alpha2_FlannelNetworkingSpec(in *ko
|
||||||
return autoConvert_kops_FlannelNetworkingSpec_To_v1alpha2_FlannelNetworkingSpec(in, out, s)
|
return autoConvert_kops_FlannelNetworkingSpec_To_v1alpha2_FlannelNetworkingSpec(in, out, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
func autoConvert_v1alpha2_GCENetworkingSpec_To_kops_GCENetworkingSpec(in *GCENetworkingSpec, out *kops.GCENetworkingSpec, s conversion.Scope) error {
|
func autoConvert_v1alpha2_GCPNetworkingSpec_To_kops_GCPNetworkingSpec(in *GCPNetworkingSpec, out *kops.GCPNetworkingSpec, s conversion.Scope) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert_v1alpha2_GCENetworkingSpec_To_kops_GCENetworkingSpec is an autogenerated conversion function.
|
// Convert_v1alpha2_GCPNetworkingSpec_To_kops_GCPNetworkingSpec is an autogenerated conversion function.
|
||||||
func Convert_v1alpha2_GCENetworkingSpec_To_kops_GCENetworkingSpec(in *GCENetworkingSpec, out *kops.GCENetworkingSpec, s conversion.Scope) error {
|
func Convert_v1alpha2_GCPNetworkingSpec_To_kops_GCPNetworkingSpec(in *GCPNetworkingSpec, out *kops.GCPNetworkingSpec, s conversion.Scope) error {
|
||||||
return autoConvert_v1alpha2_GCENetworkingSpec_To_kops_GCENetworkingSpec(in, out, s)
|
return autoConvert_v1alpha2_GCPNetworkingSpec_To_kops_GCPNetworkingSpec(in, out, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
func autoConvert_kops_GCENetworkingSpec_To_v1alpha2_GCENetworkingSpec(in *kops.GCENetworkingSpec, out *GCENetworkingSpec, s conversion.Scope) error {
|
func autoConvert_kops_GCPNetworkingSpec_To_v1alpha2_GCPNetworkingSpec(in *kops.GCPNetworkingSpec, out *GCPNetworkingSpec, s conversion.Scope) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert_kops_GCENetworkingSpec_To_v1alpha2_GCENetworkingSpec is an autogenerated conversion function.
|
// Convert_kops_GCPNetworkingSpec_To_v1alpha2_GCPNetworkingSpec is an autogenerated conversion function.
|
||||||
func Convert_kops_GCENetworkingSpec_To_v1alpha2_GCENetworkingSpec(in *kops.GCENetworkingSpec, out *GCENetworkingSpec, s conversion.Scope) error {
|
func Convert_kops_GCPNetworkingSpec_To_v1alpha2_GCPNetworkingSpec(in *kops.GCPNetworkingSpec, out *GCPNetworkingSpec, s conversion.Scope) error {
|
||||||
return autoConvert_kops_GCENetworkingSpec_To_v1alpha2_GCENetworkingSpec(in, out, s)
|
return autoConvert_kops_GCPNetworkingSpec_To_v1alpha2_GCPNetworkingSpec(in, out, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
func autoConvert_v1alpha2_GossipConfig_To_kops_GossipConfig(in *GossipConfig, out *kops.GossipConfig, s conversion.Scope) error {
|
func autoConvert_v1alpha2_GossipConfig_To_kops_GossipConfig(in *GossipConfig, out *kops.GossipConfig, s conversion.Scope) error {
|
||||||
|
|
@ -6010,14 +6010,14 @@ func autoConvert_v1alpha2_NetworkingSpec_To_kops_NetworkingSpec(in *NetworkingSp
|
||||||
} else {
|
} else {
|
||||||
out.LyftVPC = nil
|
out.LyftVPC = nil
|
||||||
}
|
}
|
||||||
if in.GCE != nil {
|
if in.GCP != nil {
|
||||||
in, out := &in.GCE, &out.GCE
|
in, out := &in.GCP, &out.GCP
|
||||||
*out = new(kops.GCENetworkingSpec)
|
*out = new(kops.GCPNetworkingSpec)
|
||||||
if err := Convert_v1alpha2_GCENetworkingSpec_To_kops_GCENetworkingSpec(*in, *out, s); err != nil {
|
if err := Convert_v1alpha2_GCPNetworkingSpec_To_kops_GCPNetworkingSpec(*in, *out, s); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
out.GCE = nil
|
out.GCP = nil
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
@ -6191,14 +6191,14 @@ func autoConvert_kops_NetworkingSpec_To_v1alpha2_NetworkingSpec(in *kops.Network
|
||||||
} else {
|
} else {
|
||||||
out.LyftVPC = nil
|
out.LyftVPC = nil
|
||||||
}
|
}
|
||||||
if in.GCE != nil {
|
if in.GCP != nil {
|
||||||
in, out := &in.GCE, &out.GCE
|
in, out := &in.GCP, &out.GCP
|
||||||
*out = new(GCENetworkingSpec)
|
*out = new(GCPNetworkingSpec)
|
||||||
if err := Convert_kops_GCENetworkingSpec_To_v1alpha2_GCENetworkingSpec(*in, *out, s); err != nil {
|
if err := Convert_kops_GCPNetworkingSpec_To_v1alpha2_GCPNetworkingSpec(*in, *out, s); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
out.GCE = nil
|
out.GCP = nil
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2094,17 +2094,17 @@ func (in *FlannelNetworkingSpec) DeepCopy() *FlannelNetworkingSpec {
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
func (in *GCENetworkingSpec) DeepCopyInto(out *GCENetworkingSpec) {
|
func (in *GCPNetworkingSpec) DeepCopyInto(out *GCPNetworkingSpec) {
|
||||||
*out = *in
|
*out = *in
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCENetworkingSpec.
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPNetworkingSpec.
|
||||||
func (in *GCENetworkingSpec) DeepCopy() *GCENetworkingSpec {
|
func (in *GCPNetworkingSpec) DeepCopy() *GCPNetworkingSpec {
|
||||||
if in == nil {
|
if in == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
out := new(GCENetworkingSpec)
|
out := new(GCPNetworkingSpec)
|
||||||
in.DeepCopyInto(out)
|
in.DeepCopyInto(out)
|
||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|
@ -4428,9 +4428,9 @@ func (in *NetworkingSpec) DeepCopyInto(out *NetworkingSpec) {
|
||||||
*out = new(LyftVPCNetworkingSpec)
|
*out = new(LyftVPCNetworkingSpec)
|
||||||
(*in).DeepCopyInto(*out)
|
(*in).DeepCopyInto(*out)
|
||||||
}
|
}
|
||||||
if in.GCE != nil {
|
if in.GCP != nil {
|
||||||
in, out := &in.GCE, &out.GCE
|
in, out := &in.GCP, &out.GCP
|
||||||
*out = new(GCENetworkingSpec)
|
*out = new(GCPNetworkingSpec)
|
||||||
**out = **in
|
**out = **in
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ type NetworkingSpec struct {
|
||||||
AmazonVPC *AmazonVPCNetworkingSpec `json:"amazonVPC,omitempty"`
|
AmazonVPC *AmazonVPCNetworkingSpec `json:"amazonVPC,omitempty"`
|
||||||
Cilium *CiliumNetworkingSpec `json:"cilium,omitempty"`
|
Cilium *CiliumNetworkingSpec `json:"cilium,omitempty"`
|
||||||
LyftVPC *kops.LyftVPCNetworkingSpec `json:"-"`
|
LyftVPC *kops.LyftVPCNetworkingSpec `json:"-"`
|
||||||
GCE *GCENetworkingSpec `json:"gce,omitempty"`
|
GCP *GCPNetworkingSpec `json:"gcp,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// KubenetNetworkingSpec is the specification for kubenet networking, largely integrated but intended to replace classic
|
// KubenetNetworkingSpec is the specification for kubenet networking, largely integrated but intended to replace classic
|
||||||
|
|
@ -462,5 +462,5 @@ type HubbleSpec struct {
|
||||||
Metrics []string `json:"metrics,omitempty"`
|
Metrics []string `json:"metrics,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// GCENetworkingSpec is the specification of GCE's native networking mode, using IP aliases
|
// GCPNetworkingSpec is the specification of GCP's native networking mode, using IP aliases.
|
||||||
type GCENetworkingSpec struct{}
|
type GCPNetworkingSpec struct{}
|
||||||
|
|
|
||||||
|
|
@ -514,16 +514,6 @@ func RegisterConversions(s *runtime.Scheme) error {
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err := s.AddGeneratedConversionFunc((*GCENetworkingSpec)(nil), (*kops.GCENetworkingSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
|
||||||
return Convert_v1alpha3_GCENetworkingSpec_To_kops_GCENetworkingSpec(a.(*GCENetworkingSpec), b.(*kops.GCENetworkingSpec), scope)
|
|
||||||
}); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
if err := s.AddGeneratedConversionFunc((*kops.GCENetworkingSpec)(nil), (*GCENetworkingSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
|
||||||
return Convert_kops_GCENetworkingSpec_To_v1alpha3_GCENetworkingSpec(a.(*kops.GCENetworkingSpec), b.(*GCENetworkingSpec), scope)
|
|
||||||
}); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
if err := s.AddGeneratedConversionFunc((*GCESpec)(nil), (*kops.GCESpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
if err := s.AddGeneratedConversionFunc((*GCESpec)(nil), (*kops.GCESpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||||
return Convert_v1alpha3_GCESpec_To_kops_GCESpec(a.(*GCESpec), b.(*kops.GCESpec), scope)
|
return Convert_v1alpha3_GCESpec_To_kops_GCESpec(a.(*GCESpec), b.(*kops.GCESpec), scope)
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
|
|
@ -534,6 +524,16 @@ func RegisterConversions(s *runtime.Scheme) error {
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
if err := s.AddGeneratedConversionFunc((*GCPNetworkingSpec)(nil), (*kops.GCPNetworkingSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||||
|
return Convert_v1alpha3_GCPNetworkingSpec_To_kops_GCPNetworkingSpec(a.(*GCPNetworkingSpec), b.(*kops.GCPNetworkingSpec), scope)
|
||||||
|
}); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if err := s.AddGeneratedConversionFunc((*kops.GCPNetworkingSpec)(nil), (*GCPNetworkingSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||||
|
return Convert_kops_GCPNetworkingSpec_To_v1alpha3_GCPNetworkingSpec(a.(*kops.GCPNetworkingSpec), b.(*GCPNetworkingSpec), scope)
|
||||||
|
}); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
if err := s.AddGeneratedConversionFunc((*GossipConfig)(nil), (*kops.GossipConfig)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
if err := s.AddGeneratedConversionFunc((*GossipConfig)(nil), (*kops.GossipConfig)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||||
return Convert_v1alpha3_GossipConfig_To_kops_GossipConfig(a.(*GossipConfig), b.(*kops.GossipConfig), scope)
|
return Convert_v1alpha3_GossipConfig_To_kops_GossipConfig(a.(*GossipConfig), b.(*kops.GossipConfig), scope)
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
|
|
@ -4017,24 +4017,6 @@ func Convert_kops_FlannelNetworkingSpec_To_v1alpha3_FlannelNetworkingSpec(in *ko
|
||||||
return autoConvert_kops_FlannelNetworkingSpec_To_v1alpha3_FlannelNetworkingSpec(in, out, s)
|
return autoConvert_kops_FlannelNetworkingSpec_To_v1alpha3_FlannelNetworkingSpec(in, out, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
func autoConvert_v1alpha3_GCENetworkingSpec_To_kops_GCENetworkingSpec(in *GCENetworkingSpec, out *kops.GCENetworkingSpec, s conversion.Scope) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Convert_v1alpha3_GCENetworkingSpec_To_kops_GCENetworkingSpec is an autogenerated conversion function.
|
|
||||||
func Convert_v1alpha3_GCENetworkingSpec_To_kops_GCENetworkingSpec(in *GCENetworkingSpec, out *kops.GCENetworkingSpec, s conversion.Scope) error {
|
|
||||||
return autoConvert_v1alpha3_GCENetworkingSpec_To_kops_GCENetworkingSpec(in, out, s)
|
|
||||||
}
|
|
||||||
|
|
||||||
func autoConvert_kops_GCENetworkingSpec_To_v1alpha3_GCENetworkingSpec(in *kops.GCENetworkingSpec, out *GCENetworkingSpec, s conversion.Scope) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Convert_kops_GCENetworkingSpec_To_v1alpha3_GCENetworkingSpec is an autogenerated conversion function.
|
|
||||||
func Convert_kops_GCENetworkingSpec_To_v1alpha3_GCENetworkingSpec(in *kops.GCENetworkingSpec, out *GCENetworkingSpec, s conversion.Scope) error {
|
|
||||||
return autoConvert_kops_GCENetworkingSpec_To_v1alpha3_GCENetworkingSpec(in, out, s)
|
|
||||||
}
|
|
||||||
|
|
||||||
func autoConvert_v1alpha3_GCESpec_To_kops_GCESpec(in *GCESpec, out *kops.GCESpec, s conversion.Scope) error {
|
func autoConvert_v1alpha3_GCESpec_To_kops_GCESpec(in *GCESpec, out *kops.GCESpec, s conversion.Scope) error {
|
||||||
out.Project = in.Project
|
out.Project = in.Project
|
||||||
out.ServiceAccount = in.ServiceAccount
|
out.ServiceAccount = in.ServiceAccount
|
||||||
|
|
@ -4081,6 +4063,24 @@ func Convert_kops_GCESpec_To_v1alpha3_GCESpec(in *kops.GCESpec, out *GCESpec, s
|
||||||
return autoConvert_kops_GCESpec_To_v1alpha3_GCESpec(in, out, s)
|
return autoConvert_kops_GCESpec_To_v1alpha3_GCESpec(in, out, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func autoConvert_v1alpha3_GCPNetworkingSpec_To_kops_GCPNetworkingSpec(in *GCPNetworkingSpec, out *kops.GCPNetworkingSpec, s conversion.Scope) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert_v1alpha3_GCPNetworkingSpec_To_kops_GCPNetworkingSpec is an autogenerated conversion function.
|
||||||
|
func Convert_v1alpha3_GCPNetworkingSpec_To_kops_GCPNetworkingSpec(in *GCPNetworkingSpec, out *kops.GCPNetworkingSpec, s conversion.Scope) error {
|
||||||
|
return autoConvert_v1alpha3_GCPNetworkingSpec_To_kops_GCPNetworkingSpec(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_kops_GCPNetworkingSpec_To_v1alpha3_GCPNetworkingSpec(in *kops.GCPNetworkingSpec, out *GCPNetworkingSpec, s conversion.Scope) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert_kops_GCPNetworkingSpec_To_v1alpha3_GCPNetworkingSpec is an autogenerated conversion function.
|
||||||
|
func Convert_kops_GCPNetworkingSpec_To_v1alpha3_GCPNetworkingSpec(in *kops.GCPNetworkingSpec, out *GCPNetworkingSpec, s conversion.Scope) error {
|
||||||
|
return autoConvert_kops_GCPNetworkingSpec_To_v1alpha3_GCPNetworkingSpec(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
func autoConvert_v1alpha3_GossipConfig_To_kops_GossipConfig(in *GossipConfig, out *kops.GossipConfig, s conversion.Scope) error {
|
func autoConvert_v1alpha3_GossipConfig_To_kops_GossipConfig(in *GossipConfig, out *kops.GossipConfig, s conversion.Scope) error {
|
||||||
out.Protocol = in.Protocol
|
out.Protocol = in.Protocol
|
||||||
out.Listen = in.Listen
|
out.Listen = in.Listen
|
||||||
|
|
@ -6323,14 +6323,14 @@ func autoConvert_v1alpha3_NetworkingSpec_To_kops_NetworkingSpec(in *NetworkingSp
|
||||||
out.Cilium = nil
|
out.Cilium = nil
|
||||||
}
|
}
|
||||||
out.LyftVPC = in.LyftVPC
|
out.LyftVPC = in.LyftVPC
|
||||||
if in.GCE != nil {
|
if in.GCP != nil {
|
||||||
in, out := &in.GCE, &out.GCE
|
in, out := &in.GCP, &out.GCP
|
||||||
*out = new(kops.GCENetworkingSpec)
|
*out = new(kops.GCPNetworkingSpec)
|
||||||
if err := Convert_v1alpha3_GCENetworkingSpec_To_kops_GCENetworkingSpec(*in, *out, s); err != nil {
|
if err := Convert_v1alpha3_GCPNetworkingSpec_To_kops_GCPNetworkingSpec(*in, *out, s); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
out.GCE = nil
|
out.GCP = nil
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
@ -6480,14 +6480,14 @@ func autoConvert_kops_NetworkingSpec_To_v1alpha3_NetworkingSpec(in *kops.Network
|
||||||
out.Cilium = nil
|
out.Cilium = nil
|
||||||
}
|
}
|
||||||
out.LyftVPC = in.LyftVPC
|
out.LyftVPC = in.LyftVPC
|
||||||
if in.GCE != nil {
|
if in.GCP != nil {
|
||||||
in, out := &in.GCE, &out.GCE
|
in, out := &in.GCP, &out.GCP
|
||||||
*out = new(GCENetworkingSpec)
|
*out = new(GCPNetworkingSpec)
|
||||||
if err := Convert_kops_GCENetworkingSpec_To_v1alpha3_GCENetworkingSpec(*in, *out, s); err != nil {
|
if err := Convert_kops_GCPNetworkingSpec_To_v1alpha3_GCPNetworkingSpec(*in, *out, s); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
out.GCE = nil
|
out.GCP = nil
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1983,22 +1983,6 @@ func (in *FlannelNetworkingSpec) DeepCopy() *FlannelNetworkingSpec {
|
||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *GCENetworkingSpec) DeepCopyInto(out *GCENetworkingSpec) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCENetworkingSpec.
|
|
||||||
func (in *GCENetworkingSpec) DeepCopy() *GCENetworkingSpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(GCENetworkingSpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
func (in *GCESpec) DeepCopyInto(out *GCESpec) {
|
func (in *GCESpec) DeepCopyInto(out *GCESpec) {
|
||||||
*out = *in
|
*out = *in
|
||||||
|
|
@ -2035,6 +2019,22 @@ func (in *GCESpec) DeepCopy() *GCESpec {
|
||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
|
func (in *GCPNetworkingSpec) DeepCopyInto(out *GCPNetworkingSpec) {
|
||||||
|
*out = *in
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPNetworkingSpec.
|
||||||
|
func (in *GCPNetworkingSpec) DeepCopy() *GCPNetworkingSpec {
|
||||||
|
if in == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
out := new(GCPNetworkingSpec)
|
||||||
|
in.DeepCopyInto(out)
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
func (in *GossipConfig) DeepCopyInto(out *GossipConfig) {
|
func (in *GossipConfig) DeepCopyInto(out *GossipConfig) {
|
||||||
*out = *in
|
*out = *in
|
||||||
|
|
@ -4358,9 +4358,9 @@ func (in *NetworkingSpec) DeepCopyInto(out *NetworkingSpec) {
|
||||||
*out = new(kops.LyftVPCNetworkingSpec)
|
*out = new(kops.LyftVPCNetworkingSpec)
|
||||||
(*in).DeepCopyInto(*out)
|
(*in).DeepCopyInto(*out)
|
||||||
}
|
}
|
||||||
if in.GCE != nil {
|
if in.GCP != nil {
|
||||||
in, out := &in.GCE, &out.GCE
|
in, out := &in.GCP, &out.GCP
|
||||||
*out = new(GCENetworkingSpec)
|
*out = new(GCPNetworkingSpec)
|
||||||
**out = **in
|
**out = **in
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
|
|
||||||
|
|
@ -1128,12 +1128,12 @@ func validateNetworking(cluster *kops.Cluster, v *kops.NetworkingSpec, fldPath *
|
||||||
allErrs = append(allErrs, field.Forbidden(fldPath.Child("lyftvp"), "support for LyftVPC has been removed"))
|
allErrs = append(allErrs, field.Forbidden(fldPath.Child("lyftvp"), "support for LyftVPC has been removed"))
|
||||||
}
|
}
|
||||||
|
|
||||||
if v.GCE != nil {
|
if v.GCP != nil {
|
||||||
if optionTaken {
|
if optionTaken {
|
||||||
allErrs = append(allErrs, field.Forbidden(fldPath.Child("gce"), "only one networking option permitted"))
|
allErrs = append(allErrs, field.Forbidden(fldPath.Child("gcp"), "only one networking option permitted"))
|
||||||
}
|
}
|
||||||
|
|
||||||
allErrs = append(allErrs, validateNetworkingGCE(c, v.GCE, fldPath.Child("gce"))...)
|
allErrs = append(allErrs, validateNetworkingGCP(c, v.GCP, fldPath.Child("gcp"))...)
|
||||||
}
|
}
|
||||||
|
|
||||||
return allErrs
|
return allErrs
|
||||||
|
|
@ -1300,15 +1300,15 @@ func validateNetworkingCilium(cluster *kops.Cluster, v *kops.CiliumNetworkingSpe
|
||||||
return allErrs
|
return allErrs
|
||||||
}
|
}
|
||||||
|
|
||||||
func validateNetworkingGCE(c *kops.ClusterSpec, v *kops.GCENetworkingSpec, fldPath *field.Path) field.ErrorList {
|
func validateNetworkingGCP(c *kops.ClusterSpec, v *kops.GCPNetworkingSpec, fldPath *field.Path) field.ErrorList {
|
||||||
allErrs := field.ErrorList{}
|
allErrs := field.ErrorList{}
|
||||||
|
|
||||||
if c.GetCloudProvider() != kops.CloudProviderGCE {
|
if c.GetCloudProvider() != kops.CloudProviderGCE {
|
||||||
allErrs = append(allErrs, field.Forbidden(fldPath, "GCE networking is supported only when on GCP"))
|
allErrs = append(allErrs, field.Forbidden(fldPath, "GCP networking is supported only when on GCP"))
|
||||||
}
|
}
|
||||||
|
|
||||||
if c.IsIPv6Only() {
|
if c.IsIPv6Only() {
|
||||||
allErrs = append(allErrs, field.Forbidden(fldPath, "GCE networking does not support IPv6"))
|
allErrs = append(allErrs, field.Forbidden(fldPath, "GCP networking does not support IPv6"))
|
||||||
}
|
}
|
||||||
|
|
||||||
return allErrs
|
return allErrs
|
||||||
|
|
|
||||||
|
|
@ -2146,22 +2146,6 @@ func (in *FlannelNetworkingSpec) DeepCopy() *FlannelNetworkingSpec {
|
||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
||||||
func (in *GCENetworkingSpec) DeepCopyInto(out *GCENetworkingSpec) {
|
|
||||||
*out = *in
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCENetworkingSpec.
|
|
||||||
func (in *GCENetworkingSpec) DeepCopy() *GCENetworkingSpec {
|
|
||||||
if in == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := new(GCENetworkingSpec)
|
|
||||||
in.DeepCopyInto(out)
|
|
||||||
return out
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
func (in *GCESpec) DeepCopyInto(out *GCESpec) {
|
func (in *GCESpec) DeepCopyInto(out *GCESpec) {
|
||||||
*out = *in
|
*out = *in
|
||||||
|
|
@ -2198,6 +2182,22 @@ func (in *GCESpec) DeepCopy() *GCESpec {
|
||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
|
func (in *GCPNetworkingSpec) DeepCopyInto(out *GCPNetworkingSpec) {
|
||||||
|
*out = *in
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPNetworkingSpec.
|
||||||
|
func (in *GCPNetworkingSpec) DeepCopy() *GCPNetworkingSpec {
|
||||||
|
if in == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
out := new(GCPNetworkingSpec)
|
||||||
|
in.DeepCopyInto(out)
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
func (in *GossipConfig) DeepCopyInto(out *GossipConfig) {
|
func (in *GossipConfig) DeepCopyInto(out *GossipConfig) {
|
||||||
*out = *in
|
*out = *in
|
||||||
|
|
@ -4576,9 +4576,9 @@ func (in *NetworkingSpec) DeepCopyInto(out *NetworkingSpec) {
|
||||||
*out = new(LyftVPCNetworkingSpec)
|
*out = new(LyftVPCNetworkingSpec)
|
||||||
(*in).DeepCopyInto(*out)
|
(*in).DeepCopyInto(*out)
|
||||||
}
|
}
|
||||||
if in.GCE != nil {
|
if in.GCP != nil {
|
||||||
in, out := &in.GCE, &out.GCE
|
in, out := &in.GCP, &out.GCP
|
||||||
*out = new(GCENetworkingSpec)
|
*out = new(GCPNetworkingSpec)
|
||||||
**out = **in
|
**out = **in
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ func (b *AWSCloudControllerManagerOptionsBuilder) BuildOptions(o interface{}) er
|
||||||
networking := &clusterSpec.Networking
|
networking := &clusterSpec.Networking
|
||||||
if networking.Kubenet != nil {
|
if networking.Kubenet != nil {
|
||||||
eccm.ConfigureCloudRoutes = fi.PtrTo(true)
|
eccm.ConfigureCloudRoutes = fi.PtrTo(true)
|
||||||
} else if networking.GCE != nil {
|
} else if networking.GCP != nil {
|
||||||
eccm.ConfigureCloudRoutes = fi.PtrTo(false)
|
eccm.ConfigureCloudRoutes = fi.PtrTo(false)
|
||||||
eccm.CIDRAllocatorType = fi.PtrTo("CloudAllocator")
|
eccm.CIDRAllocatorType = fi.PtrTo("CloudAllocator")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -58,8 +58,8 @@ func (b *GCPCloudControllerManagerOptionsBuilder) BuildOptions(options interface
|
||||||
ccmConfig.ClusterCIDR = clusterSpec.Networking.PodCIDR
|
ccmConfig.ClusterCIDR = clusterSpec.Networking.PodCIDR
|
||||||
}
|
}
|
||||||
|
|
||||||
if clusterSpec.Networking.GCE != nil {
|
if clusterSpec.Networking.GCP != nil {
|
||||||
// "GCE" networking mode is called "ip-alias" or "vpc-native" on GKE.
|
// "GCP" networking mode is called "ip-alias" or "vpc-native" on GKE.
|
||||||
// We don't need to configure routes if we are using "real" IPs.
|
// We don't need to configure routes if we are using "real" IPs.
|
||||||
ccmConfig.ConfigureCloudRoutes = fi.PtrTo(false)
|
ccmConfig.ConfigureCloudRoutes = fi.PtrTo(false)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -148,7 +148,7 @@ func (b *KubeControllerManagerOptionsBuilder) BuildOptions(o interface{}) error
|
||||||
networking := &clusterSpec.Networking
|
networking := &clusterSpec.Networking
|
||||||
if networking.Kubenet != nil {
|
if networking.Kubenet != nil {
|
||||||
kcm.ConfigureCloudRoutes = fi.PtrTo(true)
|
kcm.ConfigureCloudRoutes = fi.PtrTo(true)
|
||||||
} else if networking.GCE != nil {
|
} else if networking.GCP != nil {
|
||||||
kcm.ConfigureCloudRoutes = fi.PtrTo(false)
|
kcm.ConfigureCloudRoutes = fi.PtrTo(false)
|
||||||
if kcm.CloudProvider == "external" {
|
if kcm.CloudProvider == "external" {
|
||||||
// kcm should not allocate node cidrs with the CloudAllocator if we're using the external CCM
|
// kcm should not allocate node cidrs with the CloudAllocator if we're using the external CCM
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ func (b *NetworkingOptionsBuilder) BuildOptions(o interface{}) error {
|
||||||
if b.Context.IsKubernetesLT("1.24") {
|
if b.Context.IsKubernetesLT("1.24") {
|
||||||
if UsesCNI(networking) {
|
if UsesCNI(networking) {
|
||||||
options.Kubelet.NetworkPluginName = fi.PtrTo("cni")
|
options.Kubelet.NetworkPluginName = fi.PtrTo("cni")
|
||||||
} else if networking.GCE != nil {
|
} else if networking.GCP != nil {
|
||||||
options.Kubelet.NetworkPluginName = fi.PtrTo("kubenet")
|
options.Kubelet.NetworkPluginName = fi.PtrTo("kubenet")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,7 @@ func (c *GCEModelContext) NameForFirewallRule(id string) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *GCEModelContext) NetworkingIsIPAlias() bool {
|
func (c *GCEModelContext) NetworkingIsIPAlias() bool {
|
||||||
return c.Cluster.Spec.Networking.GCE != nil
|
return c.Cluster.Spec.Networking.GCP != nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *GCEModelContext) NetworkingIsGCERoutes() bool {
|
func (c *GCEModelContext) NetworkingIsGCERoutes() bool {
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ import (
|
||||||
|
|
||||||
// UsesIPAliases checks if the cluster uses IP aliases for network connectivity
|
// UsesIPAliases checks if the cluster uses IP aliases for network connectivity
|
||||||
func UsesIPAliases(c *kops.Cluster) bool {
|
func UsesIPAliases(c *kops.Cluster) bool {
|
||||||
if c.Spec.Networking.GCE != nil {
|
if c.Spec.Networking.GCP != nil {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
|
|
||||||
|
|
@ -1142,8 +1142,8 @@ func setupNetworking(opt *NewClusterOptions, cluster *api.Cluster) error {
|
||||||
case "cilium-eni":
|
case "cilium-eni":
|
||||||
addCiliumNetwork(cluster)
|
addCiliumNetwork(cluster)
|
||||||
cluster.Spec.Networking.Cilium.IPAM = "eni"
|
cluster.Spec.Networking.Cilium.IPAM = "eni"
|
||||||
case "gce":
|
case "gcp", "gce":
|
||||||
cluster.Spec.Networking.GCE = &api.GCENetworkingSpec{}
|
cluster.Spec.Networking.GCP = &api.GCPNetworkingSpec{}
|
||||||
default:
|
default:
|
||||||
return fmt.Errorf("unknown networking mode %q", opt.Networking)
|
return fmt.Errorf("unknown networking mode %q", opt.Networking)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -296,7 +296,19 @@ func TestSetupNetworking(t *testing.T) {
|
||||||
expected: api.Cluster{
|
expected: api.Cluster{
|
||||||
Spec: api.ClusterSpec{
|
Spec: api.ClusterSpec{
|
||||||
Networking: api.NetworkingSpec{
|
Networking: api.NetworkingSpec{
|
||||||
GCE: &api.GCENetworkingSpec{},
|
GCP: &api.GCPNetworkingSpec{},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
options: NewClusterOptions{
|
||||||
|
Networking: "gcp",
|
||||||
|
},
|
||||||
|
expected: api.Cluster{
|
||||||
|
Spec: api.ClusterSpec{
|
||||||
|
Networking: api.NetworkingSpec{
|
||||||
|
GCP: &api.GCPNetworkingSpec{},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue