Skip to content

Commit

Permalink
Pass default domain ID keystoneservice project/service user
Browse files Browse the repository at this point in the history
With [1] the domain ID can be passed to project and user resurces.
For now lets just pass in the default domain ID.

[1]] ttps://github.com/openstack-k8s-operators/lib-common/pull/314
  • Loading branch information
stuggi committed Aug 2, 2023
1 parent 3a2ad8e commit 7ea3a0a
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 13 deletions.
4 changes: 2 additions & 2 deletions api/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ require (
// must consistent within modules and service operators
replace github.com/openshift/api => github.com/openshift/api v0.0.0-20230414143018-3367bc7e6ac7 //allow-merging

replace github.com/openstack-k8s-operators/lib-common/modules/common => github.com/stuggi/lib-common/modules/common v0.0.0-20230801084758-6169f85dea1d
replace github.com/openstack-k8s-operators/lib-common/modules/common => github.com/stuggi/lib-common/modules/common v0.0.0-20230802080814-d622f3777836

//replace github.com/openstack-k8s-operators/lib-common/modules/common => /home/mschuppe/src/github.com/openstack-k8s-operators/lib-common/modules/common

replace github.com/openstack-k8s-operators/lib-common/modules/openstack => github.com/stuggi/lib-common/modules/openstack v0.0.0-20230801084758-6169f85dea1d
replace github.com/openstack-k8s-operators/lib-common/modules/openstack => github.com/stuggi/lib-common/modules/openstack v0.0.0-20230802080814-d622f3777836
8 changes: 4 additions & 4 deletions api/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,10 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stuggi/lib-common/modules/common v0.0.0-20230801084758-6169f85dea1d h1:7yXrIPpHM0hYy6YQxbv6UHO7GUm36QE/DW2Hg4abSv4=
github.com/stuggi/lib-common/modules/common v0.0.0-20230801084758-6169f85dea1d/go.mod h1:2fZFojsJsTA4MfGy50JEwbXaIP7Hr7h7x8hbhlMBedY=
github.com/stuggi/lib-common/modules/openstack v0.0.0-20230801084758-6169f85dea1d h1:scLr9WuF+HF0OuADtXPcR0afzIjD2M8YxtdxiXcds5Q=
github.com/stuggi/lib-common/modules/openstack v0.0.0-20230801084758-6169f85dea1d/go.mod h1:xe/pl0p06/pdhDWCplbMaW21Ggz34zWZBLDOTGXJpzI=
github.com/stuggi/lib-common/modules/common v0.0.0-20230802080814-d622f3777836 h1:j9Xo7v+Zuv3Pb89pFVOmVMJoPvtXH0WpvVRZChiGBlM=
github.com/stuggi/lib-common/modules/common v0.0.0-20230802080814-d622f3777836/go.mod h1:2fZFojsJsTA4MfGy50JEwbXaIP7Hr7h7x8hbhlMBedY=
github.com/stuggi/lib-common/modules/openstack v0.0.0-20230802080814-d622f3777836 h1:U3MiUBQ0EuJibEtBg/8/CL5pPIulSmTHh3+lbAKw6Eg=
github.com/stuggi/lib-common/modules/openstack v0.0.0-20230802080814-d622f3777836/go.mod h1:xe/pl0p06/pdhDWCplbMaW21Ggz34zWZBLDOTGXJpzI=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
Expand Down
6 changes: 5 additions & 1 deletion controllers/keystoneservice_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,9 @@ func (r *KeystoneServiceReconciler) reconcileDelete(
// Delete User
err := os.DeleteUser(
l,
instance.Spec.ServiceUser)
instance.Spec.ServiceUser,
"default",
)
if err != nil {
return ctrl.Result{}, err
}
Expand Down Expand Up @@ -456,6 +458,7 @@ func (r *KeystoneServiceReconciler) reconcileUser(
openstack.Project{
Name: "service",
Description: "service",
DomainID: "default",
})
if err != nil {
return ctrl.Result{}, err
Expand All @@ -470,6 +473,7 @@ func (r *KeystoneServiceReconciler) reconcileUser(
Name: instance.Spec.ServiceUser,
Password: password,
ProjectID: serviceProjectID,
DomainID: "default",
})
if err != nil {
return ctrl.Result{}, err
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,6 @@ replace github.com/openshift/api => github.com/openshift/api v0.0.0-202304141430

//replace github.com/openstack-k8s-operators/lib-common/modules/common => /home/mschuppe/src/github.com/openstack-k8s-operators/lib-common/modules/common

replace github.com/openstack-k8s-operators/lib-common/modules/common => github.com/stuggi/lib-common/modules/common v0.0.0-20230801084758-6169f85dea1d
replace github.com/openstack-k8s-operators/lib-common/modules/common => github.com/stuggi/lib-common/modules/common v0.0.0-20230802080814-d622f3777836

replace github.com/openstack-k8s-operators/lib-common/modules/openstack => github.com/stuggi/lib-common/modules/openstack v0.0.0-20230801084758-6169f85dea1d
replace github.com/openstack-k8s-operators/lib-common/modules/openstack => github.com/stuggi/lib-common/modules/openstack v0.0.0-20230802080814-d622f3777836
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,10 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stuggi/lib-common/modules/common v0.0.0-20230801084758-6169f85dea1d h1:7yXrIPpHM0hYy6YQxbv6UHO7GUm36QE/DW2Hg4abSv4=
github.com/stuggi/lib-common/modules/common v0.0.0-20230801084758-6169f85dea1d/go.mod h1:2fZFojsJsTA4MfGy50JEwbXaIP7Hr7h7x8hbhlMBedY=
github.com/stuggi/lib-common/modules/openstack v0.0.0-20230801084758-6169f85dea1d h1:scLr9WuF+HF0OuADtXPcR0afzIjD2M8YxtdxiXcds5Q=
github.com/stuggi/lib-common/modules/openstack v0.0.0-20230801084758-6169f85dea1d/go.mod h1:xe/pl0p06/pdhDWCplbMaW21Ggz34zWZBLDOTGXJpzI=
github.com/stuggi/lib-common/modules/common v0.0.0-20230802080814-d622f3777836 h1:j9Xo7v+Zuv3Pb89pFVOmVMJoPvtXH0WpvVRZChiGBlM=
github.com/stuggi/lib-common/modules/common v0.0.0-20230802080814-d622f3777836/go.mod h1:2fZFojsJsTA4MfGy50JEwbXaIP7Hr7h7x8hbhlMBedY=
github.com/stuggi/lib-common/modules/openstack v0.0.0-20230802080814-d622f3777836 h1:U3MiUBQ0EuJibEtBg/8/CL5pPIulSmTHh3+lbAKw6Eg=
github.com/stuggi/lib-common/modules/openstack v0.0.0-20230802080814-d622f3777836/go.mod h1:xe/pl0p06/pdhDWCplbMaW21Ggz34zWZBLDOTGXJpzI=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
Expand Down

0 comments on commit 7ea3a0a

Please sign in to comment.