This commit is contained in:
2024-01-28 10:11:54 +01:00
parent ccfac82ad4
commit c1aac2424b
4 changed files with 6 additions and 6 deletions

View File

@@ -3,7 +3,7 @@ locals {
mongo-password = data.kubernetes_secret_v1.prj_mongo_secret.data["password"]
username = var.username==""?var.component==""?var.instance:var.component:var.username
db_name = var.db_name==""?var.component==""?var.instance:var.component:var.db_name
mongo-labels = merge(local.labels, {
mongo-labels = merge(var.labels, {
"app.kubernetes.io/component" = "mongo"
})
}

View File

@@ -1,6 +1,6 @@
output "host" {
value = "${var.app_slug}-redis.${var.namespace}.svc"
value = "${local.app_slug}-redis.${var.namespace}.svc"
}
output "url" {
value = "redis://${var.app_slug}-redis.${var.namespace}.svc:6379"
value = "redis://${local.app_slug}-redis.${var.namespace}.svc:6379"
}

View File

@@ -1,6 +1,6 @@
locals {
app_slug = (var.component == var.instance || var.component=="") ? var.instance : format("%s-%s", var.component, var.instance)
redis-labels = merge(local.labels, {
redis-labels = merge(var.labels, {
"app.kubernetes.io/component" = "redis"
})
cfg = merge({

View File

@@ -1,9 +1,9 @@
output "name" {
value = "${var.app_slug}"
value = "${local.app_slug}"
}
output "default_definition" {
value = {
"name" = "${var.app_slug}"
"name" = "${local.app_slug}"
"port" = {
"number" = var.ports[0]
}