From 56161f844f7ce281b893423490c7d43492d6ee3c Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Thu, 21 Sep 2023 14:26:31 -0700 Subject: [PATCH] Redesign project api Signed-off-by: Tamal Saha --- apis/core/fuzzer/fuzzer.go | 3 +- apis/core/v1alpha1/openapi_generated.go | 151 ------------- apis/core/v1alpha1/zz_generated.deepcopy.go | 104 --------- apis/meta/v1alpha1/openapi_generated.go | 212 ++++++++++++++++++ apis/{core => meta}/v1alpha1/project_types.go | 14 +- apis/meta/v1alpha1/zz_generated.deepcopy.go | 139 ++++++++++++ .../typed/core/v1alpha1/core_client.go | 5 - .../core/v1alpha1/fake/fake_core_client.go | 4 - .../typed/core/v1alpha1/fake/fake_project.go | 2 +- .../core/v1alpha1/generated_expansion.go | 2 - .../meta/v1alpha1/fake/fake_meta_client.go | 4 + .../typed/meta/v1alpha1/fake/fake_project.go | 69 ++++++ .../meta/v1alpha1/generated_expansion.go | 2 + .../typed/meta/v1alpha1/meta_client.go | 5 + .../typed/{core => meta}/v1alpha1/project.go | 4 +- crds/meta.k8s.appscode.com_projects.yaml | 178 +++++++++++++++ go.mod | 2 +- go.sum | 4 +- vendor/modules.txt | 2 +- 19 files changed, 631 insertions(+), 275 deletions(-) rename apis/{core => meta}/v1alpha1/project_types.go (75%) create mode 100644 client/clientset/versioned/typed/meta/v1alpha1/fake/fake_project.go rename client/clientset/versioned/typed/{core => meta}/v1alpha1/project.go (95%) create mode 100644 crds/meta.k8s.appscode.com_projects.yaml diff --git a/apis/core/fuzzer/fuzzer.go b/apis/core/fuzzer/fuzzer.go index 0d163bb92..a31585be0 100644 --- a/apis/core/fuzzer/fuzzer.go +++ b/apis/core/fuzzer/fuzzer.go @@ -18,6 +18,7 @@ package fuzzer import ( "kmodules.xyz/resource-metadata/apis/core/v1alpha1" + v1alpha12 "kmodules.xyz/resource-metadata/apis/meta/v1alpha1" fuzz "github.com/google/gofuzz" runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer" @@ -30,7 +31,7 @@ var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} { func(s *v1alpha1.PodView, c fuzz.Continue) { c.FuzzNoCustom(s) // fuzz self without calling this function again }, - func(s *v1alpha1.Project, c fuzz.Continue) { + func(s *v1alpha12.Project, c fuzz.Continue) { c.FuzzNoCustom(s) // fuzz self without calling this function again }, func(s *v1alpha1.ResourceSummary, c fuzz.Continue) { diff --git a/apis/core/v1alpha1/openapi_generated.go b/apis/core/v1alpha1/openapi_generated.go index e539ac1dc..53f9c2032 100644 --- a/apis/core/v1alpha1/openapi_generated.go +++ b/apis/core/v1alpha1/openapi_generated.go @@ -314,10 +314,6 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kmodules.xyz/resource-metadata/apis/core/v1alpha1.PodView": schema_resource_metadata_apis_core_v1alpha1_PodView(ref), "kmodules.xyz/resource-metadata/apis/core/v1alpha1.PodViewList": schema_resource_metadata_apis_core_v1alpha1_PodViewList(ref), "kmodules.xyz/resource-metadata/apis/core/v1alpha1.PodViewSpec": schema_resource_metadata_apis_core_v1alpha1_PodViewSpec(ref), - "kmodules.xyz/resource-metadata/apis/core/v1alpha1.Project": schema_resource_metadata_apis_core_v1alpha1_Project(ref), - "kmodules.xyz/resource-metadata/apis/core/v1alpha1.ProjectList": schema_resource_metadata_apis_core_v1alpha1_ProjectList(ref), - "kmodules.xyz/resource-metadata/apis/core/v1alpha1.ProjectSpec": schema_resource_metadata_apis_core_v1alpha1_ProjectSpec(ref), - "kmodules.xyz/resource-metadata/apis/core/v1alpha1.ProjectStatus": schema_resource_metadata_apis_core_v1alpha1_ProjectStatus(ref), "kmodules.xyz/resource-metadata/apis/core/v1alpha1.ResourceCalculator": schema_resource_metadata_apis_core_v1alpha1_ResourceCalculator(ref), "kmodules.xyz/resource-metadata/apis/core/v1alpha1.ResourceCalculatorResponse": schema_resource_metadata_apis_core_v1alpha1_ResourceCalculatorResponse(ref), "kmodules.xyz/resource-metadata/apis/core/v1alpha1.ResourceSummary": schema_resource_metadata_apis_core_v1alpha1_ResourceSummary(ref), @@ -15676,153 +15672,6 @@ func schema_resource_metadata_apis_core_v1alpha1_PodViewSpec(ref common.Referenc } } -func schema_resource_metadata_apis_core_v1alpha1_Project(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Project is the Schema for the projects API", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/core/v1alpha1.ProjectSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/core/v1alpha1.ProjectStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kmodules.xyz/resource-metadata/apis/core/v1alpha1.ProjectSpec", "kmodules.xyz/resource-metadata/apis/core/v1alpha1.ProjectStatus"}, - } -} - -func schema_resource_metadata_apis_core_v1alpha1_ProjectList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ProjectList contains a list of Project", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/core/v1alpha1.Project"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kmodules.xyz/resource-metadata/apis/core/v1alpha1.Project"}, - } -} - -func schema_resource_metadata_apis_core_v1alpha1_ProjectSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ProjectSpec defines the desired state of Project", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "namespaces": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "namespaceSelector": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, - } -} - -func schema_resource_metadata_apis_core_v1alpha1_ProjectStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ProjectStatus defines the observed state of Project", - Type: []string{"object"}, - }, - }, - } -} - func schema_resource_metadata_apis_core_v1alpha1_ResourceCalculator(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/apis/core/v1alpha1/zz_generated.deepcopy.go b/apis/core/v1alpha1/zz_generated.deepcopy.go index 333e60083..bed311805 100644 --- a/apis/core/v1alpha1/zz_generated.deepcopy.go +++ b/apis/core/v1alpha1/zz_generated.deepcopy.go @@ -27,7 +27,6 @@ import ( v1 "k8s.io/api/core/v1" resource "k8s.io/apimachinery/pkg/api/resource" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" version "k8s.io/apimachinery/pkg/version" ) @@ -583,109 +582,6 @@ func (in *PodViewSpec) DeepCopy() *PodViewSpec { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Project) DeepCopyInto(out *Project) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Project. -func (in *Project) DeepCopy() *Project { - if in == nil { - return nil - } - out := new(Project) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Project) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProjectList) DeepCopyInto(out *ProjectList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Project, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectList. -func (in *ProjectList) DeepCopy() *ProjectList { - if in == nil { - return nil - } - out := new(ProjectList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ProjectList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProjectSpec) DeepCopyInto(out *ProjectSpec) { - *out = *in - if in.Namespaces != nil { - in, out := &in.Namespaces, &out.Namespaces - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.NamespaceSelector != nil { - in, out := &in.NamespaceSelector, &out.NamespaceSelector - *out = new(metav1.LabelSelector) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectSpec. -func (in *ProjectSpec) DeepCopy() *ProjectSpec { - if in == nil { - return nil - } - out := new(ProjectSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProjectStatus) DeepCopyInto(out *ProjectStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectStatus. -func (in *ProjectStatus) DeepCopy() *ProjectStatus { - if in == nil { - return nil - } - out := new(ProjectStatus) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ResourceCalculator) DeepCopyInto(out *ResourceCalculator) { *out = *in diff --git a/apis/meta/v1alpha1/openapi_generated.go b/apis/meta/v1alpha1/openapi_generated.go index 9de600e4b..2960132a1 100644 --- a/apis/meta/v1alpha1/openapi_generated.go +++ b/apis/meta/v1alpha1/openapi_generated.go @@ -330,6 +330,11 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kmodules.xyz/resource-metadata/apis/meta/v1alpha1.PageBlockTableDefinition": schema_resource_metadata_apis_meta_v1alpha1_PageBlockTableDefinition(ref), "kmodules.xyz/resource-metadata/apis/meta/v1alpha1.PageBlockView": schema_resource_metadata_apis_meta_v1alpha1_PageBlockView(ref), "kmodules.xyz/resource-metadata/apis/meta/v1alpha1.PanelLinkResponse": schema_resource_metadata_apis_meta_v1alpha1_PanelLinkResponse(ref), + "kmodules.xyz/resource-metadata/apis/meta/v1alpha1.Project": schema_resource_metadata_apis_meta_v1alpha1_Project(ref), + "kmodules.xyz/resource-metadata/apis/meta/v1alpha1.ProjectList": schema_resource_metadata_apis_meta_v1alpha1_ProjectList(ref), + "kmodules.xyz/resource-metadata/apis/meta/v1alpha1.ProjectMonitoring": schema_resource_metadata_apis_meta_v1alpha1_ProjectMonitoring(ref), + "kmodules.xyz/resource-metadata/apis/meta/v1alpha1.ProjectSpec": schema_resource_metadata_apis_meta_v1alpha1_ProjectSpec(ref), + "kmodules.xyz/resource-metadata/apis/meta/v1alpha1.ProjectStatus": schema_resource_metadata_apis_meta_v1alpha1_ProjectStatus(ref), "kmodules.xyz/resource-metadata/apis/meta/v1alpha1.Render": schema_resource_metadata_apis_meta_v1alpha1_Render(ref), "kmodules.xyz/resource-metadata/apis/meta/v1alpha1.RenderDashboard": schema_resource_metadata_apis_meta_v1alpha1_RenderDashboard(ref), "kmodules.xyz/resource-metadata/apis/meta/v1alpha1.RenderDashboardRequest": schema_resource_metadata_apis_meta_v1alpha1_RenderDashboardRequest(ref), @@ -16134,6 +16139,213 @@ func schema_resource_metadata_apis_meta_v1alpha1_PanelLinkResponse(ref common.Re } } +func schema_resource_metadata_apis_meta_v1alpha1_Project(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Project is the Schema for the projects API", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/resource-metadata/apis/meta/v1alpha1.ProjectSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/resource-metadata/apis/meta/v1alpha1.ProjectStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kmodules.xyz/resource-metadata/apis/meta/v1alpha1.ProjectSpec", "kmodules.xyz/resource-metadata/apis/meta/v1alpha1.ProjectStatus"}, + } +} + +func schema_resource_metadata_apis_meta_v1alpha1_ProjectList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ProjectList contains a list of Project", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/resource-metadata/apis/meta/v1alpha1.Project"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kmodules.xyz/resource-metadata/apis/meta/v1alpha1.Project"}, + } +} + +func schema_resource_metadata_apis_meta_v1alpha1_ProjectMonitoring(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "prometheusURL": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "grafanaURL": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "alertmanagerURL": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "prometheusRef": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kmodules.xyz/client-go/api/v1.ObjectReference"), + }, + }, + "alertmanagerRef": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kmodules.xyz/client-go/api/v1.ObjectReference"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "kmodules.xyz/client-go/api/v1.ObjectReference"}, + } +} + +func schema_resource_metadata_apis_meta_v1alpha1_ProjectSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ProjectSpec defines the desired state of Project", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "namespaces": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "namespaceSelector": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + }, + }, + "monitoring": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kmodules.xyz/resource-metadata/apis/meta/v1alpha1.ProjectMonitoring"), + }, + }, + "presets": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/resource-metadata/apis/meta/v1alpha1.SourceLocator"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "kmodules.xyz/resource-metadata/apis/meta/v1alpha1.ProjectMonitoring", "kmodules.xyz/resource-metadata/apis/meta/v1alpha1.SourceLocator"}, + } +} + +func schema_resource_metadata_apis_meta_v1alpha1_ProjectStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ProjectStatus defines the observed state of Project", + Type: []string{"object"}, + }, + }, + } +} + func schema_resource_metadata_apis_meta_v1alpha1_Render(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/apis/core/v1alpha1/project_types.go b/apis/meta/v1alpha1/project_types.go similarity index 75% rename from apis/core/v1alpha1/project_types.go rename to apis/meta/v1alpha1/project_types.go index 6461dbcef..54a1e730f 100644 --- a/apis/core/v1alpha1/project_types.go +++ b/apis/meta/v1alpha1/project_types.go @@ -18,6 +18,8 @@ package v1alpha1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + kmapi "kmodules.xyz/client-go/api/v1" + "kmodules.xyz/resource-metadata/apis/core/v1alpha1" ) const ( @@ -32,6 +34,16 @@ type ProjectSpec struct { Type ProjectType `json:"type,omitempty"` Namespaces []string `json:"namespaces,omitempty"` NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty"` + Monitoring *ProjectMonitoring `json:"monitoring,omitempty"` + Presets []SourceLocator `json:"presets,omitempty"` +} + +type ProjectMonitoring struct { + PrometheusURL string `json:"prometheusURL,omitempty"` + GrafanaURL string `json:"grafanaURL,omitempty"` + AlertmanagerURL string `json:"alertmanagerURL,omitempty"` + PrometheusRef *kmapi.ObjectReference `json:"prometheusRef,omitempty"` + AlertmanagerRef *kmapi.ObjectReference `json:"alertmanagerRef,omitempty"` } // +kubebuilder:validation:Enum=Default;System;User @@ -73,5 +85,5 @@ type ProjectList struct { } func init() { - SchemeBuilder.Register(&Project{}, &ProjectList{}) + v1alpha1.SchemeBuilder.Register(&Project{}, &ProjectList{}) } diff --git a/apis/meta/v1alpha1/zz_generated.deepcopy.go b/apis/meta/v1alpha1/zz_generated.deepcopy.go index 4128cff22..dfa431fbb 100644 --- a/apis/meta/v1alpha1/zz_generated.deepcopy.go +++ b/apis/meta/v1alpha1/zz_generated.deepcopy.go @@ -836,6 +836,145 @@ func (in *PanelLinkResponse) DeepCopy() *PanelLinkResponse { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Project) DeepCopyInto(out *Project) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Project. +func (in *Project) DeepCopy() *Project { + if in == nil { + return nil + } + out := new(Project) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Project) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectList) DeepCopyInto(out *ProjectList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Project, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectList. +func (in *ProjectList) DeepCopy() *ProjectList { + if in == nil { + return nil + } + out := new(ProjectList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ProjectList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectMonitoring) DeepCopyInto(out *ProjectMonitoring) { + *out = *in + if in.PrometheusRef != nil { + in, out := &in.PrometheusRef, &out.PrometheusRef + *out = new(apiv1.ObjectReference) + **out = **in + } + if in.AlertmanagerRef != nil { + in, out := &in.AlertmanagerRef, &out.AlertmanagerRef + *out = new(apiv1.ObjectReference) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectMonitoring. +func (in *ProjectMonitoring) DeepCopy() *ProjectMonitoring { + if in == nil { + return nil + } + out := new(ProjectMonitoring) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectSpec) DeepCopyInto(out *ProjectSpec) { + *out = *in + if in.Namespaces != nil { + in, out := &in.Namespaces, &out.Namespaces + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.NamespaceSelector != nil { + in, out := &in.NamespaceSelector, &out.NamespaceSelector + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) + } + if in.Monitoring != nil { + in, out := &in.Monitoring, &out.Monitoring + *out = new(ProjectMonitoring) + (*in).DeepCopyInto(*out) + } + if in.Presets != nil { + in, out := &in.Presets, &out.Presets + *out = make([]SourceLocator, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectSpec. +func (in *ProjectSpec) DeepCopy() *ProjectSpec { + if in == nil { + return nil + } + out := new(ProjectSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectStatus) DeepCopyInto(out *ProjectStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectStatus. +func (in *ProjectStatus) DeepCopy() *ProjectStatus { + if in == nil { + return nil + } + out := new(ProjectStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Render) DeepCopyInto(out *Render) { *out = *in diff --git a/client/clientset/versioned/typed/core/v1alpha1/core_client.go b/client/clientset/versioned/typed/core/v1alpha1/core_client.go index 0d8fe5675..315f11d99 100644 --- a/client/clientset/versioned/typed/core/v1alpha1/core_client.go +++ b/client/clientset/versioned/typed/core/v1alpha1/core_client.go @@ -31,7 +31,6 @@ type CoreV1alpha1Interface interface { GenericResourcesGetter GenericResourceServicesGetter PodViewsGetter - ProjectsGetter ResourceCalculatorsGetter ResourceSummariesGetter } @@ -53,10 +52,6 @@ func (c *CoreV1alpha1Client) PodViews(namespace string) PodViewInterface { return newPodViews(c, namespace) } -func (c *CoreV1alpha1Client) Projects() ProjectInterface { - return newProjects(c) -} - func (c *CoreV1alpha1Client) ResourceCalculators() ResourceCalculatorInterface { return newResourceCalculators(c) } diff --git a/client/clientset/versioned/typed/core/v1alpha1/fake/fake_core_client.go b/client/clientset/versioned/typed/core/v1alpha1/fake/fake_core_client.go index e40835870..2f2a70fc9 100644 --- a/client/clientset/versioned/typed/core/v1alpha1/fake/fake_core_client.go +++ b/client/clientset/versioned/typed/core/v1alpha1/fake/fake_core_client.go @@ -40,10 +40,6 @@ func (c *FakeCoreV1alpha1) PodViews(namespace string) v1alpha1.PodViewInterface return &FakePodViews{c, namespace} } -func (c *FakeCoreV1alpha1) Projects() v1alpha1.ProjectInterface { - return &FakeProjects{c} -} - func (c *FakeCoreV1alpha1) ResourceCalculators() v1alpha1.ResourceCalculatorInterface { return &FakeResourceCalculators{c} } diff --git a/client/clientset/versioned/typed/core/v1alpha1/fake/fake_project.go b/client/clientset/versioned/typed/core/v1alpha1/fake/fake_project.go index dfc32eb1a..f4c36ef67 100644 --- a/client/clientset/versioned/typed/core/v1alpha1/fake/fake_project.go +++ b/client/clientset/versioned/typed/core/v1alpha1/fake/fake_project.go @@ -20,12 +20,12 @@ package fake import ( "context" + "kmodules.xyz/resource-metadata/apis/meta/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" testing "k8s.io/client-go/testing" - v1alpha1 "kmodules.xyz/resource-metadata/apis/core/v1alpha1" ) // FakeProjects implements ProjectInterface diff --git a/client/clientset/versioned/typed/core/v1alpha1/generated_expansion.go b/client/clientset/versioned/typed/core/v1alpha1/generated_expansion.go index 6c0f4130e..47363aeb4 100644 --- a/client/clientset/versioned/typed/core/v1alpha1/generated_expansion.go +++ b/client/clientset/versioned/typed/core/v1alpha1/generated_expansion.go @@ -24,8 +24,6 @@ type GenericResourceServiceExpansion interface{} type PodViewExpansion interface{} -type ProjectExpansion interface{} - type ResourceCalculatorExpansion interface{} type ResourceSummaryExpansion interface{} diff --git a/client/clientset/versioned/typed/meta/v1alpha1/fake/fake_meta_client.go b/client/clientset/versioned/typed/meta/v1alpha1/fake/fake_meta_client.go index 1a042b381..3bab88ec8 100644 --- a/client/clientset/versioned/typed/meta/v1alpha1/fake/fake_meta_client.go +++ b/client/clientset/versioned/typed/meta/v1alpha1/fake/fake_meta_client.go @@ -36,6 +36,10 @@ func (c *FakeMetaV1alpha1) MenuOutlines(namespace string) v1alpha1.MenuOutlineIn return &FakeMenuOutlines{c, namespace} } +func (c *FakeMetaV1alpha1) Projects() v1alpha1.ProjectInterface { + return &FakeProjects{c} +} + func (c *FakeMetaV1alpha1) Renders() v1alpha1.RenderInterface { return &FakeRenders{c} } diff --git a/client/clientset/versioned/typed/meta/v1alpha1/fake/fake_project.go b/client/clientset/versioned/typed/meta/v1alpha1/fake/fake_project.go new file mode 100644 index 000000000..1944e6314 --- /dev/null +++ b/client/clientset/versioned/typed/meta/v1alpha1/fake/fake_project.go @@ -0,0 +1,69 @@ +/* +Copyright AppsCode Inc. and Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" + v1alpha1 "kmodules.xyz/resource-metadata/apis/meta/v1alpha1" +) + +// FakeProjects implements ProjectInterface +type FakeProjects struct { + Fake *FakeMetaV1alpha1 +} + +var projectsResource = schema.GroupVersionResource{Group: "meta.k8s.appscode.com", Version: "v1alpha1", Resource: "projects"} + +var projectsKind = schema.GroupVersionKind{Group: "meta.k8s.appscode.com", Version: "v1alpha1", Kind: "Project"} + +// Get takes name of the project, and returns the corresponding project object, and an error if there is any. +func (c *FakeProjects) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Project, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(projectsResource, name), &v1alpha1.Project{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.Project), err +} + +// List takes label and field selectors, and returns the list of Projects that match those selectors. +func (c *FakeProjects) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ProjectList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(projectsResource, projectsKind, opts), &v1alpha1.ProjectList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.ProjectList{ListMeta: obj.(*v1alpha1.ProjectList).ListMeta} + for _, item := range obj.(*v1alpha1.ProjectList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} diff --git a/client/clientset/versioned/typed/meta/v1alpha1/generated_expansion.go b/client/clientset/versioned/typed/meta/v1alpha1/generated_expansion.go index 237fcb6b6..fb81f2554 100644 --- a/client/clientset/versioned/typed/meta/v1alpha1/generated_expansion.go +++ b/client/clientset/versioned/typed/meta/v1alpha1/generated_expansion.go @@ -22,6 +22,8 @@ type ChartPresetQueryExpansion interface{} type MenuOutlineExpansion interface{} +type ProjectExpansion interface{} + type RenderExpansion interface{} type RenderDashboardExpansion interface{} diff --git a/client/clientset/versioned/typed/meta/v1alpha1/meta_client.go b/client/clientset/versioned/typed/meta/v1alpha1/meta_client.go index e6839e114..bac45ac60 100644 --- a/client/clientset/versioned/typed/meta/v1alpha1/meta_client.go +++ b/client/clientset/versioned/typed/meta/v1alpha1/meta_client.go @@ -30,6 +30,7 @@ type MetaV1alpha1Interface interface { RESTClient() rest.Interface ChartPresetQueriesGetter MenuOutlinesGetter + ProjectsGetter RendersGetter RenderDashboardsGetter RenderMenusGetter @@ -56,6 +57,10 @@ func (c *MetaV1alpha1Client) MenuOutlines(namespace string) MenuOutlineInterface return newMenuOutlines(c, namespace) } +func (c *MetaV1alpha1Client) Projects() ProjectInterface { + return newProjects(c) +} + func (c *MetaV1alpha1Client) Renders() RenderInterface { return newRenders(c) } diff --git a/client/clientset/versioned/typed/core/v1alpha1/project.go b/client/clientset/versioned/typed/meta/v1alpha1/project.go similarity index 95% rename from client/clientset/versioned/typed/core/v1alpha1/project.go rename to client/clientset/versioned/typed/meta/v1alpha1/project.go index 555867e76..01af1b25a 100644 --- a/client/clientset/versioned/typed/core/v1alpha1/project.go +++ b/client/clientset/versioned/typed/meta/v1alpha1/project.go @@ -24,7 +24,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" rest "k8s.io/client-go/rest" - v1alpha1 "kmodules.xyz/resource-metadata/apis/core/v1alpha1" + v1alpha1 "kmodules.xyz/resource-metadata/apis/meta/v1alpha1" scheme "kmodules.xyz/resource-metadata/client/clientset/versioned/scheme" ) @@ -47,7 +47,7 @@ type projects struct { } // newProjects returns a Projects -func newProjects(c *CoreV1alpha1Client) *projects { +func newProjects(c *MetaV1alpha1Client) *projects { return &projects{ client: c.RESTClient(), } diff --git a/crds/meta.k8s.appscode.com_projects.yaml b/crds/meta.k8s.appscode.com_projects.yaml new file mode 100644 index 000000000..6218eae64 --- /dev/null +++ b/crds/meta.k8s.appscode.com_projects.yaml @@ -0,0 +1,178 @@ + +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + creationTimestamp: null + name: projects.meta.k8s.appscode.com +spec: + group: meta.k8s.appscode.com + names: + kind: Project + listKind: ProjectList + plural: projects + singular: project + scope: Cluster + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: Project is the Schema for the projects API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: ProjectSpec defines the desired state of Project + properties: + monitoring: + properties: + alertmanagerRef: + description: ObjectReference contains enough information to let + you inspect or modify the referred object. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + required: + - name + type: object + alertmanagerURL: + type: string + grafanaURL: + type: string + prometheusRef: + description: ObjectReference contains enough information to let + you inspect or modify the referred object. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + required: + - name + type: object + prometheusURL: + type: string + type: object + namespaceSelector: + description: A label selector is a label query over a set of resources. + The result of matchLabels and matchExpressions are ANDed. An empty + label selector matches all objects. A null label selector matches + no objects. + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector requirement is a selector that + contains values, a key, and an operator that relates the key + and values. + properties: + key: + description: key is the label key that the selector applies + to. + type: string + operator: + description: operator represents a key's relationship to + a set of values. Valid operators are In, NotIn, Exists + and DoesNotExist. + type: string + values: + description: values is an array of string values. If the + operator is In or NotIn, the values array must be non-empty. + If the operator is Exists or DoesNotExist, the values + array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. A single + {key,value} in the matchLabels map is equivalent to an element + of matchExpressions, whose key field is "key", the operator + is "In", and the values array contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + presets: + items: + properties: + ref: + description: ObjectReference contains enough information to + let you inspect or modify the referred object. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + required: + - name + type: object + resource: + description: ResourceID identifies a resource + properties: + group: + type: string + kind: + description: Kind is the serialized kind of the resource. It + is normally CamelCase and singular. + type: string + name: + description: 'Name is the plural name of the resource to + serve. It must match the name of the CustomResourceDefinition-registration + too: plural.group and it must be all lowercase.' + type: string + scope: + description: ResourceScope is an enum defining the different + scopes available to a custom resource + type: string + version: + type: string + required: + - group + type: object + type: object + type: array + type: + default: User + enum: + - Default + - System + - User + type: string + type: object + status: + description: ProjectStatus defines the observed state of Project + type: object + type: object + served: true + storage: true diff --git a/go.mod b/go.mod index e0229546b..bfa5752d3 100644 --- a/go.mod +++ b/go.mod @@ -26,7 +26,7 @@ require ( k8s.io/klog/v2 v2.80.1 k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 kmodules.xyz/apiversion v0.2.0 - kmodules.xyz/client-go v0.25.34-0.20230920171733-80f7303d9ec0 + kmodules.xyz/client-go v0.25.34-0.20230921171922-af0189b22d8c kmodules.xyz/crd-schema-fuzz v0.25.0 kmodules.xyz/resource-metrics v0.25.2 kmodules.xyz/schema-checker v0.4.1 diff --git a/go.sum b/go.sum index c5eacf1f5..1a9dddb89 100644 --- a/go.sum +++ b/go.sum @@ -731,8 +731,8 @@ k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2 h1:GfD9OzL11kvZN5iArC6oTS7RTj7oJ k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= kmodules.xyz/apiversion v0.2.0 h1:vAQYqZFm4xu4pbB1cAdHbFEPES6EQkcR4wc06xdTOWk= kmodules.xyz/apiversion v0.2.0/go.mod h1:oPX8g8LvlPdPX3Yc5YvCzJHQnw3YF/X4/jdW0b1am80= -kmodules.xyz/client-go v0.25.34-0.20230920171733-80f7303d9ec0 h1:587Wc7z8wIvA3qmS0e8F5qjVuoVbCwLykUVIbcEGtpM= -kmodules.xyz/client-go v0.25.34-0.20230920171733-80f7303d9ec0/go.mod h1:r/Va2Y6t1G8X1sPRjrQC6FWB3oh/i6rjssmlfJnbCmg= +kmodules.xyz/client-go v0.25.34-0.20230921171922-af0189b22d8c h1:wbjDs8HiVh+rdLgh98DAAaaj9JrDe7d4aag91HRAT3A= +kmodules.xyz/client-go v0.25.34-0.20230921171922-af0189b22d8c/go.mod h1:r/Va2Y6t1G8X1sPRjrQC6FWB3oh/i6rjssmlfJnbCmg= kmodules.xyz/crd-schema-fuzz v0.25.0 h1:c5ZxNRqJak1bkGhECmyrKpzKGThFMB4088Kynyvngbc= kmodules.xyz/crd-schema-fuzz v0.25.0/go.mod h1:VigFz19GwCxMGhb3YjCtlSXmfXb0J/g9du1So6rvqsk= kmodules.xyz/offshoot-api v0.25.0 h1:Svq9da/+sg5afOjpgo9vx2J/Lu90Mo0aFxkdQmgKnGI= diff --git a/vendor/modules.txt b/vendor/modules.txt index d9214656f..c2ff4bbec 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -681,7 +681,7 @@ k8s.io/utils/trace # kmodules.xyz/apiversion v0.2.0 ## explicit; go 1.14 kmodules.xyz/apiversion -# kmodules.xyz/client-go v0.25.34-0.20230920171733-80f7303d9ec0 +# kmodules.xyz/client-go v0.25.34-0.20230921171922-af0189b22d8c ## explicit; go 1.18 kmodules.xyz/client-go kmodules.xyz/client-go/api/v1