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 create to handle multiple resources, remove createall #3196

Merged

Conversation

smarterclayton
Copy link
Contributor

Create now can leverage resource.Builder to take as input multiple objects, and will report any failures that occur. The '-f' command is extended to support multiple inputs:

kubectl create -f - -f <file> -f <dir>

And will enumerate in the order provided. Directories are non-recursive and will process any JSON or YAML files found.

In addition, "List" is supported as a type, so given:

kubectl get replicationcontrollers,services -o json --namespace=source --selector=myapp=foo | kubectl create -f - --namespace=dest

you can export a subset of your app to another namespace.

@smarterclayton
Copy link
Contributor Author

Only the last commit two commits are new, the others are represented in #3004

@smarterclayton smarterclayton force-pushed the allow_create_to_span_resources branch 3 times, most recently from d8243ff to 63d65ee Compare January 8, 2015 22:17
@bgrant0607
Copy link
Member

Nice.

Waiting on #3004 to merge.

Have you started doing this to update, also?

@smarterclayton
Copy link
Contributor Author

Not yet, that was the last. Update had some weirdness with defaulting values I wanted to read over your proposals on various management style things.

@smarterclayton
Copy link
Contributor Author

Update I also need to look at PUT behavior on the client (offering an alternative to our current behavior, which is total overwrite)

@smarterclayton smarterclayton changed the title WIP - Allow create to handle multiple resources, remove createall Allow create to handle multiple resources, remove createall Jan 8, 2015
@bgrant0607
Copy link
Member

Fair enough. Yes, I made a number of comments about different flavors of updates on #3233, which should be in line with my previous comments on that topic.

@smarterclayton smarterclayton force-pushed the allow_create_to_span_resources branch 4 times, most recently from 1e7f3b5 to 8a55a83 Compare January 9, 2015 17:18
@bgrant0607 bgrant0607 self-assigned this Jan 9, 2015
Like Delete, which can now run over multiple types:

    kubectl delete pods,services -l name=foo

Get should be able to span items for label selection

    kubectl get pods,services -l name=foo
@bgrant0607
Copy link
Member

I merged #3004. Please rebase, and I'll merge this one.

@smarterclayton
Copy link
Contributor Author

Doesn't seem to need rebase

@smarterclayton
Copy link
Contributor Author

Since the #3004 was a straight merge of two tips without a rebase

bgrant0607 added a commit that referenced this pull request Jan 13, 2015
…ources

Allow create to handle multiple resources, remove createall
@bgrant0607 bgrant0607 merged commit de2e298 into kubernetes:master Jan 13, 2015
@smarterclayton smarterclayton deleted the allow_create_to_span_resources branch February 11, 2015 02:21
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

Successfully merging this pull request may close these issues.

2 participants