Make proxy protocol in upcloud LB configurable (#10971)
parent
e7d29715b4
commit
01c86af77f
|
@ -118,6 +118,7 @@ worker_allowed_ports = []
|
|||
|
||||
loadbalancer_enabled = false
|
||||
loadbalancer_plan = "development"
|
||||
loadbalancer_proxy_protocol = false
|
||||
loadbalancers = {
|
||||
# "http" : {
|
||||
# "port" : 80,
|
||||
|
|
|
@ -33,6 +33,7 @@ module "kubernetes" {
|
|||
|
||||
loadbalancer_enabled = var.loadbalancer_enabled
|
||||
loadbalancer_plan = var.loadbalancer_plan
|
||||
loadbalancer_outbound_proxy_protocol = var.loadbalancer_proxy_protocol ? "v2" : ""
|
||||
loadbalancers = var.loadbalancers
|
||||
|
||||
server_groups = var.server_groups
|
||||
|
|
|
@ -521,6 +521,9 @@ resource "upcloud_loadbalancer_backend" "lb_backend" {
|
|||
|
||||
loadbalancer = upcloud_loadbalancer.lb[0].id
|
||||
name = "lb-backend-${each.key}"
|
||||
properties {
|
||||
outbound_proxy_protocol = var.loadbalancer_outbound_proxy_protocol
|
||||
}
|
||||
}
|
||||
|
||||
resource "upcloud_loadbalancer_frontend" "lb_frontend" {
|
||||
|
|
|
@ -85,6 +85,10 @@ variable "loadbalancer_plan" {
|
|||
type = string
|
||||
}
|
||||
|
||||
variable "loadbalancer_outbound_proxy_protocol" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "loadbalancers" {
|
||||
description = "Load balancers"
|
||||
|
||||
|
|
|
@ -121,6 +121,11 @@ variable "loadbalancer_plan" {
|
|||
default = "development"
|
||||
}
|
||||
|
||||
variable "loadbalancer_proxy_protocol" {
|
||||
type = bool
|
||||
default = false
|
||||
}
|
||||
|
||||
variable "loadbalancers" {
|
||||
description = "Load balancers"
|
||||
|
||||
|
|
Loading…
Reference in New Issue