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

"kubectl logs" reports "__kubectl_namespace_flag" error while using bash completion. #31134

Closed
xingzhou opened this issue Aug 22, 2016 · 0 comments · Fixed by #31135
Closed
Labels
area/kubectl priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.

Comments

@xingzhou
Copy link
Contributor

While doing ticket #25287 , found two issues.
The first issue is that if create a pod and query the logs with the following command:

kubectl logs POD_NAME -c [TAB][TAB]

the command will print error like method __kubectl_namespace_flag not found.
I think the old method __kubectl_namespace_flag has already been renamed to __kubectl_override_flags in this commit #23830

The second issue is when using the flags defined here in the "--flag=value" style in kubectl command, the completion does not work. E.g. create a pod in k8s cluster, use the following command:

kubectl get --namespace=default pod [TAB][TAB]

the above command will not return the possible pod list.

Will submit a patch to fix the issues then.

xingzhou added a commit to xingzhou/kubernetes that referenced this issue Aug 22, 2016
This patch includes the fix of the following issue:
• Correct the method invocation from "__kubectl_namespace_flag"
  to "__kubectl_override_flags"
• Support bash completion if "--namespace=xxx" style flags are
  specified in the kubectl command

Fixes kubernetes#31134
@pwittrock pwittrock added priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. good-for-contributor-onboarding labels Aug 22, 2016
k8s-github-robot pushed a commit that referenced this issue Aug 25, 2016
Automatic merge from submit-queue

Fixed two issues of kubectl bash completion.

This patch includes the fix of the following issue:
• Correct the method invocation from "__kubectl_namespace_flag"
  to "__kubectl_override_flags"
• Support bash completion if "--namespace=xxx" style flags are
  specified in the kubectl command

Fixes #31134
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubectl priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants