—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
Prevent issues from auto-closing with an /lifecycle frozen
comment.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or @fejta
.
/lifecycle stale
@pwittrock Keep or kill?
I didn't even think about this until now, but I think we can fix this by using the args termination --
:
$ find . -name *something* | kubectl create --
This would be roughly consistent with git
and other commands that terminate flag processing at --
. This would not be backwards incompatible with our existing commands (create
, delete
, get
, describe
, apply
, replace
).
Kinda seems like you did think of it before 😄 (Or maybe there's a distinction I'm missing!) In any case, I like it! Until there's a solution, here's an xargs example:
find ingresses/*.yaml -print0 | xargs -0 -L1 kubectl apply -f
(-print0
and -0
flags are only needed if your filenames have spaces or newlines in them, so that both programs use null characters as a separator instead of the default whitespace separator)
—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
For what it's worth, git does it's own globbing on top of shell expansion, e.g.
git diff -- '*.go' # single quotes prevents shell expansion
@eddiezane:
This request has been marked as needing help from a contributor.
Please ensure the request meets the requirements listed here.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help
command.
In response to this:
We would accept a PR with @apelisse's above solution.
/triage accepted
/help
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
I would like to take this @eddiezane
cc @seans3 @mengqiy
Personally, I like the option to use shell globbing and make kubectl
more glob friendly. I read through the other issue with options and I'm in favor of supporting positional arguments (space separated) after -f
and until another option is passed. There are plenty of 1 liners and pipes that could make this work (xargs
, tr
) but the simplicity of space or new line separated file names is less surprising and more integrated into shell environments.
kubectl apply -f ./*deploy.yaml --namespace foo
is that more or less surprising than other tools?
ls ./*deploy*
mv *deploy.yaml folder/
cp .* hidden/
Requiring quotes makes subshell replacement work in a different way than if we accepted a list of files.
kubectl apply -f $(git grep -L deploy)
Accepting a space or newline separated list matches a lot of other shell functionality and IMO is less surprising. I'm not sure if there are any positional args in kubectl
currently that this could cause problems with but file lists would be my preference.
/assign
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are on a team that was mentioned.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are on a team that was mentioned.