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