ko
ko copied to clipboard
run: allow passing arbitrary flags after `--`
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
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
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 https://github.com/google/ko/issues/317 -- we log a deprecation warning for that, but should probably just go ahead and clean up the old flags by now.
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
.
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.
kindly ping @Dentrax, are you going to implement this?
If ko
keep continuing to support run
command, then we can start to work on this. Updated the issue title.