fix terraform fmt, enable traefik by default & return null if no lb
This commit is contained in:
parent
3fd610a9d8
commit
567a8268b1
@ -37,7 +37,7 @@ _Please note that we are not affiliated to Hetzner, this is just an open source
|
||||
- Proper use of the underlying Hetzner private network to remove the need for encryption and minimize latency.
|
||||
- Automatic HA with the default setting of three control-plane and two agents nodes.
|
||||
- Ability to add or remove as many nodes as you want while the cluster stays running.
|
||||
- (Optional) Traefik ingress controller attached to a Hetzner load balancer with proxy protocol turned on.
|
||||
- Automatic Traefik ingress controller attached to a Hetzner load balancer with proxy protocol turned on.
|
||||
- (Optional) Out of the box config of Traefik with SSL certficate auto-generation.
|
||||
|
||||
_It uses Terraform to deploy as it's easy to use, and Hetzner provides a great [Hetzner Terraform Provider](https://registry.terraform.io/providers/hetznercloud/hcloud/latest/docs)._
|
||||
|
@ -24,7 +24,7 @@ locals {
|
||||
}
|
||||
|
||||
resource "local_sensitive_file" "kubeconfig" {
|
||||
content = local.kubeconfig_external
|
||||
filename = "kubeconfig.yaml"
|
||||
file_permission = "600"
|
||||
content = local.kubeconfig_external
|
||||
filename = "kubeconfig.yaml"
|
||||
file_permission = "600"
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ output "agents_public_ipv4" {
|
||||
|
||||
output "load_balancer_public_ipv4" {
|
||||
description = "The public IPv4 address of the Hetzner load balancer"
|
||||
value = local.is_single_node_cluster || var.traefik_enabled == false ? module.control_planes[0].ipv4_address : data.hcloud_load_balancer.traefik[0].ipv4
|
||||
value = local.is_single_node_cluster ? module.control_planes[0].ipv4_address : var.traefik_enabled == false ? null : data.hcloud_load_balancer.traefik[0].ipv4
|
||||
}
|
||||
|
||||
output "kubeconfig_file" {
|
||||
|
@ -71,7 +71,7 @@ variable "hetzner_csi_version" {
|
||||
|
||||
variable "traefik_enabled" {
|
||||
type = bool
|
||||
default = false
|
||||
default = true
|
||||
description = "Whether to enable or disbale k3s traefik installation"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user