add echo to ingress factory [ci skip]

This commit is contained in:
Viktor Barzin 2025-01-16 22:07:38 +00:00
parent 80d7c29946
commit c5d5056c89
No known key found for this signature in database
GPG key ID: 4056458DBDBF8863

View file

@ -73,38 +73,9 @@ resource "kubernetes_service" "echo" {
}
}
resource "kubernetes_ingress_v1" "echo" {
metadata {
name = "echo"
namespace = "echo"
annotations = {
"kubernetes.io/ingress.class" = "nginx"
# "nginx.ingress.kubernetes.io/auth-url" : "https://oauth2.viktorbarzin.me/oauth2/auth"
# "nginx.ingress.kubernetes.io/auth-signin" : "https://oauth2.viktorbarzin.me/oauth2/start?rd=/redirect/$http_host$escaped_request_uri"
}
}
spec {
tls {
hosts = ["echo.viktorbarzin.me"]
secret_name = var.tls_secret_name
}
rule {
host = "echo.viktorbarzin.me"
http {
path {
path = "/"
backend {
service {
name = "echo"
port {
number = 80
}
}
}
}
}
}
}
module "ingress" {
source = "../ingress_factory"
namespace = "echo"
name = "echo"
tls_secret_name = var.tls_secret_name
}