diff --git a/init.tf b/init.tf index 3ccc6fe..f50341b 100644 --- a/init.tf +++ b/init.tf @@ -13,7 +13,7 @@ resource "null_resource" "first_control_plane" { token = random_password.k3s_token.result cluster-init = true disable-cloud-controller = true - disable = concat(["local-storage"], local.is_single_node_cluster ? [] : ["servicelb"], var.traefik_enabled ? [] : ["traefik"], var.metric_server_enabled ? [] : ["metric-server"]) + disable = concat(["local-storage"], local.is_single_node_cluster ? [] : ["servicelb"], var.traefik_enabled ? [] : ["traefik"], var.metrics_server_enabled ? [] : ["metrics-server"]) flannel-iface = "eth1" kubelet-arg = "cloud-provider=external" node-ip = module.control_planes[0].private_ipv4_address diff --git a/terraform.tfvars.example b/terraform.tfvars.example index cd00045..4340743 100644 --- a/terraform.tfvars.example +++ b/terraform.tfvars.example @@ -62,7 +62,7 @@ load_balancer_type = "lb11" # traefik_enabled = false # If you want to disable the metric server, you can! By defaults it is enabled. -# metric_server_enabled = false +# metrics_server_enabled = false # If you want to allow non-control-plane workloads to run on the control-plane nodes set "true" below. The default is "false". # Also good for single node clusters. diff --git a/variables.tf b/variables.tf index a5f6b22..2b5a694 100644 --- a/variables.tf +++ b/variables.tf @@ -93,7 +93,7 @@ variable "allow_scheduling_on_control_plane" { description = "Whether to allow non-control-plane workloads to run on the control-plane nodes" } -variable "metric_server_enabled" { +variable "metrics_server_enabled" { type = bool default = true description = "Whether to enable or disbale k3s mertric server"