terraform-metal-multiarch-k8s
terraform-metal-multiarch-k8s copied to clipboard
introduce a node_pools variable to this module
https://github.com/equinix/terraform-metal-multiarch-k8s/blob/main/kubernetes-node-pool.tf could be implemented as a for loop over a var.node_pools slice of structs.
The existing hard-coded green/blue node pools would be replaced with user-defined sets of node pools where all options can be specified.
Variables that look like count_arm = 1; plan_arm = "foo"
would become node_pools = [{name: "arm", count=1, instance_type: "foo"}]
.
In order to get this benefit, we may need to combine gpu_node_pool module options and customizations into the node_pool module.
node_pool/modules/gpu/main.tf () node_pool/variables.tf gpu_node_options = { install_foo: true, ...}
It may not be necessary to create a gpu module if there are no resources unique to this configuration. In that case, we can conditionally overlay all gpu options in the node_pool module.