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

Add flag to optionally upload CF template to s3 bucket #56

Merged
merged 2 commits into from
Oct 11, 2024

Conversation

mikkeloscar
Copy link
Collaborator

When there are many egress routes defined in a cluster, the CF stack template can grow to a size not accepted by Cloudformation anymore. The workaround for this is to upload the template to s3 and reference the s3 url in the CF stack.

This PR adds an optional flag --cf-template-bucket which takes the name of an s3 bucket as argument which is used to upload the template.

It's assumed that the s3 bucket lifecycle is managed outside of the controller and that the controller has access to write to the bucket for uploading the templates.

@szuecs
Copy link
Owner

szuecs commented Oct 7, 2024

@mikkeloscar no test?

@mikkeloscar
Copy link
Collaborator Author

Will try to come up with some test. It's hard to fully test in unit test as it's mostly AWS s3 and cloudformation interaction that needs to be tested.

Signed-off-by: Mikkel Oscar Lyderik Larsen <[email protected]>
@mikkeloscar
Copy link
Collaborator Author

@szuecs I added a test for the new code paths. It's mocking the API so it's not testing that much, but better than nothing :)

@szuecs
Copy link
Owner

szuecs commented Oct 11, 2024

👍

1 similar comment
@mikkeloscar
Copy link
Collaborator Author

👍

@mikkeloscar mikkeloscar merged commit 3874297 into master Oct 11, 2024
2 checks passed
@mikkeloscar mikkeloscar deleted the optional-cf-template-bucket branch October 11, 2024 10:53
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