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

run: allow passing arbitrary flags after -- #748

Open
Dentrax opened this issue Jul 6, 2022 · 6 comments
Open

run: allow passing arbitrary flags after -- #748

Dentrax opened this issue Jul 6, 2022 · 6 comments
Labels

Comments

@Dentrax
Copy link

Dentrax commented Jul 6, 2022

It would be nice to add --namespace flag for run subcommand as in apply command. But noticed a (DEPRECATED) warning. So couldn't get the actual reason why --namespace is deprecated. We moved it to an env var or something different way?

Workaround is to switch namespace using kubectl $ kubectl config set-context foo then ko run .

ko: 0.11.2

cc @developer-guy

@imjasonh
Copy link
Member

imjasonh commented Jul 6, 2022

I don't think ko run is very widely used -- I don't think I've ever used it myself -- but it does seem like --namespace would be a useful addition, if we decide to keep the command around.

ko run ./cmd/app -n foo -- arg1 arg2 sgtm

@imjasonh
Copy link
Member

imjasonh commented Jul 6, 2022

As for why ko apply --namespace is (DEPRECATED), that's because we want to have users just pass flags directly through to kubectl instead of having them be flags on ko apply itself. See #317 -- we log a deprecation warning for that, but should probably just go ahead and clean up the old flags by now.

@imjasonh
Copy link
Member

We've decided to keep ko run around at least for now, so if you or anyone reading this is interested in adding it, that could be nice.

I'd probably want to support passing flags arbitrary to kubectl run similar to how we do it for ko apply today, by passing anything after -- to kubectl run directly. This would enable --namespace/-n, and also other nice things like --attach.

@imjasonh imjasonh added the good first issue Good for newcomers label Aug 24, 2022
@github-actions
Copy link

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Keep fresh with the 'lifecycle/frozen' label.

@developer-guy
Copy link
Collaborator

kindly ping @Dentrax, are you going to implement this?

@Dentrax Dentrax changed the title run: introduce --namespace flag run: allow passing arbitrary flags after -- Jan 11, 2023
@Dentrax
Copy link
Author

Dentrax commented Jan 11, 2023

If ko keep continuing to support run command, then we can start to work on this. Updated the issue title.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants