[WIP] nodepools feature

This commit is contained in:
jodhi
2022-02-23 22:46:46 +07:00
parent 054782d6be
commit 7d301f2c6d
5 changed files with 38 additions and 18 deletions

View File

@@ -30,4 +30,14 @@ locals {
install_k3s_server = concat(local.common_commands_install_k3s, ["curl -sfL https://get.k3s.io | INSTALL_K3S_SKIP_SELINUX_RPM=true INSTALL_K3S_SKIP_START=true INSTALL_K3S_EXEC=server sh -"])
install_k3s_agent = concat(local.common_commands_install_k3s, ["curl -sfL https://get.k3s.io | INSTALL_K3S_SKIP_SELINUX_RPM=true INSTALL_K3S_SKIP_START=true INSTALL_K3S_EXEC=agent sh -"])
agent_nodepools = merge([
for nodepool_name, nodepool_obj in var.agent_nodepools : {
for index in range(nodepool_obj.count) :
format("%s-%s", nodepool_name, index) => {
index : index, # just for the compatibility with previous structure
server_type : nodepool_obj.server_type
}
}
]...)
}