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

Directory based kubectl apply when there are more than 1k resources #257

Merged
merged 2 commits into from
Apr 3, 2018

Conversation

dturn
Copy link
Contributor

@dturn dturn commented Apr 2, 2018

Deploys with thousands of resources can fail with Argument list too long - kubectl (Errno::E2BIG). This happens because we render each resource to its own file and then pass all of the files to kubectl apply via the -f` flag. This pr detects when there are greater than 1k resources copies them to a temp directory and passes only the directory to kubectl apply.

cc: @dwradcliffe

Fix tests to not care about message order
@dturn dturn force-pushed the support-large-number-of-resources branch from fa15652 to 5981c2c Compare April 2, 2018 21:31
@dturn
Copy link
Contributor Author

dturn commented Apr 2, 2018

Changes are in. Would like feedback on the ensure block vs wrapping almost the entire apply_all method in a block.

Copy link
Contributor

@klautcomputing klautcomputing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I like the way the code is unified now, I have no concerns about the change in the test either.

Copy link
Contributor

@KnVerey KnVerey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks for the speedy fix.

@KnVerey
Copy link
Contributor

KnVerey commented Apr 2, 2018

Would like feedback on the ensure block vs wrapping almost the entire apply_all method in a block.

I don't have a strong preference since the nesting doesn't get too crazy.

@dturn dturn merged commit d152372 into master Apr 3, 2018
@dturn dturn deleted the support-large-number-of-resources branch April 3, 2018 15:06
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.

3 participants