From 01371d973eb48558178198e516ffd9736bc45102 Mon Sep 17 00:00:00 2001 From: "Victor M." Date: Tue, 2 Jan 2024 20:16:36 +0100 Subject: [PATCH] get keycloak public hostname --- .../providers/featureflags/localfeatureflags.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/controllers/cloud.redhat.com/providers/featureflags/localfeatureflags.go b/controllers/cloud.redhat.com/providers/featureflags/localfeatureflags.go index 81a881853..c80c19e8e 100644 --- a/controllers/cloud.redhat.com/providers/featureflags/localfeatureflags.go +++ b/controllers/cloud.redhat.com/providers/featureflags/localfeatureflags.go @@ -211,14 +211,9 @@ func (ff *localFeatureFlagsProvider) Provide(_ *crd.ClowdApp) error { func makeLocalFeatureFlags(cache *rc.ObjectCache, o obj.ClowdObject, objMap providers.ObjectMap, _ bool, nodePort bool) { nn := providers.GetNamespacedName(o, "featureflags") - - //keycloakName := providers.GetNamespacedName(o, "") - keycloakSecret := core.Secret{} - cache.Get(web.WebKeycloakSecret, &keycloakSecret) - dd := objMap[LocalFFDeployment].(*apps.Deployment) svc := objMap[LocalFFService].(*core.Service) - + environment := o.(*crd.ClowdEnvironment) labels := o.GetLabels() labels["env-app"] = nn.Name labels["service"] = "featureflags" @@ -242,7 +237,7 @@ func makeLocalFeatureFlags(cache *rc.ObjectCache, o obj.ClowdObject, objMap prov }, { Name: "KC_HOST", - Value: fmt.Sprintf("http://%s-%s.%s.svc:8080", o.GetClowdName(), "keycloak", o.GetClowdNamespace()), + Value: web.GetAuthHostname(environment.Status.Hostname), }, { Name: "KC_REALM",