From 30e5a7cd61dad1635a173ad11ed943cc7a723d6d Mon Sep 17 00:00:00 2001 From: Fabricio Aguiar Date: Wed, 23 Oct 2024 11:59:48 +0100 Subject: [PATCH] Get keystone service project https://github.com/openstack-k8s-operators/keystone-operator/blob/b36564988843e6f9c1d29328a7651826ccf744de/controllers/keystoneservice_controller.go#L498-L507 Signed-off-by: Fabricio Aguiar --- controllers/heat_controller.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/controllers/heat_controller.go b/controllers/heat_controller.go index 1d1cf438..bab798f3 100644 --- a/controllers/heat_controller.go +++ b/controllers/heat_controller.go @@ -1077,13 +1077,19 @@ func (r *HeatReconciler) ensureStackDomain( return ctrl.Result{}, err } + // Get service project + project, err := os.GetProject(r.Log, "service", "default") + if err != nil { + return ctrl.Result{}, err + } + // Create Heat user userID, err := os.CreateUser( r.Log, openstack.User{ Name: heat.StackDomainAdminUsername, Password: password, - ProjectID: "service", + ProjectID: project.ID, DomainID: domainID, }) if err != nil {