diff --git a/modules/kubernetes/ingress_factory/main.tf b/modules/kubernetes/ingress_factory/main.tf index b25eb465..9dc0e793 100644 --- a/modules/kubernetes/ingress_factory/main.tf +++ b/modules/kubernetes/ingress_factory/main.tf @@ -35,10 +35,6 @@ variable "max_body_size" { variable "extra_annotations" { default = {} } -variable "ssl_redirect" { - default = true - type = bool -} variable "allow_local_access_only" { default = false type = bool @@ -125,7 +121,9 @@ resource "kubernetes_ingress_v1" "proxied-ingress" { var.custom_content_security_policy != null ? "${var.namespace}-custom-csp-${var.name}@kubernetescrd" : null, "${var.namespace}-body-size-${var.name}@kubernetescrd", ], var.extra_middlewares))) - "traefik.ingress.kubernetes.io/router.entrypoints" = "websecure" + "traefik.ingress.kubernetes.io/router.entrypoints" = "websecure" + "traefik.ingress.kubernetes.io/service.serversscheme" = var.backend_protocol == "HTTPS" ? "https" : null + "traefik.ingress.kubernetes.io/service.serverstransport" = var.backend_protocol == "HTTPS" ? "traefik-insecure-skip-verify@kubernetescrd" : null }, var.extra_annotations) } diff --git a/stacks/frigate/main.tf b/stacks/frigate/main.tf index 71eb8a75..7c1f3211 100644 --- a/stacks/frigate/main.tf +++ b/stacks/frigate/main.tf @@ -277,7 +277,6 @@ module "ingress-internal" { service_name = "frigate" tls_secret_name = var.tls_secret_name allow_local_access_only = true - ssl_redirect = false extra_annotations = { "gethomepage.dev/enabled" = "false" } diff --git a/stacks/monitoring/modules/monitoring/idrac.tf b/stacks/monitoring/modules/monitoring/idrac.tf index e1720739..37187053 100644 --- a/stacks/monitoring/modules/monitoring/idrac.tf +++ b/stacks/monitoring/modules/monitoring/idrac.tf @@ -125,6 +125,5 @@ module "idrac-redfish-exporter-ingress" { root_domain = "viktorbarzin.lan" tls_secret_name = var.tls_secret_name allow_local_access_only = true - ssl_redirect = false port = 9090 } diff --git a/stacks/monitoring/modules/monitoring/snmp_exporter.tf b/stacks/monitoring/modules/monitoring/snmp_exporter.tf index 07eaf39a..64fd6bf4 100644 --- a/stacks/monitoring/modules/monitoring/snmp_exporter.tf +++ b/stacks/monitoring/modules/monitoring/snmp_exporter.tf @@ -125,6 +125,5 @@ module "snmp-exporter-ingress" { root_domain = "viktorbarzin.lan" tls_secret_name = var.tls_secret_name allow_local_access_only = true - ssl_redirect = false port = 9116 } diff --git a/stacks/nvidia/modules/nvidia/main.tf b/stacks/nvidia/modules/nvidia/main.tf index eb7cae52..9acde6f9 100644 --- a/stacks/nvidia/modules/nvidia/main.tf +++ b/stacks/nvidia/modules/nvidia/main.tf @@ -208,7 +208,6 @@ module "ingress" { root_domain = "viktorbarzin.lan" tls_secret_name = var.tls_secret_name allow_local_access_only = true - ssl_redirect = false } # resource "kubernetes_ingress_v1" "nvidia-exporter" { diff --git a/stacks/ollama/main.tf b/stacks/ollama/main.tf index 2186e5b0..09bb9250 100644 --- a/stacks/ollama/main.tf +++ b/stacks/ollama/main.tf @@ -194,7 +194,6 @@ module "ollama-ingress" { root_domain = "viktorbarzin.lan" tls_secret_name = var.tls_secret_name allow_local_access_only = true - ssl_redirect = false port = 11434 extra_annotations = { "gethomepage.dev/enabled" = "false" @@ -245,7 +244,6 @@ module "ollama-api-ingress" { service_name = "ollama" root_domain = "viktorbarzin.me" tls_secret_name = var.tls_secret_name - ssl_redirect = true port = 11434 extra_annotations = { "traefik.ingress.kubernetes.io/router.middlewares" = "ollama-ollama-api-basic-auth@kubernetescrd,traefik-rate-limit@kubernetescrd,traefik-crowdsec@kubernetescrd" diff --git a/stacks/platform/modules/monitoring/idrac.tf b/stacks/platform/modules/monitoring/idrac.tf index e43aee0b..9c5c21a6 100644 --- a/stacks/platform/modules/monitoring/idrac.tf +++ b/stacks/platform/modules/monitoring/idrac.tf @@ -124,6 +124,5 @@ module "idrac-redfish-exporter-ingress" { root_domain = "viktorbarzin.lan" tls_secret_name = var.tls_secret_name allow_local_access_only = true - ssl_redirect = false port = 9090 } diff --git a/stacks/platform/modules/monitoring/snmp_exporter.tf b/stacks/platform/modules/monitoring/snmp_exporter.tf index 07eaf39a..64fd6bf4 100644 --- a/stacks/platform/modules/monitoring/snmp_exporter.tf +++ b/stacks/platform/modules/monitoring/snmp_exporter.tf @@ -125,6 +125,5 @@ module "snmp-exporter-ingress" { root_domain = "viktorbarzin.lan" tls_secret_name = var.tls_secret_name allow_local_access_only = true - ssl_redirect = false port = 9116 } diff --git a/stacks/platform/modules/nvidia/main.tf b/stacks/platform/modules/nvidia/main.tf index f23226a2..8ae98540 100644 --- a/stacks/platform/modules/nvidia/main.tf +++ b/stacks/platform/modules/nvidia/main.tf @@ -182,7 +182,6 @@ module "ingress" { root_domain = "viktorbarzin.lan" tls_secret_name = var.tls_secret_name allow_local_access_only = true - ssl_redirect = false } # resource "kubernetes_ingress_v1" "nvidia-exporter" {