add option to set max proxy body size in the reverse proxy factory [ci skip]
This commit is contained in:
parent
ea3bb869e6
commit
5a3e9ea76c
2 changed files with 9 additions and 1 deletions
|
|
@ -18,6 +18,10 @@ variable "ingress_path" {
|
||||||
type = list(string)
|
type = list(string)
|
||||||
default = ["/"]
|
default = ["/"]
|
||||||
}
|
}
|
||||||
|
variable "max_body_size" {
|
||||||
|
type = string
|
||||||
|
default = "50m"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
resource "kubernetes_service" "proxied-service" {
|
resource "kubernetes_service" "proxied-service" {
|
||||||
|
|
@ -54,7 +58,7 @@ resource "kubernetes_ingress_v1" "proxied-ingress" {
|
||||||
# Do not do hairpinning
|
# Do not do hairpinning
|
||||||
"nginx.ingress.kubernetes.io/auth-url" : var.protected ? "http://oauth2.oauth2.svc.cluster.local/oauth2/auth" : null
|
"nginx.ingress.kubernetes.io/auth-url" : var.protected ? "http://oauth2.oauth2.svc.cluster.local/oauth2/auth" : null
|
||||||
# "nginx.ingress.kubernetes.io/auth-signin" : var.protected ? "http://oauth2.oauth2.svc.cluster.local/oauth2/start?rd=/redirect/$http_host$escaped_request_uri" : null
|
# "nginx.ingress.kubernetes.io/auth-signin" : var.protected ? "http://oauth2.oauth2.svc.cluster.local/oauth2/start?rd=/redirect/$http_host$escaped_request_uri" : null
|
||||||
"nginx.ingress.kubernetes.io/proxy-body-size" : "50m"
|
"nginx.ingress.kubernetes.io/proxy-body-size" : var.max_body_size
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ module "nas" {
|
||||||
port = 5001
|
port = 5001
|
||||||
tls_secret_name = var.tls_secret_name
|
tls_secret_name = var.tls_secret_name
|
||||||
backend_protocol = "HTTPS"
|
backend_protocol = "HTTPS"
|
||||||
|
max_body_size = "0m"
|
||||||
}
|
}
|
||||||
|
|
||||||
# https://files.viktorbarzin.me/
|
# https://files.viktorbarzin.me/
|
||||||
|
|
@ -45,6 +46,7 @@ module "nas-files" {
|
||||||
backend_protocol = "HTTPS"
|
backend_protocol = "HTTPS"
|
||||||
protected = false # allow anyone to download files
|
protected = false # allow anyone to download files
|
||||||
ingress_path = ["/sharing", "/scripts", "/webman", "/wfmlogindialog.js", "/fsdownload"]
|
ingress_path = ["/sharing", "/scripts", "/webman", "/wfmlogindialog.js", "/fsdownload"]
|
||||||
|
max_body_size = "0m"
|
||||||
}
|
}
|
||||||
|
|
||||||
# https://idrac.viktorbarzin.me/
|
# https://idrac.viktorbarzin.me/
|
||||||
|
|
@ -75,6 +77,7 @@ module "truenas" {
|
||||||
external_name = "truenas.viktorbarzin.lan"
|
external_name = "truenas.viktorbarzin.lan"
|
||||||
port = 80
|
port = 80
|
||||||
tls_secret_name = var.tls_secret_name
|
tls_secret_name = var.tls_secret_name
|
||||||
|
max_body_size = "0m"
|
||||||
}
|
}
|
||||||
|
|
||||||
# https://r730.viktorbarzin.me/
|
# https://r730.viktorbarzin.me/
|
||||||
|
|
@ -95,6 +98,7 @@ module "esxi" {
|
||||||
port = 443
|
port = 443
|
||||||
tls_secret_name = var.tls_secret_name
|
tls_secret_name = var.tls_secret_name
|
||||||
backend_protocol = "HTTPS"
|
backend_protocol = "HTTPS"
|
||||||
|
max_body_size = "0" # unlimited
|
||||||
}
|
}
|
||||||
|
|
||||||
# https://valchedrym.viktorbarzin.me/
|
# https://valchedrym.viktorbarzin.me/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue