Skip to content

Commit 2f5dc4f

Browse files
authored
Merge pull request #5691 from LavredisG/patch-3
Update types.go
2 parents 2f1fe6e + 6d2ae6b commit 2f5dc4f

File tree

4 files changed

+74
-74
lines changed

4 files changed

+74
-74
lines changed

api/openapi-spec/swagger.json

+14-14
Original file line numberDiff line numberDiff line change
@@ -17253,7 +17253,7 @@
1725317253
}
1725417254
},
1725517255
"com.github.karmada-io.karmada.pkg.apis.cluster.v1alpha1.Cluster": {
17256-
"description": "Cluster represents the desire state and status of a member cluster.",
17256+
"description": "Cluster represents the desired state and status of a member cluster.",
1725717257
"type": "object",
1725817258
"required": [
1725917259
"spec"
@@ -17291,7 +17291,7 @@
1729117291
]
1729217292
},
1729317293
"com.github.karmada-io.karmada.pkg.apis.cluster.v1alpha1.ClusterList": {
17294-
"description": "ClusterList contains a list of member cluster",
17294+
"description": "ClusterList contains a list of member clusters",
1729517295
"type": "object",
1729617296
"required": [
1729717297
"items"
@@ -17338,11 +17338,11 @@
1733817338
"type": "string"
1733917339
},
1734017340
"id": {
17341-
"description": "ID is the unique identifier for the cluster. It is different from the object uid(.metadata.uid) and typically collected automatically from member cluster during the progress of registration.\n\nThe value is collected in order: 1. If the registering cluster enabled ClusterProperty API and defined the cluster ID by\n creating a ClusterProperty object with name 'cluster.clusterset.k8s.io', Karmada would\n take the defined value in the ClusterProperty object.\n See https://github.com/kubernetes-sigs/about-api for more details about ClusterProperty API.\n2. Take the uid of 'kube-system' namespace on the registering cluster.\n\nPlease don't update this value unless you know what you are doing, because it will/may be used to : - uniquely identify the clusters within the Karmada system. - compose the DNS name of multi-cluster services.",
17341+
"description": "ID is the unique identifier for the cluster. It is different from the object uid(.metadata.uid) and is typically collected automatically from each member cluster during the process of registration.\n\nThe value is collected in order: 1. If the registering cluster enabled ClusterProperty API and defined the cluster ID by\n creating a ClusterProperty object with name 'cluster.clusterset.k8s.io', Karmada would\n take the defined value in the ClusterProperty object.\n See https://github.com/kubernetes-sigs/about-api for more details about ClusterProperty API.\n2. Take the uid of 'kube-system' namespace on the registering cluster.\n\nPlease don't update this value unless you know what you are doing, because it will/may be used to : - uniquely identify the clusters within the Karmada system. - compose the DNS name of multi-cluster services.",
1734217342
"type": "string"
1734317343
},
1734417344
"impersonatorSecretRef": {
17345-
"description": "ImpersonatorSecretRef represents the secret contains the token of impersonator. The secret should hold credentials as follows: - secret.data.token",
17345+
"description": "ImpersonatorSecretRef represents the secret that contains the token of impersonator. The secret should hold credentials as follows: - secret.data.token",
1734617346
"$ref": "#/definitions/com.github.karmada-io.karmada.pkg.apis.cluster.v1alpha1.LocalSecretReference"
1734717347
},
1734817348
"insecureSkipTLSVerification": {
@@ -17354,19 +17354,19 @@
1735417354
"type": "string"
1735517355
},
1735617356
"proxyHeader": {
17357-
"description": "ProxyHeader is the HTTP header required by proxy server. The key in the key-value pair is HTTP header key and value is the associated header payloads. For the header with multiple values, the values should be separated by comma(e.g. 'k1': 'v1,v2,v3').",
17357+
"description": "ProxyHeader is the HTTP header required by proxy server. The key in the key-value pair is HTTP header key and the value is the associated header payloads. For the header with multiple values, the values should be separated by comma(e.g. 'k1': 'v1,v2,v3').",
1735817358
"type": "object",
1735917359
"additionalProperties": {
1736017360
"type": "string",
1736117361
"default": ""
1736217362
}
1736317363
},
1736417364
"proxyURL": {
17365-
"description": "ProxyURL is the proxy URL for the cluster. If not empty, the karmada control plane will use this proxy to talk to the cluster. More details please refer to: https://github.com/kubernetes/client-go/issues/351",
17365+
"description": "ProxyURL is the proxy URL for the cluster. If not empty, the karmada control plane will use this proxy to talk to the cluster. For more details please refer to: https://github.com/kubernetes/client-go/issues/351",
1736617366
"type": "string"
1736717367
},
1736817368
"region": {
17369-
"description": "Region represents the region of the member cluster locate in.",
17369+
"description": "Region represents the region in which the member cluster is located.",
1737017370
"type": "string"
1737117371
},
1737217372
"resourceModels": {
@@ -17378,24 +17378,24 @@
1737817378
}
1737917379
},
1738017380
"secretRef": {
17381-
"description": "SecretRef represents the secret contains mandatory credentials to access the member cluster. The secret should hold credentials as follows: - secret.data.token - secret.data.caBundle",
17381+
"description": "SecretRef represents the secret that contains mandatory credentials to access the member cluster. The secret should hold credentials as follows: - secret.data.token - secret.data.caBundle",
1738217382
"$ref": "#/definitions/com.github.karmada-io.karmada.pkg.apis.cluster.v1alpha1.LocalSecretReference"
1738317383
},
1738417384
"syncMode": {
17385-
"description": "SyncMode describes how a cluster sync resources from karmada control plane.",
17385+
"description": "SyncMode describes how a cluster syncs resources from karmada control plane.",
1738617386
"type": "string",
1738717387
"default": ""
1738817388
},
1738917389
"taints": {
17390-
"description": "Taints attached to the member cluster. Taints on the cluster have the \"effect\" on any resource that does not tolerate the Taint.",
17390+
"description": "Taints are attached to the member cluster. Taints on the cluster have the \"effect\" on any resource that does not tolerate the Taint.",
1739117391
"type": "array",
1739217392
"items": {
1739317393
"default": {},
1739417394
"$ref": "#/definitions/io.k8s.api.core.v1.Taint"
1739517395
}
1739617396
},
1739717397
"zone": {
17398-
"description": "Zone represents the zone of the member cluster locate in. Deprecated: This filed was never been used by Karmada, and it will not be removed from v1alpha1 for backward compatibility, use Zones instead.",
17398+
"description": "Zone represents the zone in which the member cluster is located. Deprecated: This field was never been used by Karmada, and it will not be removed from v1alpha1 for backward compatibility, use Zones instead.",
1739917399
"type": "string"
1740017400
},
1740117401
"zones": {
@@ -17413,7 +17413,7 @@
1741317413
"type": "object",
1741417414
"properties": {
1741517415
"apiEnablements": {
17416-
"description": "APIEnablements represents the list of APIs installed in the member cluster.",
17416+
"description": "APIEnablements represents the list of APIs installed on the member cluster.",
1741717417
"type": "array",
1741817418
"items": {
1741917419
"default": {},
@@ -17459,7 +17459,7 @@
1745917459
],
1746017460
"properties": {
1746117461
"name": {
17462-
"description": "Name is the name of resource being referenced.",
17462+
"description": "Name is the name of the resource being referenced.",
1746317463
"type": "string",
1746417464
"default": ""
1746517465
},
@@ -17511,7 +17511,7 @@
1751117511
}
1751217512
},
1751317513
"com.github.karmada-io.karmada.pkg.apis.cluster.v1alpha1.ResourceModelRange": {
17514-
"description": "ResourceModelRange describes the detail of each modeling quota that ranges from min to max. Please pay attention, by default, the value of min can be inclusive, and the value of max cannot be inclusive. E.g. in an interval, min = 2, max =10 is set, which means the interval [2,10). This rule ensure that all intervals have the same meaning. If the last interval is infinite, it is definitely unreachable. Therefore, we define the right interval as the open interval. For a valid interval, the value on the right is greater than the value on the left, in other words, max must be greater than min. It is strongly recommended that the [Min, Max) of all ResourceModelRanges can make a continuous interval.",
17514+
"description": "ResourceModelRange describes the detail of each modeling quota that ranges from min to max. Please pay attention, by default, the value of min can be inclusive, and the value of max cannot be inclusive. E.g. in an interval, min = 2, max = 10 is set, which means the interval [2,10). This rule ensures that all intervals have the same meaning. If the last interval is infinite, it is definitely unreachable. Therefore, we define the right interval as the open interval. For a valid interval, the value on the right is greater than the value on the left, in other words, max must be greater than min. It is strongly recommended that the [Min, Max) of all ResourceModelRanges can make a continuous interval.",
1751517515
"type": "object",
1751617516
"required": [
1751717517
"name",

pkg/apis/cluster/types.go

+23-23
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
// +genclient:nonNamespaced
2929
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
3030

31-
// Cluster represents the desire state and status of a member cluster.
31+
// Cluster represents the desired state and status of a member cluster.
3232
type Cluster struct {
3333
metav1.TypeMeta
3434
metav1.ObjectMeta
@@ -44,8 +44,8 @@ type Cluster struct {
4444
// ClusterSpec defines the desired state of a member cluster.
4545
type ClusterSpec struct {
4646
// ID is the unique identifier for the cluster.
47-
// It is different from the object uid(.metadata.uid) and typically collected automatically
48-
// from member cluster during the progress of registration.
47+
// It is different from the object uid(.metadata.uid) and is typically collected automatically
48+
// from each member cluster during the process of registration.
4949
//
5050
// The value is collected in order:
5151
// 1. If the registering cluster enabled ClusterProperty API and defined the cluster ID by
@@ -63,7 +63,7 @@ type ClusterSpec struct {
6363
// +kubebuilder:validation:Maxlength=128000
6464
ID string `json:"id,omitempty"`
6565

66-
// SyncMode describes how a cluster sync resources from karmada control plane.
66+
// SyncMode describes how a cluster syncs resources from karmada control plane.
6767
// +required
6868
SyncMode ClusterSyncMode
6969

@@ -72,14 +72,14 @@ type ClusterSpec struct {
7272
// +optional
7373
APIEndpoint string
7474

75-
// SecretRef represents the secret contains mandatory credentials to access the member cluster.
75+
// SecretRef represents the secret that contains mandatory credentials to access the member cluster.
7676
// The secret should hold credentials as follows:
7777
// - secret.data.token
7878
// - secret.data.caBundle
7979
// +optional
8080
SecretRef *LocalSecretReference
8181

82-
// ImpersonatorSecretRef represents the secret contains the token of impersonator.
82+
// ImpersonatorSecretRef represents the secret that contains the token of impersonator.
8383
// The secret should hold credentials as follows:
8484
// - secret.data.token
8585
// +optional
@@ -94,12 +94,12 @@ type ClusterSpec struct {
9494

9595
// ProxyURL is the proxy URL for the cluster.
9696
// If not empty, the karmada control plane will use this proxy to talk to the cluster.
97-
// More details please refer to: https://github.com/kubernetes/client-go/issues/351
97+
// For more details please refer to: https://github.com/kubernetes/client-go/issues/351
9898
// +optional
9999
ProxyURL string
100100

101101
// ProxyHeader is the HTTP header required by proxy server.
102-
// The key in the key-value pair is HTTP header key and value is the associated header payloads.
102+
// The key in the key-value pair is HTTP header key and the value is the associated header payloads.
103103
// For the header with multiple values, the values should be separated by comma(e.g. 'k1': 'v1,v2,v3').
104104
// +optional
105105
ProxyHeader map[string]string
@@ -108,12 +108,12 @@ type ClusterSpec struct {
108108
// +optional
109109
Provider string
110110

111-
// Region represents the region of the member cluster locate in.
111+
// Region represents the region in which the member cluster is located.
112112
// +optional
113113
Region string
114114

115-
// Zone represents the zone of the member cluster locate in.
116-
// Deprecated: This filed was never been used by Karmada, and it will not be
115+
// Zone represents the zone in which the member cluster is located.
116+
// Deprecated: This field was never used by Karmada, and it will not be
117117
// removed from v1alpha1 for backward compatibility, use Zones instead.
118118
// +optional
119119
Zone string
@@ -126,7 +126,7 @@ type ClusterSpec struct {
126126
// +optional
127127
Zones []string `json:"zones,omitempty"`
128128

129-
// Taints attached to the member cluster.
129+
// Taints are attached to the member cluster.
130130
// Taints on the cluster have the "effect" on
131131
// any resource that does not tolerate the Taint.
132132
// +optional
@@ -204,8 +204,8 @@ type ResourceModel struct {
204204

205205
// ResourceModelRange describes the detail of each modeling quota that ranges from min to max.
206206
// Please pay attention, by default, the value of min can be inclusive, and the value of max cannot be inclusive.
207-
// E.g. in an interval, min = 2, max =10 is set, which means the interval [2,10).
208-
// This rule ensure that all intervals have the same meaning. If the last interval is infinite,
207+
// E.g. in an interval, min = 2, max = 10 is set, which means the interval [2,10).
208+
// This rule ensures that all intervals have the same meaning. If the last interval is infinite,
209209
// it is definitely unreachable. Therefore, we define the right interval as the open interval.
210210
// For a valid interval, the value on the right is greater than the value on the left,
211211
// in other words, max must be greater than min.
@@ -242,13 +242,13 @@ const (
242242
type ClusterSyncMode string
243243

244244
const (
245-
// Push means that the controller on the karmada control plane will in charge of synchronization.
246-
// The controller watches resources change on karmada control plane then pushes them to member cluster.
245+
// Push means that the controller on the karmada control plane will be in charge of synchronization.
246+
// The controller watches resources change on karmada control plane and then pushes them to member cluster.
247247
Push ClusterSyncMode = "Push"
248248

249-
// Pull means that the controller running on the member cluster will in charge of synchronization.
250-
// The controller, as well known as 'agent', watches resources change on karmada control plane then fetches them
251-
// and applies locally on the member cluster.
249+
// Pull means that the controller running on the member cluster will be in charge of synchronization.
250+
// The controller, also known as 'agent', watches resources change on karmada control plane, then fetches them
251+
// and applies them locally on the member cluster.
252252
Pull ClusterSyncMode = "Pull"
253253
)
254254

@@ -258,7 +258,7 @@ type LocalSecretReference struct {
258258
// Namespace is the namespace for the resource being referenced.
259259
Namespace string
260260

261-
// Name is the name of resource being referenced.
261+
// Name is the name of the resource being referenced.
262262
Name string
263263
}
264264

@@ -267,7 +267,7 @@ const (
267267
// ClusterConditionReady means the cluster is healthy and ready to accept workloads.
268268
ClusterConditionReady = "Ready"
269269

270-
// ClusterConditionCompleteAPIEnablements indicates whether the cluster's API enablements(.status.apiEnablements) is complete.
270+
// ClusterConditionCompleteAPIEnablements indicates whether the cluster's API enablements(.status.apiEnablements) are complete.
271271
ClusterConditionCompleteAPIEnablements = "CompleteAPIEnablements"
272272
)
273273

@@ -278,7 +278,7 @@ type ClusterStatus struct {
278278
// +optional
279279
KubernetesVersion string
280280

281-
// APIEnablements represents the list of APIs installed in the member cluster.
281+
// APIEnablements represents the list of APIs installed on the member cluster.
282282
// +optional
283283
APIEnablements []APIEnablement
284284

@@ -369,7 +369,7 @@ type AllocatableModeling struct {
369369

370370
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
371371

372-
// ClusterList contains a list of member cluster
372+
// ClusterList contains a list of member clusters
373373
type ClusterList struct {
374374
metav1.TypeMeta
375375
metav1.ListMeta

0 commit comments

Comments
 (0)