Skip to content

Commit

Permalink
Merge pull request #248 from bshephar/keystone-internal
Browse files Browse the repository at this point in the history
Use internal Keystone service
  • Loading branch information
openshift-merge-bot[bot] authored Nov 21, 2023
2 parents 413a8b4 + 452c4f7 commit 3e802c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions controllers/horizon_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ func (r *HorizonReconciler) Reconcile(ctx context.Context, req ctrl.Request) (re
r.Scheme,
GetLog(ctx),
)

if err != nil {
return ctrl.Result{}, err
}
Expand Down Expand Up @@ -608,7 +607,8 @@ func (r *HorizonReconciler) generateServiceConfigMaps(
if err != nil {
return err
}
keystonePublicURL, err := keystoneAPI.GetEndpoint(endpoint.EndpointPublic)

authURL, err := keystoneAPI.GetEndpoint(endpoint.EndpointInternal)
if err != nil {
return err
}
Expand All @@ -618,7 +618,7 @@ func (r *HorizonReconciler) generateServiceConfigMaps(
url := strings.TrimPrefix(instance.Status.Endpoint, "http://")

templateParameters := map[string]interface{}{
"keystoneURL": keystonePublicURL,
"keystoneURL": authURL,
"horizonEndpointUrl": url,
"memcachedServers": fmt.Sprintf("'%s'", memcachedServers),
}
Expand Down Expand Up @@ -668,7 +668,6 @@ func (r *HorizonReconciler) ensureHorizonSecret(
h *helper.Helper,
envVars *map[string]env.Setter,
) error {

Labels := labels.GetLabels(instance, labels.GetGroupLabel(horizon.ServiceName), map[string]string{})
//
// check if secret already exist
Expand All @@ -691,7 +690,6 @@ func (r *HorizonReconciler) ensureHorizonSecret(
}

err := oko_secret.EnsureSecrets(ctx, h, instance, tmpl, envVars)

if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/horizon_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ var _ = Describe("Horizon controller", func() {
Name: horizonName.Name + "-config-data",
})
Expect(cm.Data["local_settings.py"]).Should(
ContainSubstring("OPENSTACK_KEYSTONE_URL = \"http://keystone-public-openstack.testing/v3\""))
ContainSubstring("OPENSTACK_KEYSTONE_URL = \"http://keystone-internal.openstack.svc:5000/v3\""))
Expect(cm.Data["local_settings.py"]).Should(
ContainSubstring("'LOCATION': [ 'memcached-0.memcached:11211', 'memcached-1.memcached:11211', 'memcached-2.memcached:11211' ]"))
})
Expand Down

0 comments on commit 3e802c4

Please sign in to comment.