add nomad login
This commit is contained in:
parent
478f9c4c8f
commit
f44e62fd1c
16
core.tf
16
core.tf
@ -15,6 +15,22 @@ module "traefik" {
|
||||
base_hostname = var.base_hostname
|
||||
}
|
||||
|
||||
module "nomad_login" {
|
||||
source = "./levant"
|
||||
|
||||
template_path = "service.nomad"
|
||||
variables = {
|
||||
name = "nomad-login"
|
||||
image = "iamthefij/nomad-vault-login"
|
||||
service_port = 5000
|
||||
ingress = true
|
||||
ingress_rule = "Host(`nomad.thefij.rocks`) && PathPrefix(`/login`)"
|
||||
env = jsonencode({
|
||||
VAULT_ADDR = "http://$${attr.unique.network.ip-address}:8200",
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
module "metrics" {
|
||||
source = "./metrics"
|
||||
}
|
||||
|
@ -110,6 +110,9 @@ job "[[.name]]" {
|
||||
[[ if default false .ingress -]]
|
||||
"traefik.enable=true",
|
||||
"traefik.http.routers.[[.name]].entryPoints=websecure",
|
||||
[[ if not (empty .ingress_rule) -]]
|
||||
"traefik.http.routers.[[.name]].rule=[[.ingress_rule]]",
|
||||
[[ end -]]
|
||||
[[ end -]]
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user