Skip to content

Commit

Permalink
create control_plane_lb_type and default to lb11 so it is independent…
Browse files Browse the repository at this point in the history
… of ingress lb size
  • Loading branch information
supernovae committed Jul 21, 2023
1 parent 9acb101 commit bd35e86
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion control_planes.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ resource "hcloud_load_balancer" "control_plane" {
count = var.use_control_plane_lb ? 1 : 0
name = "${var.cluster_name}-control-plane"

load_balancer_type = var.load_balancer_type
load_balancer_type = var.control_plane_lb_type
location = var.load_balancer_location
labels = merge(local.labels, local.labels_control_plane_lb)
}
Expand Down
2 changes: 2 additions & 0 deletions kube.tf.example
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,8 @@ module "kube-hetzner" {
# When this is enabled, rather than the first node, all external traffic will be routed via a control-plane loadbalancer, allowing for high availability.
# The default is false.
# use_control_plane_lb = true
# when this use_control_plane_lb is enabled, change the load balancer type to lb21, the default is "lb11"
# control_plane_lb_type = lb21

# Let's say you are not using the control plane LB solution above, and still want to have one hostname point to all your control-plane nodes.
# You could create multiple A records of to let's say cp.cluster.my.org pointing to all of your control-plane nodes ips.
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,12 @@ variable "use_control_plane_lb" {
description = "When this is enabled, rather than the first node, all external traffic will be routed via a control-plane loadbalancer, allowing for high availability."
}

variable "control_plane_lb_type" {
type = string
default = "lb11"
description = "The type of load balancer to use for the control plane load balancer. Defaults to lb11, which is the cheapest one."
}

variable "dns_servers" {
type = list(string)
default = ["1.1.1.1", "8.8.8.8", "9.9.9.9"]
Expand Down

0 comments on commit bd35e86

Please sign in to comment.