Support creating multiple worker auto scaling groups #12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR o'clock
Description
The objective of this change is to allow for defining multiple
worker
groups, similar to those supported by kops (https://github.com/kubernetes/kops/blob/master/docs/instance_groups.md).A use case of multiple worker groups is to segment worker nodes by their primary function. For example, one set may be general purpose group of high-cpu instances for web apis, while another is a set of high-memory instances dedicated to data analytics.
I'll preface this with a disclaimer: I'm not well versed in terraform and quite open to suggestions on cleaning this up for an eventual merge.
To do so I've moved the various
worker
variables to a newworker_groups
list of maps (yuck?).Further, various resources, etc. are moved to a new
worker_groups
module.Additional concerns
worker
vars are in a map, only a complete default configuration is applied. In other words, ifasg_max_size
is not set in the workger_group variable, a default value is NOT applied. Moving the default value to thelookup()
function feels wrong, as that value may be referenced elsewhere in the future.Checklist
terraform fmt
andterraform validate
both work from the root andexamples/eks_test_fixture
directories (look in CI for an example)