Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

rikatz
Copy link
Member

@rikatz rikatz commented Apr 22, 2021

Signed-off-by: Ricardo Pchevuzinske Katz [email protected]

What type of PR is this?

/kind bug

What this PR does / why we need it:

When running kubectl create ingress name --annotation=key without '=value' it panics due to lack of validation

Which issue(s) this PR fixes:

Fixes kubernetes/kubectl#1041

Fix panic with kubectl create ingress annotation flag and empty value

This was added in PR #94327

/sig cli
/priority important-soon

Signed-off-by: Ricardo Pchevuzinske Katz <[email protected]>
@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. sig/cli Categorizes an issue or PR as relevant to SIG CLI. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 22, 2021
@k8s-ci-robot
Copy link
Contributor

@rikatz: This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Apr 22, 2021
@k8s-ci-robot k8s-ci-robot requested review from soltysh and zhouya0 April 22, 2021 16:57
Copy link
Member

@eddiezane eddiezane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch and thank you for adding a test for this 😄 .

This probably needs a release note?

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Apr 22, 2021
@rikatz
Copy link
Member Author

rikatz commented Apr 22, 2021

Added the release note, will cherry pick to v1.20 and v1.21 once merged :D

@rikatz
Copy link
Member Author

rikatz commented Apr 22, 2021

/test pull-kubernetes-e2e-gce-100-performance

cmd.Flags().StringArrayVar(&o.Rules, "rule", o.Rules, "Rule in format host/path=service:port[,tls=secretname]. Paths containing the leading character '*' are considered pathType=Prefix. tls argument is optional.")
cmd.Flags().StringVar(&o.DefaultBackend, "default-backend", o.DefaultBackend, "Default service for backend, in format of svcname:port")
cmd.Flags().StringArrayVar(&o.Annotations, "annotation", o.Annotations, "Annotation to insert in the ingress object, in the format annotation=value")
cmd.Flags().StringArrayVar(&o.Annotations, "annotation", o.Annotations, "Annotation to insert in the ingress object, in the format annotation=[value]")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Are the square brackets to denote that technically the value can be empty/omitted? I feel like that use case might be rare enough for the brackets to cause more confusion than clarification.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed, thank you!!

Signed-off-by: Ricardo Pchevuzinske Katz <[email protected]>
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 22, 2021
@rikatz
Copy link
Member Author

rikatz commented Apr 22, 2021

/label tide/merge-method-squash

@k8s-ci-robot k8s-ci-robot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Apr 22, 2021
@KnVerey
Copy link
Contributor

KnVerey commented Apr 22, 2021

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 22, 2021
@eddiezane
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eddiezane, rikatz

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@KnVerey
Copy link
Contributor

KnVerey commented Apr 22, 2021

/test pull-kubernetes-e2e-kind

@k8s-ci-robot k8s-ci-robot merged commit 3dfbcbc into kubernetes:master Apr 23, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.22 milestone Apr 23, 2021
k8s-ci-robot pushed a commit that referenced this pull request May 6, 2021
…gress (#101428)

* Fix validation in kubectl create ingress

Signed-off-by: Ricardo Pchevuzinske Katz <[email protected]>

* Fix validation in kubectl create ingress

Signed-off-by: Ricardo Pchevuzinske Katz <[email protected]>
k8s-ci-robot pushed a commit that referenced this pull request May 7, 2021
…gress (#101426)

* Fix validation in kubectl create ingress

Signed-off-by: Ricardo Pchevuzinske Katz <[email protected]>

* Fix validation in kubectl create ingress

Signed-off-by: Ricardo Pchevuzinske Katz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/kubectl cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cli Categorizes an issue or PR as relevant to SIG CLI. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kubectl create ingress panics when wrong annotation is passed
4 participants