From bd2d151ebd21e8c0fdcd87f9d8f31675fbde7f55 Mon Sep 17 00:00:00 2001 From: "pierre.geeraert" Date: Tue, 13 Oct 2026 14:45:50 +0100 Subject: [PATCH] disable reverse proxy and add extra site --- core/services.tf | 18 ++++++++- core/variables.auto.tfvars | 81 +++++++++++--------------------------- 2 files changed, 39 insertions(+), 60 deletions(-) diff --git a/core/services.tf b/core/services.tf index 800648b..5f898d5 100644 --- a/core/services.tf +++ b/core/services.tf @@ -14,7 +14,7 @@ resource "kubernetes_ingress_v1" "automatic_ingress" { ingress_class_name = "traefik" # Dynamic TLS configuration for cert-manager tls { - hosts = [join(".", [coalesce(each.value.domain_name, each.key), "geeraert.eu"])] + hosts = [join(".", [coalesce(each.value.domain_name, each.key), "geeraert.eu"]),join(".", [coalesce(each.value.domain_name, each.key), "tryton.geeraert.eu"])] secret_name = "${each.key}-tls-secret" # cert-manager will create and manage this secret automatically } @@ -34,6 +34,22 @@ resource "kubernetes_ingress_v1" "automatic_ingress" { } } } + rule { + host = join(".", [coalesce(each.value.domain_name, each.key), "tryton.geeraert.eu"]) + http { + path { + path = "/" + backend { + service { + name = "${each.key}-svc" + port { + number = each.value.service_port[0] #selecting the first of the list + } + } + } + } + } + } } } diff --git a/core/variables.auto.tfvars b/core/variables.auto.tfvars index 1bcee97..a2264f7 100644 --- a/core/variables.auto.tfvars +++ b/core/variables.auto.tfvars @@ -1,42 +1,33 @@ kubernetes = { - reverse-proxy = { - enabled = false + echo = { + #enabled = false #docker = true - image = "nginx:latest" - service_port = [80, 443] - service_type = "NodePort" + image = "ealen/echo-server:latest" + service_port = [4580] external_port = true + service_type = "NodePort" + #command = ["-text=Hello authenticated world!"] pvc = { - sites-terraform = { - #requires to run the reverse proxy terraform with the kubernetes enabled - mount_path = "/etc/nginx/conf.d/" - host_path = "/data/kubernetes/reverse-proxy/reverse-proxy-sites" - #config_map = sites-terraform + echo-config = { + mount_path = "/app/configs" } - - reverse-proxy-log = { - name = "reverse-proxy-log" - mount_path = "/var/log/nginx/" - host_path = "/data/kubernetes/reverse-proxy/reverse-proxy-log" - - } - - reverse-proxy-ssl = { - name = "reverse-proxy-ssl" - mount_path = "/etc/nginx/ssl/" - host_path = "/data/kubernetes/reverse-proxy/reverse-proxy-ssl" - - } - nginx-configfile = { - name = "nginx-configfile" - mount_path = "/etc/nginx/nginx.conf" - host_path = "/data/kubernetes/reverse-proxy/reverse-proxy-configfile/nginx.conf" - + echo-testing = { + mount_path = "/app/test" } } + environment = { + PORT = { + value = 4580 + } + PAPERLESS_REDIS = { + value = "redis://paperless-redis-svc:6379" + } + database = { + value = "datgg" + } + } + } - - gitea = { #enabled = false #docker = true @@ -102,35 +93,7 @@ kubernetes = { } - echo = { - #enabled = false - #docker = true - image = "ealen/echo-server:latest" - service_port = [4580] - external_port = true - service_type = "NodePort" - #command = ["-text=Hello authenticated world!"] - pvc = { - echo-config = { - mount_path = "/app/configs" - } - echo-testing = { - mount_path = "/app/test" - } - } - environment = { - PORT = { - value = 4580 - } - PAPERLESS_REDIS = { - value = "redis://paperless-redis-svc:6379" - } - database = { - value = "datgg" - } - } - } bitwarden-admin = {