Skip to content

Commit aad7105

Browse files
authored
Merge pull request kubernetes#3256 from logicalhan/kepctl
fix the example output for kepctl
2 parents edb6849 + 3a19baf commit aad7105

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

pkg/kepctl/commands/create.go

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func addCreate(topLevel *cobra.Command) {
3232
Use: "create",
3333
Short: "Create a new KEP",
3434
Long: "Create a new KEP using the current KEP template for the given type",
35-
Example: ` kepctl create --name a-path --title "My KEP" --number 123 --owning-sig sig-foo`,
35+
Example: ` kepctl create --name a-path --title "My KEP" --number 123 --owning-sig sig-foo --approvers someapprover --authors githubhandle`,
3636
SilenceUsage: true,
3737
SilenceErrors: true,
3838
PreRunE: func(cmd *cobra.Command, args []string) error {
@@ -94,6 +94,20 @@ func addCreate(topLevel *cobra.Command) {
9494
"KEP State",
9595
)
9696

97+
cmd.PersistentFlags().StringArrayVar(
98+
&co.Approvers,
99+
"approvers",
100+
[]string{},
101+
"Approvers",
102+
)
103+
104+
cmd.PersistentFlags().StringVar(
105+
&co.Stage,
106+
"stage",
107+
string(api.AlphaStage),
108+
"KEP Stage",
109+
)
110+
97111
cmd.PersistentFlags().StringVar(
98112
&co.SIG,
99113
"owning-sig",

pkg/proposal/create.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ type CreateOpts struct {
4747
Reviewers []string
4848
Type string
4949
State string
50+
Stage string
5051
ParticipatingSIGs []string
5152
PRRApprovers []string
5253
}
@@ -162,6 +163,7 @@ func populateProposal(p *api.Proposal, opts *CreateOpts) {
162163
p.ParticipatingSIGs = append(opts.ParticipatingSIGs, opts.SIG)
163164
p.Filename = opts.Name
164165
p.LastUpdated = "v1.19"
166+
p.Stage = api.Stage(opts.Stage)
165167

166168
if len(opts.PRRApprovers) > 0 {
167169
p.PRRApprovers = updatePersonReference(opts.PRRApprovers)

0 commit comments

Comments
 (0)