Kubernetes specific option is always shown in help message of `docker version`
Open
Nobody has claimed this yet.
area/kubernetes
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 2.2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 43
Description
The --kubeconfig option of docker version is annotated as kubernetes.
Therefore it should be hidden in the help message unless the orchestrator is kubernetes.
However, it is displayed regardless of the configured orchestrator:
$ DOCKER_STACK_ORCHESTRATOR=swarm docker version --help | grep kubeconfig
--kubeconfig string Kubernetes config file
$ DOCKER_STACK_ORCHESTRATOR=kubernetes docker version --help | grep kubeconfig
--kubeconfig string Kubernetes config file
$ docker --version
Docker version 18.09.0-dev, build 21cce52b
Related: #1251
Moved here from https://github.com/docker/cli/pull/1251#issuecomment-409483312
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Go definition of the docker version --kubeconfig option and the help-generation logic that handles its kubernetes annotation. Reproduce the issue with the two DOCKER_STACK_ORCHESTRATOR values and verify that the option is hidden for Swarm and shown for Kubernetes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100