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

WIP: Supersedes #3 #6

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

WIP: Supersedes #3 #6

wants to merge 4 commits into from

Conversation

kingdonb
Copy link

I don't know a better way to expect these command line options, I've just replaced them with optional defaults here that worked for my example use case. Supersedes PR #3 which fixed an earlier issue I had with this plugin.

This probably isn't getting merged anywhere as-is, but maybe having this PR open will help other people that find this issue against kubectl v1.13 and newer API clients that have breaking plugin API changes. This trick still works great against my reasonably current AKS cluster version!

Kingdon Barrett added 3 commits December 27, 2018 10:43
the environment variables in KUBECTL_PLUGINS_* basically aren't a thing
anymore, need to go away as described in
https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/#flags-and-argument-handling

we need a different way to get $KUBECTL, $NAMESPACE, $TARGETUSER, and
the container name.  I've set some defaults that work for me, but with
the possible exception of `which kubectl` they are probably no good for
anyone else.
@kingdonb
Copy link
Author

The plugin also can't be named exec-user anymore according to kubectl plugin list which emits a warning expecting the plugin name with dashes in it to avoid shadowing built-ins.

https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/#name-conflicts-and-overshadowing

since shadowing is a thing, I thought to call this plugin "userland"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant