diff --git a/go.mod b/go.mod index 4f8ca8a88..233e064bb 100644 --- a/go.mod +++ b/go.mod @@ -165,7 +165,7 @@ require ( k8s.io/component-base v0.21.1 // indirect k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e // indirect k8s.io/utils v0.0.0-20210802155522-efc7438f0176 // indirect - kmodules.xyz/resource-metadata v0.9.0 // indirect + kmodules.xyz/resource-metadata v0.9.1 // indirect kmodules.xyz/resource-metrics v0.0.8 // indirect sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15 // indirect sigs.k8s.io/cli-utils v0.26.1 // indirect diff --git a/go.sum b/go.sum index 08e1062a2..9cec159d7 100644 --- a/go.sum +++ b/go.sum @@ -1257,8 +1257,9 @@ kmodules.xyz/openshift v0.0.0-20210618001443-f2507caa512f h1:V1lapZtGG7GntoUsOuE kmodules.xyz/openshift v0.0.0-20210618001443-f2507caa512f/go.mod h1:8E5ckbd1KMNmR4hc7ScvmQnGfx1ULUUp+UTmoDdxRkc= kmodules.xyz/prober v0.0.0-20210618020259-5836fb959027 h1:rtSPsruEkoBOLcbJkxMQjnPafpv8/vJnfWlTIj9yRBg= kmodules.xyz/prober v0.0.0-20210618020259-5836fb959027/go.mod h1:H4NcvS1RQxeXtQONALbU6r9OT3Xa7cMhfamX/k9t9wo= -kmodules.xyz/resource-metadata v0.9.0 h1:kRY126ccnqHI3JTpZNocD2n+OY4zk1G8jczl7fp2BJk= kmodules.xyz/resource-metadata v0.9.0/go.mod h1:GsaythrHLBLKhEy8/l+ioJC0mFmJmZR0FRXpkyxztt8= +kmodules.xyz/resource-metadata v0.9.1 h1:YQAeAnVKK7jULbV4HTcY2JJrtVsh9B64V6wn2FZEZm8= +kmodules.xyz/resource-metadata v0.9.1/go.mod h1:GsaythrHLBLKhEy8/l+ioJC0mFmJmZR0FRXpkyxztt8= kmodules.xyz/resource-metrics v0.0.6/go.mod h1:M7rWuo2qh3BpHhogiEVPnvGY9Xx4Pfygqn1Rex8YbgM= kmodules.xyz/resource-metrics v0.0.8 h1:4WHV7vKGfoxpZquu/Jowq4pgoMEithyMjFfJIg68Nq8= kmodules.xyz/resource-metrics v0.0.8/go.mod h1:M7rWuo2qh3BpHhogiEVPnvGY9Xx4Pfygqn1Rex8YbgM= diff --git a/vendor/kmodules.xyz/resource-metadata/apis/core/v1alpha1/generic_resource_helpers.go b/vendor/kmodules.xyz/resource-metadata/apis/core/v1alpha1/generic_resource_helpers.go index d1c73adf3..17e66b8f4 100644 --- a/vendor/kmodules.xyz/resource-metadata/apis/core/v1alpha1/generic_resource_helpers.go +++ b/vendor/kmodules.xyz/resource-metadata/apis/core/v1alpha1/generic_resource_helpers.go @@ -74,7 +74,10 @@ func ToGenericResource(item client.Object, apiType *kmapi.ResourceID, cmeta *kma } genres := GenericResource{ - // TypeMeta: metav1.TypeMeta{}, + TypeMeta: metav1.TypeMeta{ + APIVersion: GroupVersion.String(), + Kind: ResourceKindGenericResource, + }, ObjectMeta: metav1.ObjectMeta{ Name: GetGenericResourceName(item), GenerateName: item.GetGenerateName(), diff --git a/vendor/kmodules.xyz/resource-metadata/apis/core/v1alpha1/generic_resource_types.go b/vendor/kmodules.xyz/resource-metadata/apis/core/v1alpha1/generic_resource_types.go index 541f42310..f4975e229 100644 --- a/vendor/kmodules.xyz/resource-metadata/apis/core/v1alpha1/generic_resource_types.go +++ b/vendor/kmodules.xyz/resource-metadata/apis/core/v1alpha1/generic_resource_types.go @@ -45,13 +45,13 @@ type GenericResource struct { type GenericResourceSpec struct { Cluster kmapi.ClusterMetadata `json:"cluster,omitempty"` APIType kmapi.ResourceID `json:"apiType"` - Name string `json:"name,omitempty"` + Name string `json:"name"` Version string `json:"version,omitempty"` Replicas int64 `json:"replicas,omitempty"` RoleReplicas api.ReplicaList `json:"roleReplicas,omitempty"` Mode string `json:"mode,omitempty"` - TotalResource core.ResourceRequirements `json:"totalResource"` - AppResource core.ResourceRequirements `json:"appResource"` + TotalResource core.ResourceRequirements `json:"totalResource,omitempty"` + AppResource core.ResourceRequirements `json:"appResource,omitempty"` RoleResourceLimits map[api.PodRole]core.ResourceList `json:"roleResourceLimits,omitempty"` RoleResourceRequests map[api.PodRole]core.ResourceList `json:"roleResourceRequests,omitempty"` Status GenericResourceStatus `json:"status"` diff --git a/vendor/kmodules.xyz/resource-metadata/apis/core/v1alpha1/openapi_generated.go b/vendor/kmodules.xyz/resource-metadata/apis/core/v1alpha1/openapi_generated.go index ec2f5744a..28fcbc789 100644 --- a/vendor/kmodules.xyz/resource-metadata/apis/core/v1alpha1/openapi_generated.go +++ b/vendor/kmodules.xyz/resource-metadata/apis/core/v1alpha1/openapi_generated.go @@ -14994,8 +14994,9 @@ func schema_resource_metadata_apis_core_v1alpha1_GenericResourceSpec(ref common. }, "name": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "version": { @@ -15094,7 +15095,7 @@ func schema_resource_metadata_apis_core_v1alpha1_GenericResourceSpec(ref common. }, }, }, - Required: []string{"apiType", "totalResource", "appResource", "status"}, + Required: []string{"apiType", "name", "status"}, }, }, Dependencies: []string{ diff --git a/vendor/modules.txt b/vendor/modules.txt index ea245ebc9..67bb94ce5 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1443,7 +1443,7 @@ kmodules.xyz/prober/probe kmodules.xyz/prober/probe/exec kmodules.xyz/prober/probe/http kmodules.xyz/prober/probe/tcp -# kmodules.xyz/resource-metadata v0.9.0 +# kmodules.xyz/resource-metadata v0.9.1 ## explicit; go 1.17 kmodules.xyz/resource-metadata/apis/core/v1alpha1 # kmodules.xyz/resource-metrics v0.0.8