74 lines
1.9 KiB
HCL
74 lines
1.9 KiB
HCL
locals {
|
|
dns-name = "${var.sub-domain}.${var.domain-name}"
|
|
dns-names = [local.dns-name]
|
|
app-name = var.component == var.instance ? var.instance : format("%s-%s", var.component, var.instance)
|
|
icon = "logo192.png"
|
|
request_headers = {
|
|
"Content-Type" = "application/json"
|
|
Authorization = "Bearer ${data.kubernetes_secret_v1.authentik.data["AUTHENTIK_BOOTSTRAP_TOKEN"]}"
|
|
}
|
|
service = {
|
|
"name" = "gitea-http"
|
|
"port" = {
|
|
"number" = 3000
|
|
}
|
|
}
|
|
}
|
|
|
|
# module "service" {
|
|
# source = "/dist/modules/service"
|
|
# component = var.component
|
|
# instance = var.instance
|
|
# namespace = var.namespace
|
|
# labels = local.common-labels
|
|
# target = "http"
|
|
# port = local.service.port.number
|
|
# providers = {
|
|
# kubectl = kubectl
|
|
# }
|
|
# }
|
|
|
|
module "ingress" {
|
|
source = "/dist/modules/ingress"
|
|
component = ""
|
|
instance = var.instance
|
|
namespace = var.namespace
|
|
issuer = var.issuer
|
|
ingress-class = var.ingress-class
|
|
labels = local.common-labels
|
|
dns-names = local.dns-names
|
|
middlewares = []
|
|
service = local.service
|
|
providers = {
|
|
kubectl = kubectl
|
|
}
|
|
}
|
|
|
|
module "application" {
|
|
source = "/dist/modules/application"
|
|
component = var.component
|
|
instance = var.instance
|
|
app-group = var.app-group
|
|
dns-name = local.dns-name
|
|
icon = local.icon
|
|
protocol_provider = module.oauth2.provider-id
|
|
providers = {
|
|
authentik = authentik
|
|
}
|
|
}
|
|
|
|
module "oauth2" {
|
|
source = "/dist/modules/oauth2"
|
|
component = var.component
|
|
instance = var.instance
|
|
namespace = var.namespace
|
|
labels = local.common-labels
|
|
dns-name = local.dns-name
|
|
redirect-path = ""
|
|
providers = {
|
|
kubernetes = kubernetes
|
|
kubectl = kubectl
|
|
authentik = authentik
|
|
}
|
|
}
|