Skip to content

Commit 5d791d6

Browse files
committed
fix comments
Signed-off-by: Wantong Jiang <[email protected]>
1 parent 395fde5 commit 5d791d6

File tree

3 files changed

+5
-14
lines changed

3 files changed

+5
-14
lines changed

tools/fleet/README.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
# kubectl-fleet
22

3-
A unified kubectl plugin for KubeFleet cluster management operations, providing draincluster, and uncordoncluster functionality for member clusters in a fleet,
4-
as well as staged update approval capability.
5-
6-
## Description
7-
8-
`kubectl-fleet` allows you to manage member clusters in a KubeFleet deployment by approving staged updates, draining workloads from clusters for maintenance, and uncordoning them when ready to accept workloads again.
3+
A kubectl plugin for KubeFleet cluster management operations, providing functionalities include draining workloads from member clusters for maintenance,
4+
uncordoning them when ready to accept workloads again, as well as approving staged update run stage execution.
95

106
## Installation
117

@@ -120,8 +116,7 @@ The approve command currently supports the following resource kinds:
120116
Drains a member cluster by performing the following actions:
121117

122118
1. **Cordoning**: Adds a `Taint` to the `MemberCluster` resource to prevent any new resources from being propagated to the member cluster
123-
2. **Eviction**: Creates `Eviction` objects for all the `Placement` objects that have propagated resources to the member cluster
124-
3. **Resource Removal**: Waits for all evictions to complete and resources to be removed from the member cluster
119+
2. **Eviction**: Creates `Eviction` objects for all the `Placement` objects that have propagated resources to the member cluster and waits all evictions to complete
125120

126121
**Note**: The `draincluster` command is a best-effort mechanism. Once the command runs successfully, you must verify that all resources propagated by `Placement` resources are removed from the member cluster. Re-running the command is safe and recommended if you notice any resources still present on the member cluster.
127122

tools/fleet/cmd/approve/approve.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ func NewCmdApprove() *cobra.Command {
4848
cmd := &cobra.Command{
4949
Use: "approve <kind>",
5050
Short: "Approve a resource",
51-
Long: `Approve a resource by patching an "Approved" condition to its status.
51+
Long: `Approve a resource by updating its status with an "Approved" condition.
5252
53-
This command patches the resource with an "Approved" condition,
53+
This command updates the clusterApprovalRequest status with an "Approved" condition,
5454
allowing staged update runs to proceed to the next stage.
5555
5656
Currently supported kinds:

tools/fleet/cmd/approve/approve_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import (
2929

3030
"github.com/google/go-cmp/cmp"
3131
"github.com/google/go-cmp/cmp/cmpopts"
32-
clusterv1beta1 "github.com/kubefleet-dev/kubefleet/apis/cluster/v1beta1"
3332
placementv1beta1 "github.com/kubefleet-dev/kubefleet/apis/placement/v1beta1"
3433
)
3534

@@ -211,9 +210,6 @@ func TestRun(t *testing.T) {
211210
// setupScheme creates a scheme with the necessary APIs for testing.
212211
func setupScheme(t *testing.T) *runtime.Scheme {
213212
scheme := runtime.NewScheme()
214-
if err := clusterv1beta1.AddToScheme(scheme); err != nil {
215-
t.Fatalf("failed to add cluster v1beta1 scheme: %v", err)
216-
}
217213
if err := placementv1beta1.AddToScheme(scheme); err != nil {
218214
t.Fatalf("failed to add placement v1beta1 scheme: %v", err)
219215
}

0 commit comments

Comments
 (0)