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

Allow extra kubectl options to pass through ko apply #288

Closed
jcrossley3 opened this issue Oct 16, 2018 · 2 comments
Closed

Allow extra kubectl options to pass through ko apply #288

jcrossley3 opened this issue Oct 16, 2018 · 2 comments

Comments

@jcrossley3
Copy link

jcrossley3 commented Oct 16, 2018

Instead of this:
ko resolve -f config/ | kubectl apply -f - -n myns
I'd like to do this:
ko apply -f config/ -n myns

Essentially, pass any unrecognized options through to kubectl apply, excluding those that might be relevant to both, e.g. -f

@imjasonh
Copy link
Collaborator

Does oc also simply pass unknown flags through to kubectl?

It looks like kubectl apply doesn't have an -n flag: https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#apply

I'm not sure it makes sense to ko apply a bunch of config files and overwrite the namespaces each of those configs as we run through them. We might need a better higher-level way to express "install these components in namespace foo" than just passing to ko apply or kubectl apply.

@jcrossley3
Copy link
Author

Not too familiar with the innards of oc but I think it's a completely separate beast from kubectl, i.e. I don't believe there is any delegation.

The -n flag is a global option that any kubectl command accepts. See kubectl options

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

No branches or pull requests

2 participants