Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Change the webhook GVK in help text to match kb create api #1881

Merged
merged 1 commit into from
Dec 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions pkg/plugins/golang/v2/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ func (p *createWebhookSubcommand) UpdateContext(ctx *plugin.Context) {
ctx.Description = `Scaffold a webhook for an API resource. You can choose to scaffold defaulting,
validating and (or) conversion webhooks.
`
ctx.Examples = fmt.Sprintf(` # Create defaulting and validating webhooks for CRD of group crew, version v1
# and kind FirstMate.
%s create webhook --group crew --version v1 --kind FirstMate --defaulting --programmatic-validation
ctx.Examples = fmt.Sprintf(` # Create defaulting and validating webhooks for CRD of group ship, version v1beta1
# and kind Frigate.
%s create webhook --group ship --version v1beta1 --kind Frigate --defaulting --programmatic-validation

# Create conversion webhook for CRD of group crew, version v1 and kind FirstMate.
%s create webhook --group crew --version v1 --kind FirstMate --conversion
# Create conversion webhook for CRD of group shio, version v1beta1 and kind Frigate.
%s create webhook --group ship --version v1beta1 --kind Frigate --conversion
`,
ctx.CommandName, ctx.CommandName)

Expand Down
10 changes: 5 additions & 5 deletions pkg/plugins/golang/v3/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ func (p *createWebhookSubcommand) UpdateContext(ctx *plugin.Context) {
ctx.Description = `Scaffold a webhook for an API resource. You can choose to scaffold defaulting,
validating and (or) conversion webhooks.
`
ctx.Examples = fmt.Sprintf(` # Create defaulting and validating webhooks for CRD of group crew, version v1
# and kind FirstMate.
%s create webhook --group crew --version v1 --kind FirstMate --defaulting --programmatic-validation
ctx.Examples = fmt.Sprintf(` # Create defaulting and validating webhooks for CRD of group ship, version v1beta1
# and kind Frigate.
%s create webhook --group ship --version v1beta1 --kind Frigate --defaulting --programmatic-validation
# Create conversion webhook for CRD of group crew, version v1 and kind FirstMate.
%s create webhook --group crew --version v1 --kind FirstMate --conversion
# Create conversion webhook for CRD of group ship, version v1beta1 and kind Frigate.
%s create webhook --group ship --version v1beta1 --kind Frigate --conversion
`,
ctx.CommandName, ctx.CommandName)

Expand Down