diff --git a/apis/core/v1alpha1/openapi_generated.go b/apis/core/v1alpha1/openapi_generated.go index dd5f52ca8..77ec2c332 100644 --- a/apis/core/v1alpha1/openapi_generated.go +++ b/apis/core/v1alpha1/openapi_generated.go @@ -16234,12 +16234,6 @@ func schema_kmodulesxyz_client_go_api_v1_CertificateSpec(ref common.ReferenceCal Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "renewBefore": { - SchemaProps: spec.SchemaProps{ - Description: "Certificate renew before expiration duration", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), - }, - }, "dnsNames": { SchemaProps: spec.SchemaProps{ Description: "DNSNames is a list of subject alt names to be used on the Certificate.", @@ -16352,8 +16346,7 @@ func schema_kmodulesxyz_client_go_api_v1_ClusterInfo(ref common.ReferenceCallbac }, "capi": { SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/client-go/api/v1.CAPIClusterInfo"), + Ref: ref("kmodules.xyz/client-go/api/v1.CAPIClusterInfo"), }, }, }, diff --git a/apis/identity/v1alpha1/openapi_generated.go b/apis/identity/v1alpha1/openapi_generated.go index a7b3ea27e..2fd5f2d4e 100644 --- a/apis/identity/v1alpha1/openapi_generated.go +++ b/apis/identity/v1alpha1/openapi_generated.go @@ -16225,12 +16225,6 @@ func schema_kmodulesxyz_client_go_api_v1_CertificateSpec(ref common.ReferenceCal Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "renewBefore": { - SchemaProps: spec.SchemaProps{ - Description: "Certificate renew before expiration duration", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), - }, - }, "dnsNames": { SchemaProps: spec.SchemaProps{ Description: "DNSNames is a list of subject alt names to be used on the Certificate.", @@ -16343,8 +16337,7 @@ func schema_kmodulesxyz_client_go_api_v1_ClusterInfo(ref common.ReferenceCallbac }, "capi": { SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/client-go/api/v1.CAPIClusterInfo"), + Ref: ref("kmodules.xyz/client-go/api/v1.CAPIClusterInfo"), }, }, }, diff --git a/apis/management/v1alpha1/openapi_generated.go b/apis/management/v1alpha1/openapi_generated.go index 4c5d8f3d7..d0427f041 100644 --- a/apis/management/v1alpha1/openapi_generated.go +++ b/apis/management/v1alpha1/openapi_generated.go @@ -16214,12 +16214,6 @@ func schema_kmodulesxyz_client_go_api_v1_CertificateSpec(ref common.ReferenceCal Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "renewBefore": { - SchemaProps: spec.SchemaProps{ - Description: "Certificate renew before expiration duration", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), - }, - }, "dnsNames": { SchemaProps: spec.SchemaProps{ Description: "DNSNames is a list of subject alt names to be used on the Certificate.", @@ -16332,8 +16326,7 @@ func schema_kmodulesxyz_client_go_api_v1_ClusterInfo(ref common.ReferenceCallbac }, "capi": { SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/client-go/api/v1.CAPIClusterInfo"), + Ref: ref("kmodules.xyz/client-go/api/v1.CAPIClusterInfo"), }, }, }, diff --git a/apis/meta/v1alpha1/openapi_generated.go b/apis/meta/v1alpha1/openapi_generated.go index 00643b0e3..c6c58f3aa 100644 --- a/apis/meta/v1alpha1/openapi_generated.go +++ b/apis/meta/v1alpha1/openapi_generated.go @@ -357,9 +357,6 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kmodules.xyz/offshoot-api/api/v1.VolumeSource": schema_kmodulesxyz_offshoot_api_api_v1_VolumeSource(ref), "kmodules.xyz/resource-metadata/apis/meta/v1alpha1.AttributeDefinition": schema_resource_metadata_apis_meta_v1alpha1_AttributeDefinition(ref), "kmodules.xyz/resource-metadata/apis/meta/v1alpha1.ChartPresetQuery": schema_resource_metadata_apis_meta_v1alpha1_ChartPresetQuery(ref), - "kmodules.xyz/resource-metadata/apis/meta/v1alpha1.ClusterProfile": schema_resource_metadata_apis_meta_v1alpha1_ClusterProfile(ref), - "kmodules.xyz/resource-metadata/apis/meta/v1alpha1.ClusterProfileList": schema_resource_metadata_apis_meta_v1alpha1_ClusterProfileList(ref), - "kmodules.xyz/resource-metadata/apis/meta/v1alpha1.ClusterProfileSpec": schema_resource_metadata_apis_meta_v1alpha1_ClusterProfileSpec(ref), "kmodules.xyz/resource-metadata/apis/meta/v1alpha1.ClusterStatus": schema_resource_metadata_apis_meta_v1alpha1_ClusterStatus(ref), "kmodules.xyz/resource-metadata/apis/meta/v1alpha1.ClusterStatusResponse": schema_resource_metadata_apis_meta_v1alpha1_ClusterStatusResponse(ref), "kmodules.xyz/resource-metadata/apis/meta/v1alpha1.ColorDefinition": schema_resource_metadata_apis_meta_v1alpha1_ColorDefinition(ref), @@ -16304,12 +16301,6 @@ func schema_kmodulesxyz_client_go_api_v1_CertificateSpec(ref common.ReferenceCal Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "renewBefore": { - SchemaProps: spec.SchemaProps{ - Description: "Certificate renew before expiration duration", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), - }, - }, "dnsNames": { SchemaProps: spec.SchemaProps{ Description: "DNSNames is a list of subject alt names to be used on the Certificate.", @@ -16422,8 +16413,7 @@ func schema_kmodulesxyz_client_go_api_v1_ClusterInfo(ref common.ReferenceCallbac }, "capi": { SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/client-go/api/v1.CAPIClusterInfo"), + Ref: ref("kmodules.xyz/client-go/api/v1.CAPIClusterInfo"), }, }, }, @@ -18891,151 +18881,6 @@ func schema_resource_metadata_apis_meta_v1alpha1_ChartPresetQuery(ref common.Ref } } -func schema_resource_metadata_apis_meta_v1alpha1_ClusterProfile(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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.ClusterProfileSpec"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kmodules.xyz/resource-metadata/apis/meta/v1alpha1.ClusterProfileSpec"}, - } -} - -func schema_resource_metadata_apis_meta_v1alpha1_ClusterProfileList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ClusterProfileList contains a list of ClusterProfile", - 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.ClusterProfile"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kmodules.xyz/resource-metadata/apis/meta/v1alpha1.ClusterProfile"}, - } -} - -func schema_resource_metadata_apis_meta_v1alpha1_ClusterProfileSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ClusterProfileSpec defines the desired state of ClusterProfile", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "title": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "description": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "provider": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "requiredFeatureSets": { - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - }, - Required: []string{"title", "description"}, - }, - }, - } -} - func schema_resource_metadata_apis_meta_v1alpha1_ClusterStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/apis/meta/v1alpha1/register.go b/apis/meta/v1alpha1/register.go index 30a8cb7ac..1141f71e2 100644 --- a/apis/meta/v1alpha1/register.go +++ b/apis/meta/v1alpha1/register.go @@ -50,8 +50,6 @@ func Resource(resource string) schema.GroupResource { func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &ChartPresetQuery{}, - &ClusterProfile{}, - &ClusterProfileList{}, &ClusterStatus{}, &ResourceCalculator{}, &ResourceDescriptor{}, diff --git a/apis/meta/v1alpha1/zz_generated.deepcopy.go b/apis/meta/v1alpha1/zz_generated.deepcopy.go index 61c6504a8..25268f160 100644 --- a/apis/meta/v1alpha1/zz_generated.deepcopy.go +++ b/apis/meta/v1alpha1/zz_generated.deepcopy.go @@ -89,97 +89,6 @@ func (in *ChartPresetQuery) DeepCopyObject() runtime.Object { return nil } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterProfile) DeepCopyInto(out *ClusterProfile) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterProfile. -func (in *ClusterProfile) DeepCopy() *ClusterProfile { - if in == nil { - return nil - } - out := new(ClusterProfile) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterProfile) 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 *ClusterProfileList) DeepCopyInto(out *ClusterProfileList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ClusterProfile, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterProfileList. -func (in *ClusterProfileList) DeepCopy() *ClusterProfileList { - if in == nil { - return nil - } - out := new(ClusterProfileList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterProfileList) 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 *ClusterProfileSpec) DeepCopyInto(out *ClusterProfileSpec) { - *out = *in - if in.RequiredFeatureSets != nil { - in, out := &in.RequiredFeatureSets, &out.RequiredFeatureSets - *out = make(map[string]FeatureList, len(*in)) - for key, val := range *in { - var outVal []string - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = make(FeatureList, len(*in)) - copy(*out, *in) - } - (*out)[key] = outVal - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterProfileSpec. -func (in *ClusterProfileSpec) DeepCopy() *ClusterProfileSpec { - if in == nil { - return nil - } - out := new(ClusterProfileSpec) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus) { *out = *in diff --git a/apis/node/v1alpha1/openapi_generated.go b/apis/node/v1alpha1/openapi_generated.go index 00d35a3c2..d265ab45f 100644 --- a/apis/node/v1alpha1/openapi_generated.go +++ b/apis/node/v1alpha1/openapi_generated.go @@ -16213,12 +16213,6 @@ func schema_kmodulesxyz_client_go_api_v1_CertificateSpec(ref common.ReferenceCal Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "renewBefore": { - SchemaProps: spec.SchemaProps{ - Description: "Certificate renew before expiration duration", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), - }, - }, "dnsNames": { SchemaProps: spec.SchemaProps{ Description: "DNSNames is a list of subject alt names to be used on the Certificate.", @@ -16331,8 +16325,7 @@ func schema_kmodulesxyz_client_go_api_v1_ClusterInfo(ref common.ReferenceCallbac }, "capi": { SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/client-go/api/v1.CAPIClusterInfo"), + Ref: ref("kmodules.xyz/client-go/api/v1.CAPIClusterInfo"), }, }, }, diff --git a/apis/meta/v1alpha1/clusterprofile_types.go b/apis/ui/v1alpha1/clusterprofile_types.go similarity index 86% rename from apis/meta/v1alpha1/clusterprofile_types.go rename to apis/ui/v1alpha1/clusterprofile_types.go index c2796ef5d..a687c7b8c 100644 --- a/apis/meta/v1alpha1/clusterprofile_types.go +++ b/apis/ui/v1alpha1/clusterprofile_types.go @@ -28,12 +28,14 @@ const ( // ClusterProfileSpec defines the desired state of ClusterProfile type ClusterProfileSpec struct { - Title string `json:"title"` - Description string `json:"description"` - Provider string `json:"provider,omitempty"` - RequiredFeatureSets map[string]FeatureList `json:"requiredFeatureSets,omitempty"` + Title string `json:"title"` + Description string `json:"description"` + Provider string `json:"provider,omitempty"` + RequiredFeatureSets map[string]Features `json:"requiredFeatureSets,omitempty"` } +type Features []string + // ClusterProfile is the Schema for the clusterprofiles API // +genclient diff --git a/apis/ui/v1alpha1/openapi_generated.go b/apis/ui/v1alpha1/openapi_generated.go index f927d1af8..20e1d9b47 100644 --- a/apis/ui/v1alpha1/openapi_generated.go +++ b/apis/ui/v1alpha1/openapi_generated.go @@ -379,6 +379,9 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ActionTemplate": schema_resource_metadata_apis_ui_v1alpha1_ActionTemplate(ref), "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ActionTemplateGroup": schema_resource_metadata_apis_ui_v1alpha1_ActionTemplateGroup(ref), "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ChartInfo": schema_resource_metadata_apis_ui_v1alpha1_ChartInfo(ref), + "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ClusterProfile": schema_resource_metadata_apis_ui_v1alpha1_ClusterProfile(ref), + "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ClusterProfileList": schema_resource_metadata_apis_ui_v1alpha1_ClusterProfileList(ref), + "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ClusterProfileSpec": schema_resource_metadata_apis_ui_v1alpha1_ClusterProfileSpec(ref), "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ComponentStatus": schema_resource_metadata_apis_ui_v1alpha1_ComponentStatus(ref), "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.Dashboard": schema_resource_metadata_apis_ui_v1alpha1_Dashboard(ref), "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.DependentFeatureSet": schema_resource_metadata_apis_ui_v1alpha1_DependentFeatureSet(ref), @@ -16236,12 +16239,6 @@ func schema_kmodulesxyz_client_go_api_v1_CertificateSpec(ref common.ReferenceCal Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "renewBefore": { - SchemaProps: spec.SchemaProps{ - Description: "Certificate renew before expiration duration", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), - }, - }, "dnsNames": { SchemaProps: spec.SchemaProps{ Description: "DNSNames is a list of subject alt names to be used on the Certificate.", @@ -16354,8 +16351,7 @@ func schema_kmodulesxyz_client_go_api_v1_ClusterInfo(ref common.ReferenceCallbac }, "capi": { SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/client-go/api/v1.CAPIClusterInfo"), + Ref: ref("kmodules.xyz/client-go/api/v1.CAPIClusterInfo"), }, }, }, @@ -19834,6 +19830,151 @@ func schema_resource_metadata_apis_ui_v1alpha1_ChartInfo(ref common.ReferenceCal } } +func schema_resource_metadata_apis_ui_v1alpha1_ClusterProfile(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + 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/ui/v1alpha1.ClusterProfileSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ClusterProfileSpec"}, + } +} + +func schema_resource_metadata_apis_ui_v1alpha1_ClusterProfileList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterProfileList contains a list of ClusterProfile", + 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/ui/v1alpha1.ClusterProfile"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ClusterProfile"}, + } +} + +func schema_resource_metadata_apis_ui_v1alpha1_ClusterProfileSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterProfileSpec defines the desired state of ClusterProfile", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "title": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "description": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "provider": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "requiredFeatureSets": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + }, + Required: []string{"title", "description"}, + }, + }, + } +} + func schema_resource_metadata_apis_ui_v1alpha1_ComponentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/apis/ui/v1alpha1/register.go b/apis/ui/v1alpha1/register.go index 8c42fe15a..1b25f7db9 100644 --- a/apis/ui/v1alpha1/register.go +++ b/apis/ui/v1alpha1/register.go @@ -49,14 +49,16 @@ func Resource(resource string) schema.GroupResource { // Adds the list of known types to api.Scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &ResourceEditor{}, - &ResourceEditorList{}, - &ResourceDashboard{}, - &ResourceDashboardList{}, + &ClusterProfile{}, + &ClusterProfileList{}, &Feature{}, &FeatureList{}, - &FeatureSet{}, &FeatureSetList{}, + &FeatureSet{}, + &ResourceDashboard{}, + &ResourceDashboardList{}, + &ResourceEditor{}, + &ResourceEditorList{}, ) scheme.AddKnownTypes(SchemeGroupVersion, diff --git a/apis/ui/v1alpha1/zz_generated.deepcopy.go b/apis/ui/v1alpha1/zz_generated.deepcopy.go index dcbc37088..d00920bd5 100644 --- a/apis/ui/v1alpha1/zz_generated.deepcopy.go +++ b/apis/ui/v1alpha1/zz_generated.deepcopy.go @@ -104,6 +104,97 @@ func (in *ChartInfo) DeepCopy() *ChartInfo { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterProfile) DeepCopyInto(out *ClusterProfile) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterProfile. +func (in *ClusterProfile) DeepCopy() *ClusterProfile { + if in == nil { + return nil + } + out := new(ClusterProfile) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterProfile) 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 *ClusterProfileList) DeepCopyInto(out *ClusterProfileList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterProfile, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterProfileList. +func (in *ClusterProfileList) DeepCopy() *ClusterProfileList { + if in == nil { + return nil + } + out := new(ClusterProfileList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterProfileList) 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 *ClusterProfileSpec) DeepCopyInto(out *ClusterProfileSpec) { + *out = *in + if in.RequiredFeatureSets != nil { + in, out := &in.RequiredFeatureSets, &out.RequiredFeatureSets + *out = make(map[string]Features, len(*in)) + for key, val := range *in { + var outVal []string + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = make(Features, len(*in)) + copy(*out, *in) + } + (*out)[key] = outVal + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterProfileSpec. +func (in *ClusterProfileSpec) DeepCopy() *ClusterProfileSpec { + if in == nil { + return nil + } + out := new(ClusterProfileSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ComponentStatus) DeepCopyInto(out *ComponentStatus) { *out = *in @@ -458,6 +549,26 @@ func (in *FeatureStatus) DeepCopy() *FeatureStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in Features) DeepCopyInto(out *Features) { + { + in := &in + *out = make(Features, len(*in)) + copy(*out, *in) + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Features. +func (in Features) DeepCopy() Features { + if in == nil { + return nil + } + out := new(Features) + in.DeepCopyInto(out) + return *out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PanelLinkRequest) DeepCopyInto(out *PanelLinkRequest) { *out = *in 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 4afebab7c..c614071aa 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 @@ -32,10 +32,6 @@ func (c *FakeMetaV1alpha1) ChartPresetQueries() v1alpha1.ChartPresetQueryInterfa return &FakeChartPresetQueries{c} } -func (c *FakeMetaV1alpha1) ClusterProfiles() v1alpha1.ClusterProfileInterface { - return &FakeClusterProfiles{c} -} - func (c *FakeMetaV1alpha1) ClusterStatuses() v1alpha1.ClusterStatusInterface { return &FakeClusterStatuses{c} } diff --git a/client/clientset/versioned/typed/meta/v1alpha1/generated_expansion.go b/client/clientset/versioned/typed/meta/v1alpha1/generated_expansion.go index 77cf4cbe9..21bfb54b0 100644 --- a/client/clientset/versioned/typed/meta/v1alpha1/generated_expansion.go +++ b/client/clientset/versioned/typed/meta/v1alpha1/generated_expansion.go @@ -20,8 +20,6 @@ package v1alpha1 type ChartPresetQueryExpansion interface{} -type ClusterProfileExpansion interface{} - type ClusterStatusExpansion interface{} type MenuOutlineExpansion interface{} diff --git a/client/clientset/versioned/typed/meta/v1alpha1/meta_client.go b/client/clientset/versioned/typed/meta/v1alpha1/meta_client.go index a38a3582e..46e3e39b2 100644 --- a/client/clientset/versioned/typed/meta/v1alpha1/meta_client.go +++ b/client/clientset/versioned/typed/meta/v1alpha1/meta_client.go @@ -29,7 +29,6 @@ import ( type MetaV1alpha1Interface interface { RESTClient() rest.Interface ChartPresetQueriesGetter - ClusterProfilesGetter ClusterStatusesGetter MenuOutlinesGetter RendersGetter @@ -56,10 +55,6 @@ func (c *MetaV1alpha1Client) ChartPresetQueries() ChartPresetQueryInterface { return newChartPresetQueries(c) } -func (c *MetaV1alpha1Client) ClusterProfiles() ClusterProfileInterface { - return newClusterProfiles(c) -} - func (c *MetaV1alpha1Client) ClusterStatuses() ClusterStatusInterface { return newClusterStatuses(c) } diff --git a/client/clientset/versioned/typed/meta/v1alpha1/clusterprofile.go b/client/clientset/versioned/typed/ui/v1alpha1/clusterprofile.go similarity index 97% rename from client/clientset/versioned/typed/meta/v1alpha1/clusterprofile.go rename to client/clientset/versioned/typed/ui/v1alpha1/clusterprofile.go index 5ddda21a2..577880a25 100644 --- a/client/clientset/versioned/typed/meta/v1alpha1/clusterprofile.go +++ b/client/clientset/versioned/typed/ui/v1alpha1/clusterprofile.go @@ -26,7 +26,7 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" - v1alpha1 "kmodules.xyz/resource-metadata/apis/meta/v1alpha1" + v1alpha1 "kmodules.xyz/resource-metadata/apis/ui/v1alpha1" scheme "kmodules.xyz/resource-metadata/client/clientset/versioned/scheme" ) @@ -55,7 +55,7 @@ type clusterProfiles struct { } // newClusterProfiles returns a ClusterProfiles -func newClusterProfiles(c *MetaV1alpha1Client) *clusterProfiles { +func newClusterProfiles(c *UiV1alpha1Client) *clusterProfiles { return &clusterProfiles{ client: c.RESTClient(), } diff --git a/client/clientset/versioned/typed/meta/v1alpha1/fake/fake_clusterprofile.go b/client/clientset/versioned/typed/ui/v1alpha1/fake/fake_clusterprofile.go similarity index 98% rename from client/clientset/versioned/typed/meta/v1alpha1/fake/fake_clusterprofile.go rename to client/clientset/versioned/typed/ui/v1alpha1/fake/fake_clusterprofile.go index 4340deac2..e36e54fac 100644 --- a/client/clientset/versioned/typed/meta/v1alpha1/fake/fake_clusterprofile.go +++ b/client/clientset/versioned/typed/ui/v1alpha1/fake/fake_clusterprofile.go @@ -26,12 +26,12 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" - v1alpha1 "kmodules.xyz/resource-metadata/apis/meta/v1alpha1" + v1alpha1 "kmodules.xyz/resource-metadata/apis/ui/v1alpha1" ) // FakeClusterProfiles implements ClusterProfileInterface type FakeClusterProfiles struct { - Fake *FakeMetaV1alpha1 + Fake *FakeUiV1alpha1 } var clusterprofilesResource = v1alpha1.SchemeGroupVersion.WithResource("clusterprofiles") diff --git a/client/clientset/versioned/typed/ui/v1alpha1/fake/fake_ui_client.go b/client/clientset/versioned/typed/ui/v1alpha1/fake/fake_ui_client.go index 5822a0680..0d397df6e 100644 --- a/client/clientset/versioned/typed/ui/v1alpha1/fake/fake_ui_client.go +++ b/client/clientset/versioned/typed/ui/v1alpha1/fake/fake_ui_client.go @@ -28,6 +28,10 @@ type FakeUiV1alpha1 struct { *testing.Fake } +func (c *FakeUiV1alpha1) ClusterProfiles() v1alpha1.ClusterProfileInterface { + return &FakeClusterProfiles{c} +} + func (c *FakeUiV1alpha1) Features() v1alpha1.FeatureInterface { return &FakeFeatures{c} } diff --git a/client/clientset/versioned/typed/ui/v1alpha1/generated_expansion.go b/client/clientset/versioned/typed/ui/v1alpha1/generated_expansion.go index 50cb35347..c39a86fe2 100644 --- a/client/clientset/versioned/typed/ui/v1alpha1/generated_expansion.go +++ b/client/clientset/versioned/typed/ui/v1alpha1/generated_expansion.go @@ -18,6 +18,8 @@ limitations under the License. package v1alpha1 +type ClusterProfileExpansion interface{} + type FeatureExpansion interface{} type FeatureSetExpansion interface{} diff --git a/client/clientset/versioned/typed/ui/v1alpha1/ui_client.go b/client/clientset/versioned/typed/ui/v1alpha1/ui_client.go index d93a452df..42ad88ba3 100644 --- a/client/clientset/versioned/typed/ui/v1alpha1/ui_client.go +++ b/client/clientset/versioned/typed/ui/v1alpha1/ui_client.go @@ -28,6 +28,7 @@ import ( type UiV1alpha1Interface interface { RESTClient() rest.Interface + ClusterProfilesGetter FeaturesGetter FeatureSetsGetter ResourceDashboardsGetter @@ -39,6 +40,10 @@ type UiV1alpha1Client struct { restClient rest.Interface } +func (c *UiV1alpha1Client) ClusterProfiles() ClusterProfileInterface { + return newClusterProfiles(c) +} + func (c *UiV1alpha1Client) Features() FeatureInterface { return newFeatures(c) } diff --git a/cmd/resource-fmt/main.go b/cmd/resource-fmt/main.go index 7370edbfd..fd9d9cea7 100644 --- a/cmd/resource-fmt/main.go +++ b/cmd/resource-fmt/main.go @@ -145,7 +145,7 @@ func main() { fix := flag.Bool("fix", true, "Fix formatting") flag.Parse() - MustCheckType(metaapi.ClusterProfile{}, "clusterprofiles", *fix) + MustCheckType(uiapi.ClusterProfile{}, "clusterprofiles", *fix) MustCheckType(metaapi.MenuOutline{}, "menuoutlines", *fix) MustCheckType(metaapi.ResourceBlockDefinition{}, "resourceblockdefinitions", *fix) MustCheckType(metaapi.ResourceDescriptor{}, "resourcedescriptors", *fix) diff --git a/crds/core.k8s.appscode.com_genericresources.yaml b/crds/core.k8s.appscode.com_genericresources.yaml index 9e66496cf..42224dcfc 100644 --- a/crds/core.k8s.appscode.com_genericresources.yaml +++ b/crds/core.k8s.appscode.com_genericresources.yaml @@ -119,18 +119,17 @@ spec: type: string provider: enum: - - Aws - - Azure + - AKS - DigitalOcean - - GoogleCloud + - EKS + - Exoscale + - Generic + - GKE - Linode - Packet + - Rancher - Scaleway - Vultr - - BareMetal - - KIND - - Generic - - Private type: string uid: type: string diff --git a/crds/core.k8s.appscode.com_genericresourceservices.yaml b/crds/core.k8s.appscode.com_genericresourceservices.yaml index 70c8746e5..47a77c592 100644 --- a/crds/core.k8s.appscode.com_genericresourceservices.yaml +++ b/crds/core.k8s.appscode.com_genericresourceservices.yaml @@ -71,18 +71,17 @@ spec: type: string provider: enum: - - Aws - - Azure + - AKS - DigitalOcean - - GoogleCloud + - EKS + - Exoscale + - Generic + - GKE - Linode - Packet + - Rancher - Scaleway - Vultr - - BareMetal - - KIND - - Generic - - Private type: string uid: type: string diff --git a/crds/core.k8s.appscode.com_resourcesummaries.yaml b/crds/core.k8s.appscode.com_resourcesummaries.yaml index e9b5b7317..6bd8b36ab 100644 --- a/crds/core.k8s.appscode.com_resourcesummaries.yaml +++ b/crds/core.k8s.appscode.com_resourcesummaries.yaml @@ -119,18 +119,17 @@ spec: type: string provider: enum: - - Aws - - Azure + - AKS - DigitalOcean - - GoogleCloud + - EKS + - Exoscale + - Generic + - GKE - Linode - Packet + - Rancher - Scaleway - Vultr - - BareMetal - - KIND - - Generic - - Private type: string uid: type: string diff --git a/crds/identity.k8s.appscode.com_clusteridentitys.yaml b/crds/identity.k8s.appscode.com_clusteridentitys.yaml index 8315c19e5..c591f0c41 100644 --- a/crds/identity.k8s.appscode.com_clusteridentitys.yaml +++ b/crds/identity.k8s.appscode.com_clusteridentitys.yaml @@ -53,18 +53,17 @@ spec: type: string provider: enum: - - Aws - - Azure + - AKS - DigitalOcean - - GoogleCloud + - EKS + - Exoscale + - Generic + - GKE - Linode - Packet + - Rancher - Scaleway - Vultr - - BareMetal - - KIND - - Generic - - Private type: string uid: type: string diff --git a/crds/identity.k8s.appscode.com_siteinfos.yaml b/crds/identity.k8s.appscode.com_siteinfos.yaml index 5415cf5b8..80f1faa45 100644 --- a/crds/identity.k8s.appscode.com_siteinfos.yaml +++ b/crds/identity.k8s.appscode.com_siteinfos.yaml @@ -50,18 +50,17 @@ spec: type: string provider: enum: - - Aws - - Azure + - AKS - DigitalOcean - - GoogleCloud + - EKS + - Exoscale + - Generic + - GKE - Linode - Packet + - Rancher - Scaleway - Vultr - - BareMetal - - KIND - - Generic - - Private type: string uid: type: string diff --git a/crds/meta.k8s.appscode.com_clusterprofiles.yaml b/crds/ui.k8s.appscode.com_clusterprofiles.yaml similarity index 96% rename from crds/meta.k8s.appscode.com_clusterprofiles.yaml rename to crds/ui.k8s.appscode.com_clusterprofiles.yaml index ce427e85c..aee0a38ec 100644 --- a/crds/meta.k8s.appscode.com_clusterprofiles.yaml +++ b/crds/ui.k8s.appscode.com_clusterprofiles.yaml @@ -4,9 +4,9 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: creationTimestamp: null - name: clusterprofiles.meta.k8s.appscode.com + name: clusterprofiles.ui.k8s.appscode.com spec: - group: meta.k8s.appscode.com + group: ui.k8s.appscode.com names: kind: ClusterProfile listKind: ClusterProfileList diff --git a/go.mod b/go.mod index 9c70e2d58..c30a654eb 100644 --- a/go.mod +++ b/go.mod @@ -29,7 +29,7 @@ require ( k8s.io/klog/v2 v2.130.1 k8s.io/kube-openapi v0.0.0-20240703190633-0aa61b46e8c2 kmodules.xyz/apiversion v0.2.0 - kmodules.xyz/client-go v0.30.22-0.20241009094042-175fd7e41d7e + kmodules.xyz/client-go v0.30.27 kmodules.xyz/crd-schema-fuzz v0.29.1 kmodules.xyz/go-containerregistry v0.0.12 kmodules.xyz/offshoot-api v0.30.1 diff --git a/go.sum b/go.sum index fe6c50bf7..c85b52912 100644 --- a/go.sum +++ b/go.sum @@ -332,8 +332,8 @@ k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 h1:jgGTlFYnhF1PM1Ax/lAlxUPE+KfCI k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0/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.30.22-0.20241009094042-175fd7e41d7e h1:Fpeo10W+ypAqBngzRxokccAMtxM6ddEGUMnZEy2bSzU= -kmodules.xyz/client-go v0.30.22-0.20241009094042-175fd7e41d7e/go.mod h1:CAu+JlA8RVGtj6LQHu0Q1w2mnFUajuti49c7T1AvGdM= +kmodules.xyz/client-go v0.30.27 h1:pmM11k/XNVGTFp22qRsXBnGRnFeLNGX2lB9I0Gu+JWY= +kmodules.xyz/client-go v0.30.27/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/go-containerregistry v0.0.12 h1:Tl32QGmSqRVm9PUEb/f3dgDeu9zW5fVzt3qmAFIE37I= diff --git a/hub/clusterprofiles/ace/dbaas-aks.yaml b/hub/clusterprofiles/ace/dbaas-aks.yaml index 70c0553c9..43f14e37b 100644 --- a/hub/clusterprofiles/ace/dbaas-aks.yaml +++ b/hub/clusterprofiles/ace/dbaas-aks.yaml @@ -1,4 +1,4 @@ -apiVersion: meta.k8s.appscode.com/v1alpha1 +apiVersion: ui.k8s.appscode.com/v1alpha1 kind: ClusterProfile metadata: creationTimestamp: null diff --git a/hub/clusterprofiles/ace/dbaas-eks.yaml b/hub/clusterprofiles/ace/dbaas-eks.yaml index e72cfdd90..66d7f1a6b 100644 --- a/hub/clusterprofiles/ace/dbaas-eks.yaml +++ b/hub/clusterprofiles/ace/dbaas-eks.yaml @@ -1,4 +1,4 @@ -apiVersion: meta.k8s.appscode.com/v1alpha1 +apiVersion: ui.k8s.appscode.com/v1alpha1 kind: ClusterProfile metadata: creationTimestamp: null diff --git a/hub/clusterprofiles/ace/dbaas-generic.yaml b/hub/clusterprofiles/ace/dbaas-generic.yaml index d8b63ca68..e644f0f40 100644 --- a/hub/clusterprofiles/ace/dbaas-generic.yaml +++ b/hub/clusterprofiles/ace/dbaas-generic.yaml @@ -1,4 +1,4 @@ -apiVersion: meta.k8s.appscode.com/v1alpha1 +apiVersion: ui.k8s.appscode.com/v1alpha1 kind: ClusterProfile metadata: creationTimestamp: null diff --git a/hub/clusterprofiles/ace/dbaas-gke.yaml b/hub/clusterprofiles/ace/dbaas-gke.yaml index 41f1c8680..3f3b3f305 100644 --- a/hub/clusterprofiles/ace/dbaas-gke.yaml +++ b/hub/clusterprofiles/ace/dbaas-gke.yaml @@ -1,4 +1,4 @@ -apiVersion: meta.k8s.appscode.com/v1alpha1 +apiVersion: ui.k8s.appscode.com/v1alpha1 kind: ClusterProfile metadata: creationTimestamp: null diff --git a/hub/clusterprofiles/ace/generic.yaml b/hub/clusterprofiles/ace/generic.yaml index 94a609067..f2873fe7f 100644 --- a/hub/clusterprofiles/ace/generic.yaml +++ b/hub/clusterprofiles/ace/generic.yaml @@ -1,4 +1,4 @@ -apiVersion: meta.k8s.appscode.com/v1alpha1 +apiVersion: ui.k8s.appscode.com/v1alpha1 kind: ClusterProfile metadata: creationTimestamp: null diff --git a/hub/clusterprofiles/lib.go b/hub/clusterprofiles/lib.go index 9b4099831..491539944 100644 --- a/hub/clusterprofiles/lib.go +++ b/hub/clusterprofiles/lib.go @@ -17,6 +17,7 @@ limitations under the License. package clusterprofiles import ( + "context" "embed" iofs "io/fs" "path/filepath" @@ -24,11 +25,13 @@ import ( "sort" "sync" - "kmodules.xyz/resource-metadata/apis/meta/v1alpha1" + "kmodules.xyz/resource-metadata/apis/ui/v1alpha1" "github.com/pkg/errors" ioutilx "gomodules.xyz/x/ioutil" apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/meta" + "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/yaml" ) @@ -37,13 +40,13 @@ var ( fs embed.FS m sync.Mutex - moMap map[string]*v1alpha1.ClusterProfile + cpMap map[string]*v1alpha1.ClusterProfile loader = ioutilx.NewReloader( filepath.Join("/tmp", "hub", "clusterprofiles"), fs, func(fsys iofs.FS) { - moMap = map[string]*v1alpha1.ClusterProfile{} + cpMap = map[string]*v1alpha1.ClusterProfile{} if err := iofs.WalkDir(fsys, ".", func(path string, d iofs.DirEntry, err error) error { if d.IsDir() || err != nil { @@ -63,7 +66,7 @@ var ( if err != nil { return errors.Wrap(err, path) } - moMap[obj.Name] = &obj + cpMap[obj.Name] = &obj return nil }); err != nil { panic(errors.Wrapf(err, "failed to load %s", reflect.TypeOf(v1alpha1.ClusterProfile{}))) @@ -80,41 +83,66 @@ func EmbeddedFS() iofs.FS { return fs } -func LoadByName(name string) (*v1alpha1.ClusterProfile, error) { +func LoadInternalByName(name string) (*v1alpha1.ClusterProfile, error) { m.Lock() defer m.Unlock() loader.ReloadIfTriggered() - if obj, ok := moMap[name]; ok { + if obj, ok := cpMap[name]; ok { return obj, nil } return nil, apierrors.NewNotFound(v1alpha1.Resource(v1alpha1.ResourceKindClusterProfile), name) } -func List() []v1alpha1.ClusterProfile { +func LoadByName(kc client.Reader, name string) (*v1alpha1.ClusterProfile, error) { + var ed v1alpha1.ClusterProfile + err := kc.Get(context.TODO(), client.ObjectKey{Name: name}, &ed) + if meta.IsNoMatchError(err) || apierrors.IsNotFound(err) { + return LoadInternalByName(name) + } else if err != nil { + return nil, err + } + return &ed, nil +} + +func List(kc client.Reader) ([]v1alpha1.ClusterProfile, error) { m.Lock() defer m.Unlock() loader.ReloadIfTriggered() - out := make([]v1alpha1.ClusterProfile, 0, len(moMap)) - for _, rl := range moMap { - out = append(out, *rl) + var list v1alpha1.ClusterProfileList + err := kc.List(context.TODO(), &list) + if err != nil && !(meta.IsNoMatchError(err) || apierrors.IsNotFound(err)) { + return nil, err + } + + profiles := map[string]v1alpha1.ClusterProfile{} + for name, cp := range cpMap { + profiles[name] = *cp + } + for _, obj := range list.Items { + profiles[obj.Name] = obj + } + + out := make([]v1alpha1.ClusterProfile, 0, len(profiles)) + for _, cp := range profiles { + out = append(out, cp) } sort.Slice(out, func(i, j int) bool { return out[i].Name < out[j].Name }) - return out + return out, nil } -func Names() []string { - m.Lock() - defer m.Unlock() - loader.ReloadIfTriggered() +func Names(kc client.Reader) ([]string, error) { + list, err := List(kc) + if err != nil { + return nil, err + } - out := make([]string, 0, len(moMap)) - for name := range moMap { - out = append(out, name) + out := make([]string, 0, len(list)) + for _, obj := range list { + out = append(out, obj.Name) } - sort.Strings(out) - return out + return out, nil } diff --git a/hub/resourcedescriptors/core.k8s.appscode.com/v1alpha1/genericresources.yaml b/hub/resourcedescriptors/core.k8s.appscode.com/v1alpha1/genericresources.yaml index cf9f96f20..b391a1edb 100644 --- a/hub/resourcedescriptors/core.k8s.appscode.com/v1alpha1/genericresources.yaml +++ b/hub/resourcedescriptors/core.k8s.appscode.com/v1alpha1/genericresources.yaml @@ -148,18 +148,17 @@ spec: type: string provider: enum: - - Aws - - Azure + - AKS - DigitalOcean - - GoogleCloud + - EKS + - Exoscale + - Generic + - GKE - Linode - Packet + - Rancher - Scaleway - Vultr - - BareMetal - - KIND - - Generic - - Private type: string uid: type: string diff --git a/hub/resourcedescriptors/core.k8s.appscode.com/v1alpha1/genericresourceservices.yaml b/hub/resourcedescriptors/core.k8s.appscode.com/v1alpha1/genericresourceservices.yaml index e2957c577..577b1d080 100644 --- a/hub/resourcedescriptors/core.k8s.appscode.com/v1alpha1/genericresourceservices.yaml +++ b/hub/resourcedescriptors/core.k8s.appscode.com/v1alpha1/genericresourceservices.yaml @@ -102,18 +102,17 @@ spec: type: string provider: enum: - - Aws - - Azure + - AKS - DigitalOcean - - GoogleCloud + - EKS + - Exoscale + - Generic + - GKE - Linode - Packet + - Rancher - Scaleway - Vultr - - BareMetal - - KIND - - Generic - - Private type: string uid: type: string diff --git a/hub/resourcedescriptors/core.k8s.appscode.com/v1alpha1/resourcesummaries.yaml b/hub/resourcedescriptors/core.k8s.appscode.com/v1alpha1/resourcesummaries.yaml index eefab8db5..e4c5da001 100644 --- a/hub/resourcedescriptors/core.k8s.appscode.com/v1alpha1/resourcesummaries.yaml +++ b/hub/resourcedescriptors/core.k8s.appscode.com/v1alpha1/resourcesummaries.yaml @@ -148,18 +148,17 @@ spec: type: string provider: enum: - - Aws - - Azure + - AKS - DigitalOcean - - GoogleCloud + - EKS + - Exoscale + - Generic + - GKE - Linode - Packet + - Rancher - Scaleway - Vultr - - BareMetal - - KIND - - Generic - - Private type: string uid: type: string diff --git a/hub/resourcedescriptors/identity.k8s.appscode.com/v1alpha1/siteinfos.yaml b/hub/resourcedescriptors/identity.k8s.appscode.com/v1alpha1/siteinfos.yaml index d91b103a9..b9282b0f1 100644 --- a/hub/resourcedescriptors/identity.k8s.appscode.com/v1alpha1/siteinfos.yaml +++ b/hub/resourcedescriptors/identity.k8s.appscode.com/v1alpha1/siteinfos.yaml @@ -46,18 +46,17 @@ spec: type: string provider: enum: - - Aws - - Azure + - AKS - DigitalOcean - - GoogleCloud + - EKS + - Exoscale + - Generic + - GKE - Linode - Packet + - Rancher - Scaleway - Vultr - - BareMetal - - KIND - - Generic - - Private type: string uid: type: string diff --git a/hub/resourcedescriptors/meta.k8s.appscode.com/v1alpha1/clusterprofiles.yaml b/hub/resourcedescriptors/ui.k8s.appscode.com/v1alpha1/clusterprofiles.yaml similarity index 96% rename from hub/resourcedescriptors/meta.k8s.appscode.com/v1alpha1/clusterprofiles.yaml rename to hub/resourcedescriptors/ui.k8s.appscode.com/v1alpha1/clusterprofiles.yaml index dd12d7dd8..7cebe6ff1 100644 --- a/hub/resourcedescriptors/meta.k8s.appscode.com/v1alpha1/clusterprofiles.yaml +++ b/hub/resourcedescriptors/ui.k8s.appscode.com/v1alpha1/clusterprofiles.yaml @@ -3,14 +3,14 @@ kind: ResourceDescriptor metadata: creationTimestamp: null labels: - k8s.io/group: meta.k8s.appscode.com + k8s.io/group: ui.k8s.appscode.com k8s.io/kind: ClusterProfile k8s.io/resource: clusterprofiles k8s.io/version: v1alpha1 - name: meta.k8s.appscode.com-v1alpha1-clusterprofiles + name: ui.k8s.appscode.com-v1alpha1-clusterprofiles spec: resource: - group: meta.k8s.appscode.com + group: ui.k8s.appscode.com kind: ClusterProfile name: clusterprofiles scope: Cluster diff --git a/hub/resourceeditors/meta.k8s.appscode.com/v1alpha1/clusterprofiles.yaml b/hub/resourceeditors/meta.k8s.appscode.com/v1alpha1/clusterprofiles.yaml deleted file mode 100644 index ab2ca89fa..000000000 --- a/hub/resourceeditors/meta.k8s.appscode.com/v1alpha1/clusterprofiles.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: meta.k8s.appscode.com - k8s.io/kind: ClusterProfile - k8s.io/resource: clusterprofiles - k8s.io/version: v1alpha1 - name: meta.k8s.appscode.com-v1alpha1-clusterprofiles -spec: - resource: - group: meta.k8s.appscode.com - kind: ClusterProfile - name: clusterprofiles - scope: Cluster - version: v1alpha1 - ui: - editor: - name: metak8sappscodecom-clusterprofile-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.7.0 - enforceQuota: false diff --git a/hub/resourceeditors/ui.k8s.appscode.com/v1alpha1/clusterprofiles.yaml b/hub/resourceeditors/ui.k8s.appscode.com/v1alpha1/clusterprofiles.yaml new file mode 100644 index 000000000..c4d9348c8 --- /dev/null +++ b/hub/resourceeditors/ui.k8s.appscode.com/v1alpha1/clusterprofiles.yaml @@ -0,0 +1,17 @@ +apiVersion: ui.k8s.appscode.com/v1alpha1 +kind: ResourceEditor +metadata: + creationTimestamp: null + labels: + k8s.io/group: ui.k8s.appscode.com + k8s.io/kind: ClusterProfile + k8s.io/resource: clusterprofiles + k8s.io/version: v1alpha1 + name: ui.k8s.appscode.com-v1alpha1-clusterprofiles +spec: + resource: + group: ui.k8s.appscode.com + kind: ClusterProfile + name: clusterprofiles + scope: Cluster + version: v1alpha1 diff --git a/hub/resourcetabledefinitions/meta.k8s.appscode.com/v1alpha1/clusterprofiles.yaml b/hub/resourcetabledefinitions/ui.k8s.appscode.com/v1alpha1/clusterprofiles.yaml similarity index 73% rename from hub/resourcetabledefinitions/meta.k8s.appscode.com/v1alpha1/clusterprofiles.yaml rename to hub/resourcetabledefinitions/ui.k8s.appscode.com/v1alpha1/clusterprofiles.yaml index ab40d6e1c..fa36811ce 100644 --- a/hub/resourcetabledefinitions/meta.k8s.appscode.com/v1alpha1/clusterprofiles.yaml +++ b/hub/resourcetabledefinitions/ui.k8s.appscode.com/v1alpha1/clusterprofiles.yaml @@ -3,15 +3,15 @@ kind: ResourceTableDefinition metadata: creationTimestamp: null labels: - k8s.io/group: meta.k8s.appscode.com + k8s.io/group: ui.k8s.appscode.com k8s.io/kind: ClusterProfile k8s.io/resource: clusterprofiles k8s.io/version: v1alpha1 - name: meta.k8s.appscode.com-v1alpha1-clusterprofiles + name: ui.k8s.appscode.com-v1alpha1-clusterprofiles spec: defaultView: true resource: - group: meta.k8s.appscode.com + group: ui.k8s.appscode.com kind: ClusterProfile name: clusterprofiles scope: Cluster diff --git a/vendor/kmodules.xyz/client-go/api/v1/certificates.go b/vendor/kmodules.xyz/client-go/api/v1/certificates.go index d5e181427..a6ca4f774 100644 --- a/vendor/kmodules.xyz/client-go/api/v1/certificates.go +++ b/vendor/kmodules.xyz/client-go/api/v1/certificates.go @@ -58,6 +58,14 @@ type CertificateSpec struct { // +optional Duration *metav1.Duration `json:"duration,omitempty" protobuf:"bytes,5,opt,name=duration"` + // Certificate renew before expiration duration + // + // Deprecated use `ReconfigureTLS` type OpsRequest instead. + // + // +deprecated + // +optional + RenewBefore *metav1.Duration `json:"renewBefore,omitempty" protobuf:"bytes,6,opt,name=renewBefore"` + // DNSNames is a list of subject alt names to be used on the Certificate. // +optional DNSNames []string `json:"dnsNames,omitempty" protobuf:"bytes,7,rep,name=dnsNames"` diff --git a/vendor/kmodules.xyz/client-go/api/v1/generated.pb.go b/vendor/kmodules.xyz/client-go/api/v1/generated.pb.go index 02b2c851b..fac4e455c 100644 --- a/vendor/kmodules.xyz/client-go/api/v1/generated.pb.go +++ b/vendor/kmodules.xyz/client-go/api/v1/generated.pb.go @@ -598,124 +598,125 @@ func init() { } var fileDescriptor_af8e7a11c7a1ccd9 = []byte{ - // 1860 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xdd, 0x6f, 0x1b, 0x59, - 0x15, 0xf7, 0xd4, 0x4e, 0x62, 0x1f, 0x27, 0x75, 0x73, 0x5b, 0x54, 0x53, 0x51, 0x4f, 0x98, 0x8a, - 0x2a, 0x85, 0xed, 0x84, 0x44, 0x2d, 0x2c, 0x2b, 0x10, 0xc4, 0x4e, 0xb7, 0xeb, 0xdd, 0xb4, 0x31, - 0xd7, 0x29, 0xbb, 0x5a, 0x10, 0xe8, 0x66, 0xe6, 0xc6, 0xb9, 0x64, 0x3c, 0x33, 0xba, 0x77, 0xc6, - 0x90, 0x7d, 0xda, 0x47, 0x10, 0x2f, 0xe5, 0x8d, 0xc7, 0xad, 0xc4, 0x9f, 0x80, 0x84, 0xf8, 0x0b, - 0xe8, 0x63, 0x79, 0x41, 0x2b, 0x81, 0x2c, 0x6a, 0x5e, 0x11, 0x6f, 0x48, 0x28, 0x4f, 0xe8, 0xde, - 0xb9, 0xf3, 0x61, 0xc7, 0xd9, 0x64, 0x05, 0x12, 0x6f, 0x9e, 0xf3, 0xfb, 0x9d, 0x73, 0x3f, 0xce, - 0xe7, 0x35, 0xdc, 0x3f, 0x1e, 0x06, 0x6e, 0xec, 0x51, 0x61, 0xff, 0xfc, 0xe4, 0xa3, 0x0d, 0xc7, - 0x63, 0xd4, 0x8f, 0xee, 0x0f, 0x82, 0x0d, 0x12, 0xb2, 0x8d, 0xd1, 0xe6, 0xc6, 0x80, 0xfa, 0x94, - 0x93, 0x88, 0xba, 0x76, 0xc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x8d, 0x87, 0x07, - 0x94, 0xeb, 0x79, 0x33, 0x0b, 0xd4, 0x7e, 0x01, 0xc3, 0x53, 0xcc, 0x76, 0xe7, 0xe5, 0xeb, 0x56, - 0xe9, 0xd5, 0xeb, 0x56, 0xe9, 0xd3, 0xd7, 0xad, 0xd2, 0xc7, 0x93, 0x96, 0xf1, 0x72, 0xd2, 0x32, - 0x5e, 0x4d, 0x5a, 0xc6, 0xa7, 0x93, 0x96, 0xf1, 0xb7, 0x49, 0xcb, 0x78, 0xfe, 0xf7, 0x56, 0xe9, - 0xc3, 0xdb, 0x9f, 0xf9, 0xf7, 0xda, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x1e, 0xcb, 0xee, 0x96, - 0x7e, 0x13, 0x00, 0x00, + // 1886 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xdf, 0x6f, 0x5b, 0x49, + 0xf5, 0xf7, 0xad, 0x9d, 0xc4, 0x3e, 0x4e, 0xea, 0x66, 0xda, 0xaf, 0xea, 0x6f, 0x45, 0xed, 0x70, + 0x2b, 0xaa, 0x14, 0xb6, 0x37, 0x24, 0x6a, 0x61, 0x59, 0x81, 0x20, 0x76, 0xba, 0x5d, 0xef, 0xa6, + 0x8d, 0x19, 0xa7, 0xec, 0x6a, 0x41, 0xa0, 0xc9, 0xbd, 0xc7, 0xce, 0x90, 0xeb, 0x7b, 0xaf, 0x66, + 0xae, 0xb3, 0x64, 0x9f, 0xf6, 0x11, 0xc4, 0xcb, 0xf2, 0xc6, 0xe3, 0x56, 0xe2, 0x4f, 0x40, 0x42, + 0xfc, 0x05, 0xf4, 0xb1, 0xbc, 0xa0, 0x95, 0x40, 0x16, 0x35, 0xaf, 0x88, 0x17, 0x84, 0x84, 0xf2, + 0x84, 0x66, 0xee, 0x4f, 0x3b, 0xce, 0x26, 0x0b, 0x48, 0xbc, 0xf9, 0x9e, 0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 0xe1, + 0xa1, 0x5a, 0xb8, 0x94, 0xb5, 0xc0, 0xdd, 0x54, 0x4a, 0x73, 0x0c, 0xe5, 0xa7, 0x7e, 0x3f, 0x78, + 0x36, 0xaa, 0xa1, 0x39, 0xf5, 0xb3, 0x9b, 0x08, 0x69, 0x86, 0xab, 0xa7, 0x9b, 0x0c, 0x05, 0x62, + 0x98, 0x3d, 0x57, 0x17, 0xb3, 0xa7, 0x5b, 0x6f, 0x1a, 0xa2, 0xb3, 0x5c, 0xf5, 0x7a, 0x0e, 0x7c, + 0x19, 0x32, 0xb7, 0xed, 0x3b, 0xe9, 0x53, 0x5b, 0xbf, 0x9e, 0xbb, 0x99, 0x98, 0xe6, 0x39, 0xe4, + 0x75, 0x58, 0x96, 0x28, 0x38, 0x73, 0x9f, 0x8e, 0x86, 0x07, 0x28, 0xe2, 0x79, 0x33, 0x0d, 0xd4, + 0x5e, 0x0e, 0xa3, 0x53, 0xcc, 0x56, 0xfb, 0xc5, 0xab, 0x46, 0xe1, 0xe5, 0xab, 0x46, 0xe1, 0xd3, + 0x57, 0x8d, 0xc2, 0x47, 0x93, 0x86, 0xf1, 0x62, 0xd2, 0x30, 0x5e, 0x4e, 0x1a, 0xc6, 0xa7, 0x93, + 0x86, 0xf1, 0xe7, 0x49, 0xc3, 0xf8, 0xf8, 0x2f, 0x8d, 0xc2, 0xfb, 0xb7, 0x3f, 0xf3, 0x1f, 0xbc, + 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0x96, 0x9b, 0xc8, 0x3b, 0xe1, 0x13, 0x00, 0x00, } func (m *CAPIClusterInfo) Marshal() (dAtA []byte, err error) { @@ -852,6 +853,18 @@ func (m *CertificateSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x3a } } + if m.RenewBefore != nil { + { + size, err := m.RenewBefore.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } if m.Duration != nil { { size, err := m.Duration.MarshalToSizedBuffer(dAtA[:i]) @@ -1714,6 +1727,10 @@ func (m *CertificateSpec) Size() (n int) { l = m.Duration.Size() n += 1 + l + sovGenerated(uint64(l)) } + if m.RenewBefore != nil { + l = m.RenewBefore.Size() + n += 1 + l + sovGenerated(uint64(l)) + } if len(m.DNSNames) > 0 { for _, s := range m.DNSNames { l = len(s) @@ -2095,6 +2112,7 @@ func (this *CertificateSpec) String() string { `SecretName:` + fmt.Sprintf("%v", this.SecretName) + `,`, `Subject:` + strings.Replace(this.Subject.String(), "X509Subject", "X509Subject", 1) + `,`, `Duration:` + strings.Replace(fmt.Sprintf("%v", this.Duration), "Duration", "v11.Duration", 1) + `,`, + `RenewBefore:` + strings.Replace(fmt.Sprintf("%v", this.RenewBefore), "Duration", "v11.Duration", 1) + `,`, `DNSNames:` + fmt.Sprintf("%v", this.DNSNames) + `,`, `IPAddresses:` + fmt.Sprintf("%v", this.IPAddresses) + `,`, `URIs:` + fmt.Sprintf("%v", this.URIs) + `,`, @@ -2755,6 +2773,42 @@ func (m *CertificateSpec) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RenewBefore", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RenewBefore == nil { + m.RenewBefore = &v11.Duration{} + } + if err := m.RenewBefore.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DNSNames", wireType) diff --git a/vendor/kmodules.xyz/client-go/api/v1/generated.proto b/vendor/kmodules.xyz/client-go/api/v1/generated.proto index 4750fd4ff..2c43d3eea 100644 --- a/vendor/kmodules.xyz/client-go/api/v1/generated.proto +++ b/vendor/kmodules.xyz/client-go/api/v1/generated.proto @@ -70,6 +70,14 @@ message CertificateSpec { // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.Duration duration = 5; + // Certificate renew before expiration duration + // + // Deprecated use `ReconfigureTLS` type OpsRequest instead. + // + // +deprecated + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Duration renewBefore = 6; + // DNSNames is a list of subject alt names to be used on the Certificate. // +optional repeated string dnsNames = 7; 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 5a89f3e10..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 @@ -76,6 +76,11 @@ func (in *CertificateSpec) DeepCopyInto(out *CertificateSpec) { *out = new(metav1.Duration) **out = **in } + if in.RenewBefore != nil { + in, out := &in.RenewBefore, &out.RenewBefore + *out = new(metav1.Duration) + **out = **in + } if in.DNSNames != nil { in, out := &in.DNSNames, &out.DNSNames *out = make([]string, len(*in)) diff --git a/vendor/kmodules.xyz/client-go/client/client.go b/vendor/kmodules.xyz/client-go/client/client.go index 519c087df..68b8da6b1 100644 --- a/vendor/kmodules.xyz/client-go/client/client.go +++ b/vendor/kmodules.xyz/client-go/client/client.go @@ -21,6 +21,8 @@ import ( "reflect" "strings" + "kmodules.xyz/client-go/meta" + "github.com/pkg/errors" kerr "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" @@ -116,8 +118,15 @@ func CreateOrPatch(ctx context.Context, c client.Client, obj client.Object, tran } vt := kutil.VerbUnchanged - if cur.GetGeneration() != mod.GetGeneration() { - vt = kutil.VerbPatched + if mod.GetGeneration() > 0 { + if cur.GetGeneration() != mod.GetGeneration() { + vt = kutil.VerbPatched + } + } else { + // Secret, ServiceAccount etc resources do not use metadata.generation + if meta.ObjectHash(cur) != meta.ObjectHash(mod) { + vt = kutil.VerbPatched + } } assign(obj, mod) return vt, nil diff --git a/vendor/kmodules.xyz/client-go/cluster/ace.go b/vendor/kmodules.xyz/client-go/cluster/ace.go index 678847fc9..a1a149f11 100644 --- a/vendor/kmodules.xyz/client-go/cluster/ace.go +++ b/vendor/kmodules.xyz/client-go/cluster/ace.go @@ -24,7 +24,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" ) -func IsACEManaged(kc client.Client) bool { +func IsACEManaged(kc client.Reader) bool { var list unstructured.UnstructuredList list.SetAPIVersion("apps/v1") list.SetKind("Deployment") diff --git a/vendor/kmodules.xyz/client-go/cluster/lib.go b/vendor/kmodules.xyz/client-go/cluster/lib.go index 80db44a13..94d4695a8 100644 --- a/vendor/kmodules.xyz/client-go/cluster/lib.go +++ b/vendor/kmodules.xyz/client-go/cluster/lib.go @@ -157,7 +157,7 @@ func UpsertClusterMetadata(kc client.Client, md *kmapi.ClusterMetadata) error { return err } -func DetectCAPICluster(kc client.Client) (*kmapi.CAPIClusterInfo, error) { +func DetectCAPICluster(kc client.Reader) (*kmapi.CAPIClusterInfo, error) { var list unstructured.UnstructuredList list.SetGroupVersionKind(schema.GroupVersionKind{ Group: "cluster.x-k8s.io", @@ -237,7 +237,7 @@ func DetectClusterManager(kc client.Client, mappers ...meta.RESTMapper) kmapi.Cl if IsOpenClusterHub(mapper) { result |= kmapi.ClusterManagerOCMHub } - if IsOpenClusterSpoke(mapper) { + if IsOpenClusterSpoke(kc) { result |= kmapi.ClusterManagerOCMSpoke } if IsOpenClusterMulticlusterControlplane(mapper) { diff --git a/vendor/kmodules.xyz/client-go/cluster/ocm.go b/vendor/kmodules.xyz/client-go/cluster/ocm.go index 0c138ff94..808eaabe7 100644 --- a/vendor/kmodules.xyz/client-go/cluster/ocm.go +++ b/vendor/kmodules.xyz/client-go/cluster/ocm.go @@ -17,8 +17,12 @@ limitations under the License. package cluster import ( + "context" + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/client" ) func IsOpenClusterHub(mapper meta.RESTMapper) bool { @@ -31,14 +35,12 @@ func IsOpenClusterHub(mapper meta.RESTMapper) bool { return false } -func IsOpenClusterSpoke(mapper meta.RESTMapper) bool { - if _, err := mapper.RESTMappings(schema.GroupKind{ - Group: "operator.open-cluster-management.io", - Kind: "Klusterlet", - }); err == nil { - return true - } - return false +func IsOpenClusterSpoke(kc client.Reader) bool { + var list unstructured.UnstructuredList + list.SetAPIVersion("operator.open-cluster-management.io/v1") + list.SetKind("Klusterlet") + err := kc.List(context.TODO(), &list) + return err == nil && len(list.Items) > 0 } func IsOpenClusterMulticlusterControlplane(mapper meta.RESTMapper) bool { diff --git a/vendor/kmodules.xyz/client-go/cluster/rancher.go b/vendor/kmodules.xyz/client-go/cluster/rancher.go index 40a135556..bea95e1fa 100644 --- a/vendor/kmodules.xyz/client-go/cluster/rancher.go +++ b/vendor/kmodules.xyz/client-go/cluster/rancher.go @@ -129,15 +129,15 @@ func isInProject(kc client.Client, nsName, seedNS string) (bool, error) { return projectId == seedProjectId, nil } -func GetDefaultProjectId(kc client.Client) (string, bool, error) { +func GetDefaultProjectId(kc client.Reader) (string, bool, error) { return GetProjectId(kc, metav1.NamespaceDefault) } -func GetSystemProjectId(kc client.Client) (string, bool, error) { +func GetSystemProjectId(kc client.Reader) (string, bool, error) { return GetProjectId(kc, metav1.NamespaceSystem) } -func GetProjectId(kc client.Client, nsName string) (string, bool, error) { +func GetProjectId(kc client.Reader, nsName string) (string, bool, error) { var ns core.Namespace err := kc.Get(context.TODO(), client.ObjectKey{Name: nsName}, &ns) if err != nil { diff --git a/vendor/kmodules.xyz/client-go/cluster/vcluster.go b/vendor/kmodules.xyz/client-go/cluster/vcluster.go index 0e1324032..1348eff3b 100644 --- a/vendor/kmodules.xyz/client-go/cluster/vcluster.go +++ b/vendor/kmodules.xyz/client-go/cluster/vcluster.go @@ -24,7 +24,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" ) -func IsVirtualCluster(kc client.Client) (bool, error) { +func IsVirtualCluster(kc client.Reader) (bool, error) { var list core.NodeList err := kc.List(context.TODO(), &list) if err != nil { @@ -44,7 +44,7 @@ func IsVirtualCluster(kc client.Client) (bool, error) { return false, nil } -func MustIsVirtualCluster(kc client.Client) bool { +func MustIsVirtualCluster(kc client.Reader) bool { ok, _ := IsVirtualCluster(kc) return ok } diff --git a/vendor/kmodules.xyz/client-go/meta/hash.go b/vendor/kmodules.xyz/client-go/meta/hash.go index 6fc87ae33..0e7778f4f 100644 --- a/vendor/kmodules.xyz/client-go/meta/hash.go +++ b/vendor/kmodules.xyz/client-go/meta/hash.go @@ -33,7 +33,11 @@ func ResourceHash(obj metav1.Object) string { h := xxh3.New() _, _ = h.WriteString(string(obj.GetUID())) _, _ = h.WriteString(",") - _, _ = h.WriteString(strconv.FormatInt(obj.GetGeneration(), 10)) + if obj.GetGeneration() > 0 { + _, _ = h.WriteString(strconv.FormatInt(obj.GetGeneration(), 10)) + } else { + _, _ = h.WriteString(ObjectHash(obj)) + } return strconv.FormatUint(h.Sum64(), 10) } @@ -57,11 +61,20 @@ func ObjectHash(in metav1.Object) string { obj["annotations"] = data } - st := structs.New(in) - for _, field := range st.Fields() { - fieldName := field.Name() - if fieldName != "ObjectMeta" && fieldName != "TypeMeta" && fieldName != "Status" { - obj[fieldName] = field.Value() + u, isUnstructured := in.(*unstructured.Unstructured) + if isUnstructured { + for fieldName, v := range u.UnstructuredContent() { + if fieldName != "metadata" && fieldName != "apiVersion" && fieldName != "kind" && fieldName != "status" { + obj[fieldName] = v + } + } + } else { + st := structs.New(in) + for _, field := range st.Fields() { + fieldName := field.Name() + if fieldName != "ObjectMeta" && fieldName != "TypeMeta" && fieldName != "Status" { + obj[fieldName] = field.Value() + } } } diff --git a/vendor/modules.txt b/vendor/modules.txt index ca3042e29..c3dc6be01 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -742,7 +742,7 @@ k8s.io/utils/trace # kmodules.xyz/apiversion v0.2.0 ## explicit; go 1.14 kmodules.xyz/apiversion -# kmodules.xyz/client-go v0.30.22-0.20241009094042-175fd7e41d7e +# kmodules.xyz/client-go v0.30.27 ## explicit; go 1.22.0 kmodules.xyz/client-go kmodules.xyz/client-go/api/v1