krane icon indicating copy to clipboard operation
krane copied to clipboard

Implement repeatable -f flag

Open timothysmith0609 opened this issue 5 years ago • 7 comments

Feature request

In following our attempt to mimic, as much as possible, kubectl syntax, we should make the --filenames | -f flag repeatable. This is simple to do (simply set repeatable: true for the option). However, https://github.com/erikhuda/thor/pull/715 needs to be released before this will actually work as intended. To observe why this fails, simply run the CLI tests and observe the failure outputs.

timothysmith0609 avatar Jun 30 '20 20:06 timothysmith0609

This would be really handy for deploying via krane render | krane deploy and including ejson secrets in that deploy. Currently, render doesn't render secrets (which I think makes sense), so if you want to deploy them you have to deploy them separately and figure out on your own how to manage purging.

airhorns avatar Jul 20 '20 20:07 airhorns

This would be really handy for deploying via krane render | krane deploy and including ejson secrets in that deploy.

As an fyi: you can do krane render ... | krane deploy ... --stdin -f path/to/secrets.ejson

dturn avatar Jul 20 '20 21:07 dturn

--stdin is deprecated now though right? Users are asked to use -f -, hence the need for repeatable -fs to get the same behaviour without a warning.

airhorns avatar Jul 20 '20 21:07 airhorns

This is blocked on an upcoming Thor release (PR there is already merged).

timothysmith0609 avatar Jul 20 '20 21:07 timothysmith0609

This is blocked on an upcoming Thor release (PR there is already merged).

That PR seems merged. Is there any way to specify -f secrets.ejson combined with --stdin which is not deprecated now? Any plans to implement this? Is there anything I can help with?

simi avatar Apr 16 '22 20:04 simi

It seems -f secrets.ejson - works now. Anyway --stdin seems more explicit to me. Is there any reason why --stdin is deprecated?

I did a quick test and it is possible really easily enable multiple -f flags, I can send a PR if welcomed. It would be also nice to update README.md to make it clear it is possible to use -f with both stdin and secrets. If I understand it well, it is currently stating it is actually not possible.

simi avatar Apr 16 '22 20:04 simi

Is there any reason why --stdin is deprecated?

The original desire was to keep the flags similar to kubectl apply.

I did a quick test and it is possible really easily enable multiple -f flags, I can send a PR if welcomed.

That would be very welcome. It's been a long time since I touched this issue, and I'm sure things have changed since then :) If you're able to pick this up I would really appreciate it!

timothysmith0609 avatar Apr 18 '22 13:04 timothysmith0609