Skip to content

Commit 266c773

Browse files
hantmacfurykerry
authored andcommitted
fix: rollout approve docs
1 parent 1fa53d0 commit 266c773

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ $ kubectl kruise rollout status statefulsets/sts1
9999
$ kubectl kruise rollout status statefulsets.apps.kruise.io/sts2
100100
101101
# approve a kruise rollout resource named "rollout-demo" in "ns-demo" namespace
102-
$ kubectl kruise rollout approve rollout-demo -n ns-demo`
102+
$ kubectl kruise rollout approve rollout/rollout-demo -n ns-demo`
103103

104104
# undo a kruise rollout resource
105105
$ kubectl kruise rollout undo rollout/rollout-demo

pkg/cmd/rollout/rollout_approve.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ package rollout
1919
import (
2020
"fmt"
2121

22-
internalapi "github.com/openkruise/kruise-tools/pkg/api"
23-
"github.com/openkruise/kruise-tools/pkg/cmd/util"
24-
internalpolymorphichelpers "github.com/openkruise/kruise-tools/pkg/internal/polymorphichelpers"
2522
"github.com/spf13/cobra"
2623
"k8s.io/apimachinery/pkg/types"
2724
utilerrors "k8s.io/apimachinery/pkg/util/errors"
@@ -33,6 +30,10 @@ import (
3330
"k8s.io/kubectl/pkg/scheme"
3431
"k8s.io/kubectl/pkg/util/i18n"
3532
"k8s.io/kubectl/pkg/util/templates"
33+
34+
internalapi "github.com/openkruise/kruise-tools/pkg/api"
35+
"github.com/openkruise/kruise-tools/pkg/cmd/util"
36+
internalpolymorphichelpers "github.com/openkruise/kruise-tools/pkg/internal/polymorphichelpers"
3637
)
3738

3839
// ApproveOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of
@@ -63,7 +64,7 @@ var (
6364
ApproveExample = templates.Examples(`
6465
# approve a kruise rollout resource named "rollout-demo" in "ns-demo" namespace
6566
66-
kubectl-kruise rollout approve rollout-demo -n ns-demo`)
67+
kubectl-kruise rollout approve rollout/rollout-demo -n ns-demo`)
6768
)
6869

6970
// NewRolloutApproveOptions returns an initialized ApproveOptions instance

0 commit comments

Comments
 (0)