diff --git a/pkg/apis/membercluster/v1alpha1/types.go b/pkg/apis/membercluster/v1alpha1/types.go index 7178eaeeb..060868a3c 100644 --- a/pkg/apis/membercluster/v1alpha1/types.go +++ b/pkg/apis/membercluster/v1alpha1/types.go @@ -3,7 +3,6 @@ package v1alpha1 import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime/schema" ) // +genclient @@ -95,9 +94,9 @@ type MemberClusterStatus struct { // +optional KubernetesVersion string `json:"kubernetesVersion,omitempty"` - // APIEnablement represents the list of APIs installed in the member cluster. + // APIEnablements represents the list of APIs installed in the member cluster. // +optional - APIEnablement []schema.GroupVersionKind `json:"apiEnablement,omitempty"` + APIEnablements []APIEnablement `json:"apiEnablements,omitempty"` // Conditions is an array of current cluster conditions. Conditions []metav1.Condition `json:"conditions,omitempty"` @@ -106,6 +105,15 @@ type MemberClusterStatus struct { NodeSummary NodeSummary `json:"nodeSummary,omitempty"` } +// APIEnablement is a list of API resource, it is used to expose the name of the +// resources supported in a specific group and version. +type APIEnablement struct { + // GroupVersion is the group and version this APIEnablement is for. + GroupVersion string `json:"groupVersion"` + // Resources contains the name of the resources. + Resources []string `json:"resources"` +} + // NodeSummary represents the summary of nodes status in a specific cluster. type NodeSummary struct { // TotalNum is the total number of nodes in the cluster.