update MemberClusterStatus API

Signed-off-by: Kevin Wang <kevinwzf0126@gmail.com>
This commit is contained in:
Kevin Wang 2020-11-18 21:51:06 +08:00 committed by Hongcai Ren
parent b8197e2855
commit 2573aaf4c8
1 changed files with 11 additions and 3 deletions

View File

@ -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.