From f445b3d05655f91592761be0af55879f0abeb66f Mon Sep 17 00:00:00 2001 From: Guy Margalit Date: Sun, 29 Sep 2024 16:13:21 +0300 Subject: [PATCH] Fix #432 POSTGRES_HOST use service url with namespace --- pkg/system/phase2_creating.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/system/phase2_creating.go b/pkg/system/phase2_creating.go index 2c770d61e..b94f0626c 100644 --- a/pkg/system/phase2_creating.go +++ b/pkg/system/phase2_creating.go @@ -361,7 +361,7 @@ func (r *Reconciler) setDesiredCoreEnv(c *corev1.Container) { case "POSTGRES_HOST": if r.NooBaa.Spec.ExternalPgSecret == nil { - c.Env[j].Value = r.NooBaaPostgresDB.Name + "-0." + r.NooBaaPostgresDB.Spec.ServiceName + c.Env[j].Value = r.NooBaaPostgresDB.Name + "-0." + r.NooBaaPostgresDB.Spec.ServiceName + "." + r.NooBaaPostgresDB.Namespace + ".svc" } case "DB_TYPE":