From d49adbf58b66fe7f1e0da180d4a9cc21a82f8418 Mon Sep 17 00:00:00 2001 From: lgtm <1gtm@users.noreply.github.com> Date: Tue, 8 Feb 2022 12:02:33 -0800 Subject: [PATCH] [cherry-pick] Update SiteInfo (#1089) (#1096) /cherry-pick Signed-off-by: 1gtm <1gtm@appscode.com> --- go.mod | 2 +- go.sum | 4 ++-- .../apis/auditor/v1alpha1/openapi_generated.go | 17 +++++++++++++++-- .../apis/auditor/v1alpha1/siteinfo_types.go | 12 ++++++++---- .../auditor/v1alpha1/zz_generated.deepcopy.go | 14 ++++++++++---- .../crds/auditor.appscode.com_siteinfos.yaml | 6 ++++++ vendor/modules.txt | 2 +- 7 files changed, 43 insertions(+), 14 deletions(-) diff --git a/go.mod b/go.mod index 142549956..dd2fa39b8 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( k8s.io/klog/v2 v2.9.0 k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e // indirect kmodules.xyz/client-go v0.0.0-20220203031013-1de48437aaf3 - kmodules.xyz/custom-resources v0.0.0-20220126201139-be014631db0c + kmodules.xyz/custom-resources v0.0.0-20220208103158-61b298634e43 kmodules.xyz/objectstore-api v0.0.0-20211207131029-3271069de43e // indirect kmodules.xyz/offshoot-api v0.0.0-20211207130839-cc7187e020cf stash.appscode.dev/apimachinery v0.17.1-0.20220113052814-7da4b19c88a3 diff --git a/go.sum b/go.sum index 192bbba98..6f615f66b 100644 --- a/go.sum +++ b/go.sum @@ -1076,8 +1076,8 @@ kmodules.xyz/client-go v0.0.0-20220203031013-1de48437aaf3/go.mod h1:aOwnhdxO0uh5 kmodules.xyz/constants v0.0.0-20210218100002-2c304bfda278/go.mod h1:DbiFk1bJ1KEO94t1SlAn7tzc+Zz95rSXgyUKa2nzPmY= kmodules.xyz/crd-schema-fuzz v0.0.0-20210618002152-fae23aef5fb4/go.mod h1:IIkUctlfoptoci0BOrsUf8ya+MOG5uaeh1PE4uzaIbA= kmodules.xyz/custom-resources v0.0.0-20220104123914-3c036dd7c1cd/go.mod h1:/XjDeILFV2wBota5kHo21DMvOt08nSAk1vm6buCuwt4= -kmodules.xyz/custom-resources v0.0.0-20220126201139-be014631db0c h1:SZzZ57uOh6nCIRMmGC1F0vyZr8fTmDm6gQAAh9GY1wY= -kmodules.xyz/custom-resources v0.0.0-20220126201139-be014631db0c/go.mod h1:/XjDeILFV2wBota5kHo21DMvOt08nSAk1vm6buCuwt4= +kmodules.xyz/custom-resources v0.0.0-20220208103158-61b298634e43 h1:mwW2DgP7sAMambZe7Met/e9nrBYnzYgM/lupbm7jgGM= +kmodules.xyz/custom-resources v0.0.0-20220208103158-61b298634e43/go.mod h1:/XjDeILFV2wBota5kHo21DMvOt08nSAk1vm6buCuwt4= kmodules.xyz/objectstore-api v0.0.0-20211116180107-8720be0c9bf7/go.mod h1:IICnDdPFOEeGXdaPVHOGYfdwD1cyh/p1I/TWMkyNTIE= kmodules.xyz/objectstore-api v0.0.0-20211207131029-3271069de43e h1:hbnb7Zy6pe0IwWWdIVbgfzBLM3kmppUMDpf7Sxy11d8= kmodules.xyz/objectstore-api v0.0.0-20211207131029-3271069de43e/go.mod h1:IICnDdPFOEeGXdaPVHOGYfdwD1cyh/p1I/TWMkyNTIE= diff --git a/vendor/kmodules.xyz/custom-resources/apis/auditor/v1alpha1/openapi_generated.go b/vendor/kmodules.xyz/custom-resources/apis/auditor/v1alpha1/openapi_generated.go index db1c7bb14..55c8e8c3f 100644 --- a/vendor/kmodules.xyz/custom-resources/apis/auditor/v1alpha1/openapi_generated.go +++ b/vendor/kmodules.xyz/custom-resources/apis/auditor/v1alpha1/openapi_generated.go @@ -15975,10 +15975,23 @@ func schema_custom_resources_apis_auditor_v1alpha1_KubernetesInfo(ref common.Ref SchemaProps: spec.SchemaProps{ Type: []string{"object"}, Properties: map[string]spec.Schema{ + "clusterName": { + SchemaProps: spec.SchemaProps{ + Description: "Deprecated", + Type: []string{"string"}, + Format: "", + }, + }, + "clusterUID": { + SchemaProps: spec.SchemaProps{ + Description: "Deprecated", + Type: []string{"string"}, + Format: "", + }, + }, "cluster": { SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/client-go/api/v1.ClusterMetadata"), + Ref: ref("kmodules.xyz/client-go/api/v1.ClusterMetadata"), }, }, "version": { diff --git a/vendor/kmodules.xyz/custom-resources/apis/auditor/v1alpha1/siteinfo_types.go b/vendor/kmodules.xyz/custom-resources/apis/auditor/v1alpha1/siteinfo_types.go index ffca7e7b0..f8612fc61 100644 --- a/vendor/kmodules.xyz/custom-resources/apis/auditor/v1alpha1/siteinfo_types.go +++ b/vendor/kmodules.xyz/custom-resources/apis/auditor/v1alpha1/siteinfo_types.go @@ -69,10 +69,14 @@ type ProductInfo struct { } type KubernetesInfo struct { - Cluster kmapi.ClusterMetadata `json:"cluster,omitempty"` - Version *version.Info `json:"version,omitempty"` - ControlPlane *ControlPlaneInfo `json:"controlPlane,omitempty"` - NodeStats NodeStats `json:"nodeStats"` + // Deprecated + ClusterName string `json:"clusterName,omitempty"` + // Deprecated + ClusterUID string `json:"clusterUID,omitempty"` + Cluster *kmapi.ClusterMetadata `json:"cluster,omitempty"` + Version *version.Info `json:"version,omitempty"` + ControlPlane *ControlPlaneInfo `json:"controlPlane,omitempty"` + NodeStats NodeStats `json:"nodeStats"` } // https://github.com/kmodules/client-go/blob/kubernetes-1.16.3/tools/analytics/analytics.go#L66 diff --git a/vendor/kmodules.xyz/custom-resources/apis/auditor/v1alpha1/zz_generated.deepcopy.go b/vendor/kmodules.xyz/custom-resources/apis/auditor/v1alpha1/zz_generated.deepcopy.go index b115acbc5..13018a6ca 100644 --- a/vendor/kmodules.xyz/custom-resources/apis/auditor/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/kmodules.xyz/custom-resources/apis/auditor/v1alpha1/zz_generated.deepcopy.go @@ -22,7 +22,9 @@ limitations under the License. package v1alpha1 import ( - v1 "k8s.io/api/core/v1" + v1 "kmodules.xyz/client-go/api/v1" + + corev1 "k8s.io/api/core/v1" runtime "k8s.io/apimachinery/pkg/runtime" version "k8s.io/apimachinery/pkg/version" ) @@ -121,7 +123,11 @@ func (in *GroupResources) DeepCopy() *GroupResources { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *KubernetesInfo) DeepCopyInto(out *KubernetesInfo) { *out = *in - out.Cluster = in.Cluster + if in.Cluster != nil { + in, out := &in.Cluster, &out.Cluster + *out = new(v1.ClusterMetadata) + **out = **in + } if in.Version != nil { in, out := &in.Version, &out.Version *out = new(version.Info) @@ -151,14 +157,14 @@ func (in *NodeStats) DeepCopyInto(out *NodeStats) { *out = *in if in.Capacity != nil { in, out := &in.Capacity, &out.Capacity - *out = make(v1.ResourceList, len(*in)) + *out = make(corev1.ResourceList, len(*in)) for key, val := range *in { (*out)[key] = val.DeepCopy() } } if in.Allocatable != nil { in, out := &in.Allocatable, &out.Allocatable - *out = make(v1.ResourceList, len(*in)) + *out = make(corev1.ResourceList, len(*in)) for key, val := range *in { (*out)[key] = val.DeepCopy() } diff --git a/vendor/kmodules.xyz/custom-resources/crds/auditor.appscode.com_siteinfos.yaml b/vendor/kmodules.xyz/custom-resources/crds/auditor.appscode.com_siteinfos.yaml index e65425c0f..187d66c28 100644 --- a/vendor/kmodules.xyz/custom-resources/crds/auditor.appscode.com_siteinfos.yaml +++ b/vendor/kmodules.xyz/custom-resources/crds/auditor.appscode.com_siteinfos.yaml @@ -60,6 +60,12 @@ spec: required: - uid type: object + clusterName: + description: Deprecated + type: string + clusterUID: + description: Deprecated + type: string controlPlane: description: https://github.com/kmodules/client-go/blob/kubernetes-1.16.3/tools/analytics/analytics.go#L66 properties: diff --git a/vendor/modules.txt b/vendor/modules.txt index 98b0736e1..16d5bb822 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -537,7 +537,7 @@ kmodules.xyz/client-go/discovery kmodules.xyz/client-go/dynamic kmodules.xyz/client-go/meta kmodules.xyz/client-go/tools/clusterid -# kmodules.xyz/custom-resources v0.0.0-20220126201139-be014631db0c +# kmodules.xyz/custom-resources v0.0.0-20220208103158-61b298634e43 ## explicit kmodules.xyz/custom-resources/apis/appcatalog kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1