diff --git a/cmd/kops-controller/main.go b/cmd/kops-controller/main.go index 870a9a2fc7..e9aa40fb53 100644 --- a/cmd/kops-controller/main.go +++ b/cmd/kops-controller/main.go @@ -27,6 +27,7 @@ import ( "k8s.io/klog" "k8s.io/kops/cmd/kops-controller/controllers" ctrl "sigs.k8s.io/controller-runtime" + // +kubebuilder:scaffold:imports "k8s.io/klog/klogr" diff --git a/pkg/apis/kops/cluster.go b/pkg/apis/kops/cluster.go index e615c2bbf4..5a3a4a876d 100644 --- a/pkg/apis/kops/cluster.go +++ b/pkg/apis/kops/cluster.go @@ -632,10 +632,10 @@ func (c *Cluster) IsKubernetesGTE(version string) bool { } type GossipConfig struct { - Protocol *string `json:"protocol"` - Listen *string `json:"listen"` - Secret *string `json:"secret"` - Secondary *GossipConfig + Protocol *string `json:"protocol"` + Listen *string `json:"listen"` + Secret *string `json:"secret"` + Secondary *GossipConfig } type DNSControllerGossipConfig struct { diff --git a/pkg/apis/kops/v1alpha1/cluster.go b/pkg/apis/kops/v1alpha1/cluster.go index bbc9e15252..8e80e71353 100644 --- a/pkg/apis/kops/v1alpha1/cluster.go +++ b/pkg/apis/kops/v1alpha1/cluster.go @@ -516,10 +516,10 @@ func (t *TerraformSpec) IsEmpty() bool { } type GossipConfig struct { - Protocol *string `json:"protocol"` - Listen *string `json:"listen"` - Secret *string `json:"secret"` - Secondary *GossipConfig + Protocol *string `json:"protocol"` + Listen *string `json:"listen"` + Secret *string `json:"secret"` + Secondary *GossipConfig } type DNSControllerGossipConfig struct { diff --git a/pkg/apis/kops/v1alpha1/zz_generated.conversion.go b/pkg/apis/kops/v1alpha1/zz_generated.conversion.go index 3f784a8859..e319c61e63 100644 --- a/pkg/apis/kops/v1alpha1/zz_generated.conversion.go +++ b/pkg/apis/kops/v1alpha1/zz_generated.conversion.go @@ -223,6 +223,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*DNSControllerGossipConfig)(nil), (*kops.DNSControllerGossipConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_DNSControllerGossipConfig_To_kops_DNSControllerGossipConfig(a.(*DNSControllerGossipConfig), b.(*kops.DNSControllerGossipConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kops.DNSControllerGossipConfig)(nil), (*DNSControllerGossipConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kops_DNSControllerGossipConfig_To_v1alpha1_DNSControllerGossipConfig(a.(*kops.DNSControllerGossipConfig), b.(*DNSControllerGossipConfig), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*DNSSpec)(nil), (*kops.DNSSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha1_DNSSpec_To_kops_DNSSpec(a.(*DNSSpec), b.(*kops.DNSSpec), scope) }); err != nil { @@ -353,6 +363,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*GossipConfig)(nil), (*kops.GossipConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_GossipConfig_To_kops_GossipConfig(a.(*GossipConfig), b.(*kops.GossipConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kops.GossipConfig)(nil), (*GossipConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kops_GossipConfig_To_v1alpha1_GossipConfig(a.(*kops.GossipConfig), b.(*GossipConfig), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*HTTPProxy)(nil), (*kops.HTTPProxy)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha1_HTTPProxy_To_kops_HTTPProxy(a.(*HTTPProxy), b.(*kops.HTTPProxy), scope) }); err != nil { @@ -1559,6 +1579,15 @@ func autoConvert_v1alpha1_ClusterSpec_To_kops_ClusterSpec(in *ClusterSpec, out * } out.ConfigBase = in.ConfigBase out.CloudProvider = in.CloudProvider + if in.GossipConfig != nil { + in, out := &in.GossipConfig, &out.GossipConfig + *out = new(kops.GossipConfig) + if err := Convert_v1alpha1_GossipConfig_To_kops_GossipConfig(*in, *out, s); err != nil { + return err + } + } else { + out.GossipConfig = nil + } out.KubernetesVersion = in.KubernetesVersion // WARNING: in.Zones requires manual conversion: does not exist in peer-type out.Project = in.Project @@ -1580,6 +1609,15 @@ func autoConvert_v1alpha1_ClusterSpec_To_kops_ClusterSpec(in *ClusterSpec, out * out.KeyStore = in.KeyStore out.ConfigStore = in.ConfigStore out.DNSZone = in.DNSZone + if in.DNSControllerGossipConfig != nil { + in, out := &in.DNSControllerGossipConfig, &out.DNSControllerGossipConfig + *out = new(kops.DNSControllerGossipConfig) + if err := Convert_v1alpha1_DNSControllerGossipConfig_To_kops_DNSControllerGossipConfig(*in, *out, s); err != nil { + return err + } + } else { + out.DNSControllerGossipConfig = nil + } out.AdditionalSANs = in.AdditionalSANs out.ClusterDNSDomain = in.ClusterDNSDomain // WARNING: in.Multizone requires manual conversion: does not exist in peer-type @@ -1827,6 +1865,15 @@ func autoConvert_kops_ClusterSpec_To_v1alpha1_ClusterSpec(in *kops.ClusterSpec, } out.ConfigBase = in.ConfigBase out.CloudProvider = in.CloudProvider + if in.GossipConfig != nil { + in, out := &in.GossipConfig, &out.GossipConfig + *out = new(GossipConfig) + if err := Convert_kops_GossipConfig_To_v1alpha1_GossipConfig(*in, *out, s); err != nil { + return err + } + } else { + out.GossipConfig = nil + } out.KubernetesVersion = in.KubernetesVersion // WARNING: in.Subnets requires manual conversion: does not exist in peer-type out.Project = in.Project @@ -1848,6 +1895,15 @@ func autoConvert_kops_ClusterSpec_To_v1alpha1_ClusterSpec(in *kops.ClusterSpec, out.KeyStore = in.KeyStore out.ConfigStore = in.ConfigStore out.DNSZone = in.DNSZone + if in.DNSControllerGossipConfig != nil { + in, out := &in.DNSControllerGossipConfig, &out.DNSControllerGossipConfig + *out = new(DNSControllerGossipConfig) + if err := Convert_kops_DNSControllerGossipConfig_To_v1alpha1_DNSControllerGossipConfig(*in, *out, s); err != nil { + return err + } + } else { + out.DNSControllerGossipConfig = nil + } out.AdditionalSANs = in.AdditionalSANs out.ClusterDNSDomain = in.ClusterDNSDomain out.ServiceClusterIPRange = in.ServiceClusterIPRange @@ -2099,6 +2155,50 @@ func Convert_kops_DNSAccessSpec_To_v1alpha1_DNSAccessSpec(in *kops.DNSAccessSpec return autoConvert_kops_DNSAccessSpec_To_v1alpha1_DNSAccessSpec(in, out, s) } +func autoConvert_v1alpha1_DNSControllerGossipConfig_To_kops_DNSControllerGossipConfig(in *DNSControllerGossipConfig, out *kops.DNSControllerGossipConfig, s conversion.Scope) error { + out.Protocol = in.Protocol + out.Listen = in.Listen + out.Secret = in.Secret + if in.Secondary != nil { + in, out := &in.Secondary, &out.Secondary + *out = new(kops.DNSControllerGossipConfig) + if err := Convert_v1alpha1_DNSControllerGossipConfig_To_kops_DNSControllerGossipConfig(*in, *out, s); err != nil { + return err + } + } else { + out.Secondary = nil + } + out.Seed = in.Seed + return nil +} + +// Convert_v1alpha1_DNSControllerGossipConfig_To_kops_DNSControllerGossipConfig is an autogenerated conversion function. +func Convert_v1alpha1_DNSControllerGossipConfig_To_kops_DNSControllerGossipConfig(in *DNSControllerGossipConfig, out *kops.DNSControllerGossipConfig, s conversion.Scope) error { + return autoConvert_v1alpha1_DNSControllerGossipConfig_To_kops_DNSControllerGossipConfig(in, out, s) +} + +func autoConvert_kops_DNSControllerGossipConfig_To_v1alpha1_DNSControllerGossipConfig(in *kops.DNSControllerGossipConfig, out *DNSControllerGossipConfig, s conversion.Scope) error { + out.Protocol = in.Protocol + out.Listen = in.Listen + out.Secret = in.Secret + if in.Secondary != nil { + in, out := &in.Secondary, &out.Secondary + *out = new(DNSControllerGossipConfig) + if err := Convert_kops_DNSControllerGossipConfig_To_v1alpha1_DNSControllerGossipConfig(*in, *out, s); err != nil { + return err + } + } else { + out.Secondary = nil + } + out.Seed = in.Seed + return nil +} + +// Convert_kops_DNSControllerGossipConfig_To_v1alpha1_DNSControllerGossipConfig is an autogenerated conversion function. +func Convert_kops_DNSControllerGossipConfig_To_v1alpha1_DNSControllerGossipConfig(in *kops.DNSControllerGossipConfig, out *DNSControllerGossipConfig, s conversion.Scope) error { + return autoConvert_kops_DNSControllerGossipConfig_To_v1alpha1_DNSControllerGossipConfig(in, out, s) +} + func autoConvert_v1alpha1_DNSSpec_To_kops_DNSSpec(in *DNSSpec, out *kops.DNSSpec, s conversion.Scope) error { out.Type = kops.DNSType(in.Type) return nil @@ -2525,6 +2625,48 @@ func Convert_kops_GCENetworkingSpec_To_v1alpha1_GCENetworkingSpec(in *kops.GCENe return autoConvert_kops_GCENetworkingSpec_To_v1alpha1_GCENetworkingSpec(in, out, s) } +func autoConvert_v1alpha1_GossipConfig_To_kops_GossipConfig(in *GossipConfig, out *kops.GossipConfig, s conversion.Scope) error { + out.Protocol = in.Protocol + out.Listen = in.Listen + out.Secret = in.Secret + if in.Secondary != nil { + in, out := &in.Secondary, &out.Secondary + *out = new(kops.GossipConfig) + if err := Convert_v1alpha1_GossipConfig_To_kops_GossipConfig(*in, *out, s); err != nil { + return err + } + } else { + out.Secondary = nil + } + return nil +} + +// Convert_v1alpha1_GossipConfig_To_kops_GossipConfig is an autogenerated conversion function. +func Convert_v1alpha1_GossipConfig_To_kops_GossipConfig(in *GossipConfig, out *kops.GossipConfig, s conversion.Scope) error { + return autoConvert_v1alpha1_GossipConfig_To_kops_GossipConfig(in, out, s) +} + +func autoConvert_kops_GossipConfig_To_v1alpha1_GossipConfig(in *kops.GossipConfig, out *GossipConfig, s conversion.Scope) error { + out.Protocol = in.Protocol + out.Listen = in.Listen + out.Secret = in.Secret + if in.Secondary != nil { + in, out := &in.Secondary, &out.Secondary + *out = new(GossipConfig) + if err := Convert_kops_GossipConfig_To_v1alpha1_GossipConfig(*in, *out, s); err != nil { + return err + } + } else { + out.Secondary = nil + } + return nil +} + +// Convert_kops_GossipConfig_To_v1alpha1_GossipConfig is an autogenerated conversion function. +func Convert_kops_GossipConfig_To_v1alpha1_GossipConfig(in *kops.GossipConfig, out *GossipConfig, s conversion.Scope) error { + return autoConvert_kops_GossipConfig_To_v1alpha1_GossipConfig(in, out, s) +} + func autoConvert_v1alpha1_HTTPProxy_To_kops_HTTPProxy(in *HTTPProxy, out *kops.HTTPProxy, s conversion.Scope) error { out.Host = in.Host out.Port = in.Port diff --git a/pkg/apis/kops/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/kops/v1alpha1/zz_generated.deepcopy.go index d074cd53fe..147ee56c97 100644 --- a/pkg/apis/kops/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/kops/v1alpha1/zz_generated.deepcopy.go @@ -594,6 +594,11 @@ func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) { *out = make([]AddonSpec, len(*in)) copy(*out, *in) } + if in.GossipConfig != nil { + in, out := &in.GossipConfig, &out.GossipConfig + *out = new(GossipConfig) + (*in).DeepCopyInto(*out) + } if in.Zones != nil { in, out := &in.Zones, &out.Zones *out = make([]*ClusterZoneSpec, len(*in)) @@ -615,6 +620,11 @@ func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) { *out = new(TopologySpec) (*in).DeepCopyInto(*out) } + if in.DNSControllerGossipConfig != nil { + in, out := &in.DNSControllerGossipConfig, &out.DNSControllerGossipConfig + *out = new(DNSControllerGossipConfig) + (*in).DeepCopyInto(*out) + } if in.AdditionalSANs != nil { in, out := &in.AdditionalSANs, &out.AdditionalSANs *out = make([]string, len(*in)) @@ -838,6 +848,47 @@ func (in *DNSAccessSpec) DeepCopy() *DNSAccessSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DNSControllerGossipConfig) DeepCopyInto(out *DNSControllerGossipConfig) { + *out = *in + if in.Protocol != nil { + in, out := &in.Protocol, &out.Protocol + *out = new(string) + **out = **in + } + if in.Listen != nil { + in, out := &in.Listen, &out.Listen + *out = new(string) + **out = **in + } + if in.Secret != nil { + in, out := &in.Secret, &out.Secret + *out = new(string) + **out = **in + } + if in.Secondary != nil { + in, out := &in.Secondary, &out.Secondary + *out = new(DNSControllerGossipConfig) + (*in).DeepCopyInto(*out) + } + if in.Seed != nil { + in, out := &in.Seed, &out.Seed + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSControllerGossipConfig. +func (in *DNSControllerGossipConfig) DeepCopy() *DNSControllerGossipConfig { + if in == nil { + return nil + } + out := new(DNSControllerGossipConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DNSSpec) DeepCopyInto(out *DNSSpec) { *out = *in @@ -1276,6 +1327,42 @@ func (in *GCENetworkingSpec) DeepCopy() *GCENetworkingSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GossipConfig) DeepCopyInto(out *GossipConfig) { + *out = *in + if in.Protocol != nil { + in, out := &in.Protocol, &out.Protocol + *out = new(string) + **out = **in + } + if in.Listen != nil { + in, out := &in.Listen, &out.Listen + *out = new(string) + **out = **in + } + if in.Secret != nil { + in, out := &in.Secret, &out.Secret + *out = new(string) + **out = **in + } + if in.Secondary != nil { + in, out := &in.Secondary, &out.Secondary + *out = new(GossipConfig) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GossipConfig. +func (in *GossipConfig) DeepCopy() *GossipConfig { + if in == nil { + return nil + } + out := new(GossipConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *HTTPProxy) DeepCopyInto(out *HTTPProxy) { *out = *in diff --git a/pkg/apis/kops/v1alpha2/cluster.go b/pkg/apis/kops/v1alpha2/cluster.go index 8c27d73d21..65a3882f38 100644 --- a/pkg/apis/kops/v1alpha2/cluster.go +++ b/pkg/apis/kops/v1alpha2/cluster.go @@ -529,10 +529,10 @@ func (t *TerraformSpec) IsEmpty() bool { } type GossipConfig struct { - Protocol *string `json:"protocol"` - Listen *string `json:"listen"` - Secret *string `json:"secret"` - Secondary *GossipConfig + Protocol *string `json:"protocol"` + Listen *string `json:"listen"` + Secret *string `json:"secret"` + Secondary *GossipConfig } type DNSControllerGossipConfig struct { diff --git a/pkg/apis/kops/v1alpha2/zz_generated.conversion.go b/pkg/apis/kops/v1alpha2/zz_generated.conversion.go index e3321dcd84..40a5694a77 100644 --- a/pkg/apis/kops/v1alpha2/zz_generated.conversion.go +++ b/pkg/apis/kops/v1alpha2/zz_generated.conversion.go @@ -243,6 +243,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*DNSControllerGossipConfig)(nil), (*kops.DNSControllerGossipConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_DNSControllerGossipConfig_To_kops_DNSControllerGossipConfig(a.(*DNSControllerGossipConfig), b.(*kops.DNSControllerGossipConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kops.DNSControllerGossipConfig)(nil), (*DNSControllerGossipConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kops_DNSControllerGossipConfig_To_v1alpha2_DNSControllerGossipConfig(a.(*kops.DNSControllerGossipConfig), b.(*DNSControllerGossipConfig), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*DNSSpec)(nil), (*kops.DNSSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha2_DNSSpec_To_kops_DNSSpec(a.(*DNSSpec), b.(*kops.DNSSpec), scope) }); err != nil { @@ -373,6 +383,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*GossipConfig)(nil), (*kops.GossipConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_GossipConfig_To_kops_GossipConfig(a.(*GossipConfig), b.(*kops.GossipConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*kops.GossipConfig)(nil), (*GossipConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_kops_GossipConfig_To_v1alpha2_GossipConfig(a.(*kops.GossipConfig), b.(*GossipConfig), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*HTTPProxy)(nil), (*kops.HTTPProxy)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha2_HTTPProxy_To_kops_HTTPProxy(a.(*HTTPProxy), b.(*kops.HTTPProxy), scope) }); err != nil { @@ -1601,6 +1621,15 @@ func autoConvert_v1alpha2_ClusterSpec_To_kops_ClusterSpec(in *ClusterSpec, out * } out.ConfigBase = in.ConfigBase out.CloudProvider = in.CloudProvider + if in.GossipConfig != nil { + in, out := &in.GossipConfig, &out.GossipConfig + *out = new(kops.GossipConfig) + if err := Convert_v1alpha2_GossipConfig_To_kops_GossipConfig(*in, *out, s); err != nil { + return err + } + } else { + out.GossipConfig = nil + } out.KubernetesVersion = in.KubernetesVersion if in.Subnets != nil { in, out := &in.Subnets, &out.Subnets @@ -1632,6 +1661,15 @@ func autoConvert_v1alpha2_ClusterSpec_To_kops_ClusterSpec(in *ClusterSpec, out * out.KeyStore = in.KeyStore out.ConfigStore = in.ConfigStore out.DNSZone = in.DNSZone + if in.DNSControllerGossipConfig != nil { + in, out := &in.DNSControllerGossipConfig, &out.DNSControllerGossipConfig + *out = new(kops.DNSControllerGossipConfig) + if err := Convert_v1alpha2_DNSControllerGossipConfig_To_kops_DNSControllerGossipConfig(*in, *out, s); err != nil { + return err + } + } else { + out.DNSControllerGossipConfig = nil + } out.AdditionalSANs = in.AdditionalSANs out.ClusterDNSDomain = in.ClusterDNSDomain out.ServiceClusterIPRange = in.ServiceClusterIPRange @@ -1885,6 +1923,15 @@ func autoConvert_kops_ClusterSpec_To_v1alpha2_ClusterSpec(in *kops.ClusterSpec, } out.ConfigBase = in.ConfigBase out.CloudProvider = in.CloudProvider + if in.GossipConfig != nil { + in, out := &in.GossipConfig, &out.GossipConfig + *out = new(GossipConfig) + if err := Convert_kops_GossipConfig_To_v1alpha2_GossipConfig(*in, *out, s); err != nil { + return err + } + } else { + out.GossipConfig = nil + } out.KubernetesVersion = in.KubernetesVersion if in.Subnets != nil { in, out := &in.Subnets, &out.Subnets @@ -1916,6 +1963,15 @@ func autoConvert_kops_ClusterSpec_To_v1alpha2_ClusterSpec(in *kops.ClusterSpec, out.KeyStore = in.KeyStore out.ConfigStore = in.ConfigStore out.DNSZone = in.DNSZone + if in.DNSControllerGossipConfig != nil { + in, out := &in.DNSControllerGossipConfig, &out.DNSControllerGossipConfig + *out = new(DNSControllerGossipConfig) + if err := Convert_kops_DNSControllerGossipConfig_To_v1alpha2_DNSControllerGossipConfig(*in, *out, s); err != nil { + return err + } + } else { + out.DNSControllerGossipConfig = nil + } out.AdditionalSANs = in.AdditionalSANs out.ClusterDNSDomain = in.ClusterDNSDomain out.ServiceClusterIPRange = in.ServiceClusterIPRange @@ -2206,6 +2262,50 @@ func Convert_kops_DNSAccessSpec_To_v1alpha2_DNSAccessSpec(in *kops.DNSAccessSpec return autoConvert_kops_DNSAccessSpec_To_v1alpha2_DNSAccessSpec(in, out, s) } +func autoConvert_v1alpha2_DNSControllerGossipConfig_To_kops_DNSControllerGossipConfig(in *DNSControllerGossipConfig, out *kops.DNSControllerGossipConfig, s conversion.Scope) error { + out.Protocol = in.Protocol + out.Listen = in.Listen + out.Secret = in.Secret + if in.Secondary != nil { + in, out := &in.Secondary, &out.Secondary + *out = new(kops.DNSControllerGossipConfig) + if err := Convert_v1alpha2_DNSControllerGossipConfig_To_kops_DNSControllerGossipConfig(*in, *out, s); err != nil { + return err + } + } else { + out.Secondary = nil + } + out.Seed = in.Seed + return nil +} + +// Convert_v1alpha2_DNSControllerGossipConfig_To_kops_DNSControllerGossipConfig is an autogenerated conversion function. +func Convert_v1alpha2_DNSControllerGossipConfig_To_kops_DNSControllerGossipConfig(in *DNSControllerGossipConfig, out *kops.DNSControllerGossipConfig, s conversion.Scope) error { + return autoConvert_v1alpha2_DNSControllerGossipConfig_To_kops_DNSControllerGossipConfig(in, out, s) +} + +func autoConvert_kops_DNSControllerGossipConfig_To_v1alpha2_DNSControllerGossipConfig(in *kops.DNSControllerGossipConfig, out *DNSControllerGossipConfig, s conversion.Scope) error { + out.Protocol = in.Protocol + out.Listen = in.Listen + out.Secret = in.Secret + if in.Secondary != nil { + in, out := &in.Secondary, &out.Secondary + *out = new(DNSControllerGossipConfig) + if err := Convert_kops_DNSControllerGossipConfig_To_v1alpha2_DNSControllerGossipConfig(*in, *out, s); err != nil { + return err + } + } else { + out.Secondary = nil + } + out.Seed = in.Seed + return nil +} + +// Convert_kops_DNSControllerGossipConfig_To_v1alpha2_DNSControllerGossipConfig is an autogenerated conversion function. +func Convert_kops_DNSControllerGossipConfig_To_v1alpha2_DNSControllerGossipConfig(in *kops.DNSControllerGossipConfig, out *DNSControllerGossipConfig, s conversion.Scope) error { + return autoConvert_kops_DNSControllerGossipConfig_To_v1alpha2_DNSControllerGossipConfig(in, out, s) +} + func autoConvert_v1alpha2_DNSSpec_To_kops_DNSSpec(in *DNSSpec, out *kops.DNSSpec, s conversion.Scope) error { out.Type = kops.DNSType(in.Type) return nil @@ -2642,6 +2742,48 @@ func Convert_kops_GCENetworkingSpec_To_v1alpha2_GCENetworkingSpec(in *kops.GCENe return autoConvert_kops_GCENetworkingSpec_To_v1alpha2_GCENetworkingSpec(in, out, s) } +func autoConvert_v1alpha2_GossipConfig_To_kops_GossipConfig(in *GossipConfig, out *kops.GossipConfig, s conversion.Scope) error { + out.Protocol = in.Protocol + out.Listen = in.Listen + out.Secret = in.Secret + if in.Secondary != nil { + in, out := &in.Secondary, &out.Secondary + *out = new(kops.GossipConfig) + if err := Convert_v1alpha2_GossipConfig_To_kops_GossipConfig(*in, *out, s); err != nil { + return err + } + } else { + out.Secondary = nil + } + return nil +} + +// Convert_v1alpha2_GossipConfig_To_kops_GossipConfig is an autogenerated conversion function. +func Convert_v1alpha2_GossipConfig_To_kops_GossipConfig(in *GossipConfig, out *kops.GossipConfig, s conversion.Scope) error { + return autoConvert_v1alpha2_GossipConfig_To_kops_GossipConfig(in, out, s) +} + +func autoConvert_kops_GossipConfig_To_v1alpha2_GossipConfig(in *kops.GossipConfig, out *GossipConfig, s conversion.Scope) error { + out.Protocol = in.Protocol + out.Listen = in.Listen + out.Secret = in.Secret + if in.Secondary != nil { + in, out := &in.Secondary, &out.Secondary + *out = new(GossipConfig) + if err := Convert_kops_GossipConfig_To_v1alpha2_GossipConfig(*in, *out, s); err != nil { + return err + } + } else { + out.Secondary = nil + } + return nil +} + +// Convert_kops_GossipConfig_To_v1alpha2_GossipConfig is an autogenerated conversion function. +func Convert_kops_GossipConfig_To_v1alpha2_GossipConfig(in *kops.GossipConfig, out *GossipConfig, s conversion.Scope) error { + return autoConvert_kops_GossipConfig_To_v1alpha2_GossipConfig(in, out, s) +} + func autoConvert_v1alpha2_HTTPProxy_To_kops_HTTPProxy(in *HTTPProxy, out *kops.HTTPProxy, s conversion.Scope) error { out.Host = in.Host out.Port = in.Port diff --git a/pkg/apis/kops/v1alpha2/zz_generated.deepcopy.go b/pkg/apis/kops/v1alpha2/zz_generated.deepcopy.go index a02ed44bd0..9be776681e 100644 --- a/pkg/apis/kops/v1alpha2/zz_generated.deepcopy.go +++ b/pkg/apis/kops/v1alpha2/zz_generated.deepcopy.go @@ -568,6 +568,11 @@ func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) { *out = make([]AddonSpec, len(*in)) copy(*out, *in) } + if in.GossipConfig != nil { + in, out := &in.GossipConfig, &out.GossipConfig + *out = new(GossipConfig) + (*in).DeepCopyInto(*out) + } if in.Subnets != nil { in, out := &in.Subnets, &out.Subnets *out = make([]ClusterSubnetSpec, len(*in)) @@ -583,6 +588,11 @@ func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) { *out = new(TopologySpec) (*in).DeepCopyInto(*out) } + if in.DNSControllerGossipConfig != nil { + in, out := &in.DNSControllerGossipConfig, &out.DNSControllerGossipConfig + *out = new(DNSControllerGossipConfig) + (*in).DeepCopyInto(*out) + } if in.AdditionalSANs != nil { in, out := &in.AdditionalSANs, &out.AdditionalSANs *out = make([]string, len(*in)) @@ -811,6 +821,47 @@ func (in *DNSAccessSpec) DeepCopy() *DNSAccessSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DNSControllerGossipConfig) DeepCopyInto(out *DNSControllerGossipConfig) { + *out = *in + if in.Protocol != nil { + in, out := &in.Protocol, &out.Protocol + *out = new(string) + **out = **in + } + if in.Listen != nil { + in, out := &in.Listen, &out.Listen + *out = new(string) + **out = **in + } + if in.Secret != nil { + in, out := &in.Secret, &out.Secret + *out = new(string) + **out = **in + } + if in.Secondary != nil { + in, out := &in.Secondary, &out.Secondary + *out = new(DNSControllerGossipConfig) + (*in).DeepCopyInto(*out) + } + if in.Seed != nil { + in, out := &in.Seed, &out.Seed + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSControllerGossipConfig. +func (in *DNSControllerGossipConfig) DeepCopy() *DNSControllerGossipConfig { + if in == nil { + return nil + } + out := new(DNSControllerGossipConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DNSSpec) DeepCopyInto(out *DNSSpec) { *out = *in @@ -1233,6 +1284,42 @@ func (in *GCENetworkingSpec) DeepCopy() *GCENetworkingSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GossipConfig) DeepCopyInto(out *GossipConfig) { + *out = *in + if in.Protocol != nil { + in, out := &in.Protocol, &out.Protocol + *out = new(string) + **out = **in + } + if in.Listen != nil { + in, out := &in.Listen, &out.Listen + *out = new(string) + **out = **in + } + if in.Secret != nil { + in, out := &in.Secret, &out.Secret + *out = new(string) + **out = **in + } + if in.Secondary != nil { + in, out := &in.Secondary, &out.Secondary + *out = new(GossipConfig) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GossipConfig. +func (in *GossipConfig) DeepCopy() *GossipConfig { + if in == nil { + return nil + } + out := new(GossipConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *HTTPProxy) DeepCopyInto(out *HTTPProxy) { *out = *in diff --git a/pkg/apis/kops/zz_generated.deepcopy.go b/pkg/apis/kops/zz_generated.deepcopy.go index e20f14457f..2b9deb8a11 100644 --- a/pkg/apis/kops/zz_generated.deepcopy.go +++ b/pkg/apis/kops/zz_generated.deepcopy.go @@ -668,6 +668,11 @@ func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) { *out = make([]AddonSpec, len(*in)) copy(*out, *in) } + if in.GossipConfig != nil { + in, out := &in.GossipConfig, &out.GossipConfig + *out = new(GossipConfig) + (*in).DeepCopyInto(*out) + } if in.Subnets != nil { in, out := &in.Subnets, &out.Subnets *out = make([]ClusterSubnetSpec, len(*in)) @@ -683,6 +688,11 @@ func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) { *out = new(TopologySpec) (*in).DeepCopyInto(*out) } + if in.DNSControllerGossipConfig != nil { + in, out := &in.DNSControllerGossipConfig, &out.DNSControllerGossipConfig + *out = new(DNSControllerGossipConfig) + (*in).DeepCopyInto(*out) + } if in.AdditionalSANs != nil { in, out := &in.AdditionalSANs, &out.AdditionalSANs *out = make([]string, len(*in)) @@ -934,6 +944,47 @@ func (in *DNSAccessSpec) DeepCopy() *DNSAccessSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DNSControllerGossipConfig) DeepCopyInto(out *DNSControllerGossipConfig) { + *out = *in + if in.Protocol != nil { + in, out := &in.Protocol, &out.Protocol + *out = new(string) + **out = **in + } + if in.Listen != nil { + in, out := &in.Listen, &out.Listen + *out = new(string) + **out = **in + } + if in.Secret != nil { + in, out := &in.Secret, &out.Secret + *out = new(string) + **out = **in + } + if in.Secondary != nil { + in, out := &in.Secondary, &out.Secondary + *out = new(DNSControllerGossipConfig) + (*in).DeepCopyInto(*out) + } + if in.Seed != nil { + in, out := &in.Seed, &out.Seed + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSControllerGossipConfig. +func (in *DNSControllerGossipConfig) DeepCopy() *DNSControllerGossipConfig { + if in == nil { + return nil + } + out := new(DNSControllerGossipConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DNSSpec) DeepCopyInto(out *DNSSpec) { *out = *in @@ -1399,6 +1450,42 @@ func (in *GCENetworkingSpec) DeepCopy() *GCENetworkingSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GossipConfig) DeepCopyInto(out *GossipConfig) { + *out = *in + if in.Protocol != nil { + in, out := &in.Protocol, &out.Protocol + *out = new(string) + **out = **in + } + if in.Listen != nil { + in, out := &in.Listen, &out.Listen + *out = new(string) + **out = **in + } + if in.Secret != nil { + in, out := &in.Secret, &out.Secret + *out = new(string) + **out = **in + } + if in.Secondary != nil { + in, out := &in.Secondary, &out.Secondary + *out = new(GossipConfig) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GossipConfig. +func (in *GossipConfig) DeepCopy() *GossipConfig { + if in == nil { + return nil + } + out := new(GossipConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *HTTPProxy) DeepCopyInto(out *HTTPProxy) { *out = *in diff --git a/pkg/model/domodel/droplets.go b/pkg/model/domodel/droplets.go index 13f521e999..ed9f943b93 100644 --- a/pkg/model/domodel/droplets.go +++ b/pkg/model/domodel/droplets.go @@ -17,12 +17,13 @@ limitations under the License. package domodel import ( + "strconv" + "strings" + "k8s.io/kops/pkg/model" "k8s.io/kops/upup/pkg/fi" "k8s.io/kops/upup/pkg/fi/cloudup/do" "k8s.io/kops/upup/pkg/fi/cloudup/dotasks" - "strconv" - "strings" ) // DropletBuilder configures droplets for the cluster diff --git a/protokube/pkg/gossip/mesh/mesh.pb.go b/protokube/pkg/gossip/mesh/mesh.pb.go index 1e17c0abde..7f480d80de 100644 --- a/protokube/pkg/gossip/mesh/mesh.pb.go +++ b/protokube/pkg/gossip/mesh/mesh.pb.go @@ -30,18 +30,25 @@ limitations under the License. */ package mesh -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" +import ( + fmt "fmt" -import errors "errors" + proto "github.com/golang/protobuf/proto" -import strings "strings" -import reflect "reflect" -import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + math "math" -import io "io" + _ "github.com/gogo/protobuf/gogoproto" + + errors "errors" + + strings "strings" + + reflect "reflect" + + github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + + io "io" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal diff --git a/upup/pkg/fi/cloudup/do/cloud.go b/upup/pkg/fi/cloudup/do/cloud.go index 0e41e7f6ba..627bda9d0c 100644 --- a/upup/pkg/fi/cloudup/do/cloud.go +++ b/upup/pkg/fi/cloudup/do/cloud.go @@ -17,9 +17,10 @@ limitations under the License. package do import ( + "strings" + "k8s.io/kops/pkg/resources/digitalocean" "k8s.io/kops/upup/pkg/fi" - "strings" ) const TagKubernetesClusterIndex = "k8s-index" diff --git a/upup/pkg/fi/cloudup/dotasks/droplet.go b/upup/pkg/fi/cloudup/dotasks/droplet.go index fa3cf28652..63cc330507 100644 --- a/upup/pkg/fi/cloudup/dotasks/droplet.go +++ b/upup/pkg/fi/cloudup/dotasks/droplet.go @@ -19,6 +19,7 @@ package dotasks import ( "context" "errors" + "github.com/digitalocean/godo" "k8s.io/klog" diff --git a/upup/pkg/fi/cloudup/dotasks/volume.go b/upup/pkg/fi/cloudup/dotasks/volume.go index bb3d1d90c4..9a3d6d16e3 100644 --- a/upup/pkg/fi/cloudup/dotasks/volume.go +++ b/upup/pkg/fi/cloudup/dotasks/volume.go @@ -19,6 +19,7 @@ package dotasks import ( "context" "fmt" + "github.com/digitalocean/godo" "k8s.io/klog"