From d837d2e5637cdc2fde134a207cb8109c9af18799 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Mon, 7 Oct 2024 23:54:35 -0700 Subject: [PATCH] Make capi provider optional Signed-off-by: Tamal Saha --- go.mod | 2 +- go.sum | 4 ++-- vendor/kmodules.xyz/client-go/api/v1/cluster.go | 14 ++++++-------- .../client-go/api/v1/zz_generated.deepcopy.go | 6 +++++- vendor/modules.txt | 2 +- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index b361a6dd5..c2eac5453 100644 --- a/go.mod +++ b/go.mod @@ -45,7 +45,7 @@ require ( k8s.io/kube-state-metrics/v2 v2.12.0 kmodules.xyz/apiversion v0.2.0 kmodules.xyz/authorizer v0.29.1 - kmodules.xyz/client-go v0.30.19 + kmodules.xyz/client-go v0.30.20 kmodules.xyz/custom-resources v0.30.0 kmodules.xyz/go-containerregistry v0.0.12 kmodules.xyz/monitoring-agent-api v0.30.2-0.20241001043315-b98120efea48 diff --git a/go.sum b/go.sum index ca5d6b4c6..a811f3a5f 100644 --- a/go.sum +++ b/go.sum @@ -922,8 +922,8 @@ kmodules.xyz/apiversion v0.2.0 h1:vAQYqZFm4xu4pbB1cAdHbFEPES6EQkcR4wc06xdTOWk= kmodules.xyz/apiversion v0.2.0/go.mod h1:oPX8g8LvlPdPX3Yc5YvCzJHQnw3YF/X4/jdW0b1am80= kmodules.xyz/authorizer v0.29.1 h1:uByGGoryKbZcfiEAhjcK/Y345I9mygNQP7DVpkMbNQQ= kmodules.xyz/authorizer v0.29.1/go.mod h1:kZRhclL8twzyt2bQuJQJbpYww2sc+qFr8I5PPoq/sWY= -kmodules.xyz/client-go v0.30.19 h1:OStrnata4fT+itjPVQLf1SJ+VW5eBi7Mxvo+AXr6vNM= -kmodules.xyz/client-go v0.30.19/go.mod h1:CAu+JlA8RVGtj6LQHu0Q1w2mnFUajuti49c7T1AvGdM= +kmodules.xyz/client-go v0.30.20 h1:LHO6WNuJ6hf4DuaWnypPj0tqM02LEr3hspSqsYlqfxQ= +kmodules.xyz/client-go v0.30.20/go.mod h1:CAu+JlA8RVGtj6LQHu0Q1w2mnFUajuti49c7T1AvGdM= kmodules.xyz/crd-schema-fuzz v0.29.1 h1:zJTlWYOrT5dsVVHW8HGcnR/vaWfxQfNh11QwTtkYpcs= kmodules.xyz/crd-schema-fuzz v0.29.1/go.mod h1:n708z9YQqLMP2KNLQVgBcRJw1QpSWLvpNCEi+KJDOYE= kmodules.xyz/custom-resources v0.30.0 h1:vR3CbseHMLwR4GvtcJJuRuwIV8voKqFqNii27rMcm1o= diff --git a/vendor/kmodules.xyz/client-go/api/v1/cluster.go b/vendor/kmodules.xyz/client-go/api/v1/cluster.go index 5977959e5..c8998881f 100644 --- a/vendor/kmodules.xyz/client-go/api/v1/cluster.go +++ b/vendor/kmodules.xyz/client-go/api/v1/cluster.go @@ -24,7 +24,7 @@ import ( "strings" ) -// +kubebuilder:validation:Enum=Aws;Azure;DigitalOcean;GoogleCloud;Linode;Packet;Scaleway;Vultr;BareMetal;KIND;Generic;Private +// +kubebuilder:validation:Enum=Aws;Azure;DigitalOcean;GoogleCloud;Linode;Packet;Scaleway;Vultr;BareMetal;KIND;Generic type HostingProvider string const ( @@ -40,7 +40,6 @@ const ( HostingProviderBareMetal HostingProvider = "BareMetal" HostingProviderKIND HostingProvider = "KIND" HostingProviderGeneric HostingProvider = "Generic" - HostingProviderPrivate HostingProvider = "Private" ) const ( @@ -164,16 +163,15 @@ type ClusterInfo struct { Name string `json:"name"` ClusterManagers []string `json:"clusterManagers"` // +optional - CAPI CAPIClusterInfo `json:"capi"` + CAPI *CAPIClusterInfo `json:"capi"` } // +kubebuilder:validation:Enum=capa;capg;capz type CAPIProvider string const ( - CAPIProviderUnknown CAPIProvider = "" - CAPIProviderCAPA CAPIProvider = "capa" - CAPIProviderCAPG CAPIProvider = "capg" - CAPIProviderCAPZ CAPIProvider = "capz" - CAPIProviderCAPH CAPIProvider = "caph" + CAPIProviderCAPA CAPIProvider = "capa" + CAPIProviderCAPG CAPIProvider = "capg" + CAPIProviderCAPZ CAPIProvider = "capz" + CAPIProviderCAPH CAPIProvider = "caph" ) diff --git a/vendor/kmodules.xyz/client-go/api/v1/zz_generated.deepcopy.go b/vendor/kmodules.xyz/client-go/api/v1/zz_generated.deepcopy.go index 9e3330952..f44550fbd 100644 --- a/vendor/kmodules.xyz/client-go/api/v1/zz_generated.deepcopy.go +++ b/vendor/kmodules.xyz/client-go/api/v1/zz_generated.deepcopy.go @@ -127,7 +127,11 @@ func (in *ClusterInfo) DeepCopyInto(out *ClusterInfo) { *out = make([]string, len(*in)) copy(*out, *in) } - out.CAPI = in.CAPI + if in.CAPI != nil { + in, out := &in.CAPI, &out.CAPI + *out = new(CAPIClusterInfo) + **out = **in + } return } diff --git a/vendor/modules.txt b/vendor/modules.txt index f23b7e837..6771810ab 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -2006,7 +2006,7 @@ kmodules.xyz/authorizer/apiserver kmodules.xyz/authorizer/rbac kmodules.xyz/authorizer/rbac/helpers kmodules.xyz/authorizer/rbac/validation -# kmodules.xyz/client-go v0.30.19 +# kmodules.xyz/client-go v0.30.20 ## explicit; go 1.22.0 kmodules.xyz/client-go kmodules.xyz/client-go/api/v1