kubernetes / kubectl

Issue tracker and mirror of kubectl code
Apache License 2.0
2.82k stars 909 forks source link

Case sensitiveness of --restart flag related values #1504

Open slahirucd7 opened 10 months ago

slahirucd7 commented 10 months ago

What happened:

With kubectl commands we can provide the --restart flag values. Therefore we can run below command with the above mentioned flag. kubectl run busybox --image=busybox --restart=never But executing above command gives the error -> error: invalid restart policy: never

Considering above executed this command -> kubectl run busybox --image=busybox --restart=Never It worked without any errors.

What you expected to happen:

Isn't it better to support both never as well as Never ?

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

(server details) Major:"1", Minor:"27", GitVersion:"v1.27.4"



- Cloud provider or hardware configuration:
- OS (e.g: `cat /etc/os-release`):
k8s-ci-robot commented 10 months ago

This issue is currently awaiting triage.

SIG CLI takes a lead on issue triage for this repo, but any Kubernetes member can accept issues by applying the triage/accepted label.

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](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
Ritikaa96 commented 10 months ago

I think the case sensitivity is legit and the present basis of error is reasonable. there are three imagePolicy: Never, OnFailure, Always

Rather than removing case sensitivity , we can improve the error message.

Ritikaa96 commented 10 months ago

The error message is from here It can be change to "invalid restart policy: %s, Value can be either one from- Never, Always, OnFailure"

k8s-triage-robot commented 7 months ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

slahirucd7 commented 7 months ago

/remove-lifecycle stale

Ritikaa96 commented 7 months ago

PR for the issue : #121570

k8s-triage-robot commented 4 months ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 3 months ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten