@@ -39,7 +39,7 @@ const (
39
39
// +kubebuilder:resource:scope="Cluster"
40
40
// +kubebuilder:subresource:status
41
41
42
- // Cluster represents the desire state and status of a member cluster.
42
+ // Cluster represents the desired state and status of a member cluster.
43
43
type Cluster struct {
44
44
metav1.TypeMeta `json:",inline"`
45
45
metav1.ObjectMeta `json:"metadata,omitempty"`
@@ -55,8 +55,8 @@ type Cluster struct {
55
55
// ClusterSpec defines the desired state of a member cluster.
56
56
type ClusterSpec struct {
57
57
// ID is the unique identifier for the cluster.
58
- // It is different from the object uid(.metadata.uid) and typically collected automatically
59
- // from member cluster during the progress of registration.
58
+ // It is different from the object uid(.metadata.uid) and is typically collected automatically
59
+ // from each member cluster during the process of registration.
60
60
//
61
61
// The value is collected in order:
62
62
// 1. If the registering cluster enabled ClusterProperty API and defined the cluster ID by
@@ -74,7 +74,7 @@ type ClusterSpec struct {
74
74
// +kubebuilder:validation:Maxlength=128000
75
75
ID string `json:"id,omitempty"`
76
76
77
- // SyncMode describes how a cluster sync resources from karmada control plane.
77
+ // SyncMode describes how a cluster syncs resources from karmada control plane.
78
78
// +kubebuilder:validation:Enum=Push;Pull
79
79
// +required
80
80
SyncMode ClusterSyncMode `json:"syncMode"`
@@ -84,14 +84,14 @@ type ClusterSpec struct {
84
84
// +optional
85
85
APIEndpoint string `json:"apiEndpoint,omitempty"`
86
86
87
- // SecretRef represents the secret contains mandatory credentials to access the member cluster.
87
+ // SecretRef represents the secret that contains mandatory credentials to access the member cluster.
88
88
// The secret should hold credentials as follows:
89
89
// - secret.data.token
90
90
// - secret.data.caBundle
91
91
// +optional
92
92
SecretRef * LocalSecretReference `json:"secretRef,omitempty"`
93
93
94
- // ImpersonatorSecretRef represents the secret contains the token of impersonator.
94
+ // ImpersonatorSecretRef represents the secret that contains the token of impersonator.
95
95
// The secret should hold credentials as follows:
96
96
// - secret.data.token
97
97
// +optional
@@ -106,12 +106,12 @@ type ClusterSpec struct {
106
106
107
107
// ProxyURL is the proxy URL for the cluster.
108
108
// If not empty, the karmada control plane will use this proxy to talk to the cluster.
109
- // More details please refer to: https://github.com/kubernetes/client-go/issues/351
109
+ // For more details please refer to: https://github.com/kubernetes/client-go/issues/351
110
110
// +optional
111
111
ProxyURL string `json:"proxyURL,omitempty"`
112
112
113
113
// ProxyHeader is the HTTP header required by proxy server.
114
- // The key in the key-value pair is HTTP header key and value is the associated header payloads.
114
+ // The key in the key-value pair is HTTP header key and the value is the associated header payloads.
115
115
// For the header with multiple values, the values should be separated by comma(e.g. 'k1': 'v1,v2,v3').
116
116
// +optional
117
117
ProxyHeader map [string ]string `json:"proxyHeader,omitempty"`
@@ -120,12 +120,12 @@ type ClusterSpec struct {
120
120
// +optional
121
121
Provider string `json:"provider,omitempty"`
122
122
123
- // Region represents the region of the member cluster locate in .
123
+ // Region represents the region in which the member cluster is located .
124
124
// +optional
125
125
Region string `json:"region,omitempty"`
126
126
127
- // Zone represents the zone of the member cluster locate in .
128
- // Deprecated: This filed was never been used by Karmada, and it will not be
127
+ // Zone represents the zone in which the member cluster is located .
128
+ // Deprecated: This field was never been used by Karmada, and it will not be
129
129
// removed from v1alpha1 for backward compatibility, use Zones instead.
130
130
// +optional
131
131
Zone string `json:"zone,omitempty"`
@@ -138,7 +138,7 @@ type ClusterSpec struct {
138
138
// +optional
139
139
Zones []string `json:"zones,omitempty"`
140
140
141
- // Taints attached to the member cluster.
141
+ // Taints are attached to the member cluster.
142
142
// Taints on the cluster have the "effect" on
143
143
// any resource that does not tolerate the Taint.
144
144
// +optional
@@ -216,8 +216,8 @@ type ResourceModel struct {
216
216
217
217
// ResourceModelRange describes the detail of each modeling quota that ranges from min to max.
218
218
// Please pay attention, by default, the value of min can be inclusive, and the value of max cannot be inclusive.
219
- // E.g. in an interval, min = 2, max =10 is set, which means the interval [2,10).
220
- // This rule ensure that all intervals have the same meaning. If the last interval is infinite,
219
+ // E.g. in an interval, min = 2, max = 10 is set, which means the interval [2,10).
220
+ // This rule ensures that all intervals have the same meaning. If the last interval is infinite,
221
221
// it is definitely unreachable. Therefore, we define the right interval as the open interval.
222
222
// For a valid interval, the value on the right is greater than the value on the left,
223
223
// in other words, max must be greater than min.
@@ -254,13 +254,13 @@ const (
254
254
type ClusterSyncMode string
255
255
256
256
const (
257
- // Push means that the controller on the karmada control plane will in charge of synchronization.
258
- // The controller watches resources change on karmada control plane then pushes them to member cluster.
257
+ // Push means that the controller on the karmada control plane will be in charge of synchronization.
258
+ // The controller watches resources change on karmada control plane and then pushes them to member cluster.
259
259
Push ClusterSyncMode = "Push"
260
260
261
- // Pull means that the controller running on the member cluster will in charge of synchronization.
262
- // The controller, as well known as 'agent', watches resources change on karmada control plane then fetches them
263
- // and applies locally on the member cluster.
261
+ // Pull means that the controller running on the member cluster will be in charge of synchronization.
262
+ // The controller, also known as 'agent', watches resources change on karmada control plane, then fetches them
263
+ // and applies them locally on the member cluster.
264
264
Pull ClusterSyncMode = "Pull"
265
265
)
266
266
@@ -270,14 +270,17 @@ type LocalSecretReference struct {
270
270
// Namespace is the namespace for the resource being referenced.
271
271
Namespace string `json:"namespace"`
272
272
273
- // Name is the name of resource being referenced.
273
+ // Name is the name of the resource being referenced.
274
274
Name string `json:"name"`
275
275
}
276
276
277
277
// Define valid conditions of a member cluster.
278
278
const (
279
279
// ClusterConditionReady means the cluster is healthy and ready to accept workloads.
280
280
ClusterConditionReady = "Ready"
281
+
282
+ // ClusterConditionCompleteAPIEnablements indicates whether the cluster's API enablements(.status.apiEnablements) are complete.
283
+ ClusterConditionCompleteAPIEnablements = "CompleteAPIEnablements"
281
284
)
282
285
283
286
// ClusterStatus contains information about the current status of a
@@ -287,7 +290,7 @@ type ClusterStatus struct {
287
290
// +optional
288
291
KubernetesVersion string `json:"kubernetesVersion,omitempty"`
289
292
290
- // APIEnablements represents the list of APIs installed in the member cluster.
293
+ // APIEnablements represents the list of APIs installed on the member cluster.
291
294
// +optional
292
295
APIEnablements []APIEnablement `json:"apiEnablements,omitempty"`
293
296
@@ -375,7 +378,7 @@ type AllocatableModeling struct {
375
378
376
379
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
377
380
378
- // ClusterList contains a list of member cluster
381
+ // ClusterList contains a list of member clusters
379
382
type ClusterList struct {
380
383
metav1.TypeMeta `json:",inline"`
381
384
metav1.ListMeta `json:"metadata,omitempty"`
0 commit comments