servers_num -> control_plane_count
This commit is contained in:
parent
4f9fa42cc9
commit
22606926a1
@ -100,7 +100,7 @@ To scale the number of nodes up or down, just make sure to properly `kubectl dra
|
||||
For instance:
|
||||
|
||||
```tfvars
|
||||
servers_num = 4
|
||||
control_plane_count = 4
|
||||
agents_num = 3
|
||||
```
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
module "control_planes" {
|
||||
source = "./modules/host"
|
||||
|
||||
count = var.servers_num
|
||||
count = var.control_plane_count
|
||||
name = "k3s-control-plane-${count.index}"
|
||||
|
||||
ssh_keys = [hcloud_ssh_key.k3s.id]
|
||||
@ -28,7 +28,7 @@ module "control_planes" {
|
||||
}
|
||||
|
||||
resource "null_resource" "control_planes" {
|
||||
count = var.servers_num
|
||||
count = var.control_plane_count
|
||||
|
||||
triggers = {
|
||||
control_plane_id = module.control_planes[count.index].id
|
||||
|
@ -20,7 +20,7 @@ control_plane_server_type = "cpx11"
|
||||
lb_server_type = "lb11"
|
||||
|
||||
# At least 3 server nodes is recommended for HA, otherwise you need to turn off automatic upgrade (see ReadMe).
|
||||
servers_num = 3
|
||||
control_plane_count = 3
|
||||
|
||||
|
||||
agent_nodepools = {
|
||||
|
10
variables.tf
10
variables.tf
@ -45,6 +45,11 @@ variable "control_plane_server_type" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "control_plane_count" {
|
||||
description = "Number of control plane nodes."
|
||||
type = number
|
||||
}
|
||||
|
||||
|
||||
variable "lb_server_type" {
|
||||
description = "Default load balancer server type"
|
||||
@ -57,11 +62,6 @@ variable "lb_disable_ipv6" {
|
||||
default = false
|
||||
}
|
||||
|
||||
variable "servers_num" {
|
||||
description = "Number of control plane nodes."
|
||||
type = number
|
||||
}
|
||||
|
||||
variable "agent_nodepools" {
|
||||
description = "Number of agent nodes."
|
||||
type = map(any)
|
||||
|
Loading…
Reference in New Issue
Block a user