update MemberClusterStatus API
Signed-off-by: Kevin Wang <kevinwzf0126@gmail.com>
This commit is contained in:
parent
b8197e2855
commit
2573aaf4c8
|
@ -3,7 +3,6 @@ package v1alpha1
|
||||||
import (
|
import (
|
||||||
corev1 "k8s.io/api/core/v1"
|
corev1 "k8s.io/api/core/v1"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// +genclient
|
// +genclient
|
||||||
|
@ -95,9 +94,9 @@ type MemberClusterStatus struct {
|
||||||
// +optional
|
// +optional
|
||||||
KubernetesVersion string `json:"kubernetesVersion,omitempty"`
|
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
|
// +optional
|
||||||
APIEnablement []schema.GroupVersionKind `json:"apiEnablement,omitempty"`
|
APIEnablements []APIEnablement `json:"apiEnablements,omitempty"`
|
||||||
|
|
||||||
// Conditions is an array of current cluster conditions.
|
// Conditions is an array of current cluster conditions.
|
||||||
Conditions []metav1.Condition `json:"conditions,omitempty"`
|
Conditions []metav1.Condition `json:"conditions,omitempty"`
|
||||||
|
@ -106,6 +105,15 @@ type MemberClusterStatus struct {
|
||||||
NodeSummary NodeSummary `json:"nodeSummary,omitempty"`
|
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.
|
// NodeSummary represents the summary of nodes status in a specific cluster.
|
||||||
type NodeSummary struct {
|
type NodeSummary struct {
|
||||||
// TotalNum is the total number of nodes in the cluster.
|
// TotalNum is the total number of nodes in the cluster.
|
||||||
|
|
Loading…
Reference in New Issue