Update to member cluster ManageMode to SyncMode.
Signed-off-by: RainbowMango <renhongcai@huawei.com>
This commit is contained in:
parent
b04fdfb5ac
commit
949f0b3dfc
|
@ -11,6 +11,7 @@ import (
|
||||||
// +kubebuilder:resource:scope="Cluster"
|
// +kubebuilder:resource:scope="Cluster"
|
||||||
// +kubebuilder:subresource:status
|
// +kubebuilder:subresource:status
|
||||||
// +kubebuilder:printcolumn:JSONPath=`.status.kubernetesVersion`,name="Version",type=string
|
// +kubebuilder:printcolumn:JSONPath=`.status.kubernetesVersion`,name="Version",type=string
|
||||||
|
// +kubebuilder:printcolumn:JSONPath=`.spec.syncMode`,name="Mode",type=string
|
||||||
// +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="Ready")].status`,name="Ready",type=string
|
// +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="Ready")].status`,name="Ready",type=string
|
||||||
// +kubebuilder:printcolumn:JSONPath=`.metadata.creationTimestamp`,name="Age",type=date
|
// +kubebuilder:printcolumn:JSONPath=`.metadata.creationTimestamp`,name="Age",type=date
|
||||||
|
|
||||||
|
@ -29,10 +30,10 @@ type Cluster struct {
|
||||||
|
|
||||||
// ClusterSpec defines the desired state of a member cluster.
|
// ClusterSpec defines the desired state of a member cluster.
|
||||||
type ClusterSpec struct {
|
type ClusterSpec struct {
|
||||||
// ManageMode specifies the relationship between control plane and member cluster,
|
// SyncMode describes how a cluster sync resources from karmada control plane.
|
||||||
// the mode determines how to reach each other.
|
// +kubebuilder:validation:Enum=Push;Pull
|
||||||
// +optional
|
// +required
|
||||||
ManageMode ClusterManageMode `json:"manageMode,omitempty"`
|
SyncMode ClusterSyncMode `json:"syncMode"`
|
||||||
|
|
||||||
// The API endpoint of the member cluster. This can be a hostname,
|
// The API endpoint of the member cluster. This can be a hostname,
|
||||||
// hostname:port, IP or IP:port.
|
// hostname:port, IP or IP:port.
|
||||||
|
@ -72,14 +73,18 @@ type ClusterSpec struct {
|
||||||
Taints []corev1.Taint `json:"taints,omitempty"`
|
Taints []corev1.Taint `json:"taints,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ClusterManageMode presents member clusters working mode.
|
// ClusterSyncMode describes the mode of synchronization between member cluster and karmada control plane.
|
||||||
type ClusterManageMode string
|
type ClusterSyncMode string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// Delegation represents a member cluster will be managed directly by control plane.
|
// Push means that the controller on the karmada control plane will in charge of synchronization.
|
||||||
Delegation ClusterManageMode = "Delegation"
|
// The controller watches resources change on karmada control plane then pushes them to member cluster.
|
||||||
// SelfManagement represents a member cluster will be managed by itself.
|
Push ClusterSyncMode = "Push"
|
||||||
SelfManagement ClusterManageMode = "SelfManagement"
|
|
||||||
|
// Pull means that the controller running on the member cluster will in charge of synchronization.
|
||||||
|
// The controller, as well known as 'agent', watches resources change on karmada control plane then fetches them
|
||||||
|
// and applies locally on the member cluster.
|
||||||
|
Pull ClusterSyncMode = "Pull"
|
||||||
)
|
)
|
||||||
|
|
||||||
// LocalSecretReference is a reference to a secret within the enclosing
|
// LocalSecretReference is a reference to a secret within the enclosing
|
||||||
|
|
Loading…
Reference in New Issue