use ingress factory for all hosted ingresses [ci skip]

This commit is contained in:
Viktor Barzin 2025-01-14 22:53:04 +00:00
parent 8713946352
commit d0e68769e7
No known key found for this signature in database
GPG key ID: 4056458DBDBF8863
41 changed files with 392 additions and 1628 deletions

View file

@ -83,37 +83,3 @@ resource "kubernetes_service" "cloudflared" {
}
}
resource "kubernetes_ingress_v1" "cloudflared" {
metadata {
name = "cloudflared"
namespace = "cloudflared"
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 = ["cloudflared.viktorbarzin.me"]
secret_name = var.tls_secret_name
}
rule {
host = "cloudflared.viktorbarzin.me"
http {
path {
path = "/"
backend {
service {
name = "cloudflared"
port {
number = 80
}
}
}
}
}
}
}
}