Skip to content

Commit 9a85e7f

Browse files
committed
Application Credential support
Signed-off-by: Veronika Fisarova <[email protected]>
1 parent 3064023 commit 9a85e7f

File tree

7 files changed

+285
-65
lines changed

7 files changed

+285
-65
lines changed

api/go.mod

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ go 1.24.4
44

55
require (
66
github.com/google/go-cmp v0.7.0
7-
github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20250922155301-057562fb7182
8-
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250922082314-c83d83092a04
9-
github.com/openstack-k8s-operators/lib-common/modules/storage v0.6.1-0.20250922082314-c83d83092a04
7+
github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20251002120642-c2d58c6fc03e
8+
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250929092825-4c2402451077
9+
github.com/openstack-k8s-operators/lib-common/modules/storage v0.6.1-0.20250929092825-4c2402451077
1010
k8s.io/api v0.31.13
1111
k8s.io/apimachinery v0.31.13
1212
sigs.k8s.io/controller-runtime v0.19.7
@@ -20,7 +20,7 @@ require (
2020
github.com/evanphx/json-patch v5.9.11+incompatible // indirect
2121
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
2222
github.com/fsnotify/fsnotify v1.9.0 // indirect
23-
github.com/fxamacker/cbor/v2 v2.8.0 // indirect
23+
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
2424
github.com/go-logr/logr v1.4.3 // indirect
2525
github.com/go-openapi/jsonpointer v0.21.1 // indirect
2626
github.com/go-openapi/jsonreference v0.21.0 // indirect
@@ -36,18 +36,16 @@ require (
3636
github.com/json-iterator/go v1.1.12 // indirect
3737
github.com/mailru/easyjson v0.9.0 // indirect
3838
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
39-
github.com/modern-go/reflect2 v1.0.2 // indirect
39+
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
4040
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
41-
github.com/onsi/ginkgo/v2 v2.25.3 // indirect
42-
github.com/onsi/gomega v1.38.2 // indirect
41+
github.com/onsi/ginkgo/v2 v2.26.0 // indirect
4342
github.com/openshift/api v3.9.0+incompatible // indirect
4443
github.com/pkg/errors v0.9.1 // indirect
4544
github.com/prometheus/client_golang v1.22.0 // indirect
4645
github.com/prometheus/client_model v0.6.2 // indirect
4746
github.com/prometheus/common v0.65.0 // indirect
4847
github.com/prometheus/procfs v0.16.1 // indirect
49-
github.com/rogpeppe/go-internal v1.13.1 // indirect
50-
github.com/spf13/pflag v1.0.6 // indirect
48+
github.com/spf13/pflag v1.0.7 // indirect
5149
github.com/x448/float16 v0.8.4 // indirect
5250
go.yaml.in/yaml/v2 v2.4.2 // indirect
5351
go.yaml.in/yaml/v3 v3.0.4 // indirect
@@ -65,12 +63,12 @@ require (
6563
k8s.io/apiextensions-apiserver v0.33.2 // indirect
6664
k8s.io/client-go v0.31.13 // indirect
6765
k8s.io/klog/v2 v2.130.1 // indirect
68-
k8s.io/kube-openapi v0.0.0-20250610211856-8b98d1ed966a // indirect
66+
k8s.io/kube-openapi v0.0.0-20250902184714-7fc278399c7f // indirect
6967
k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d // indirect
7068
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
7169
sigs.k8s.io/randfill v1.0.0 // indirect
7270
sigs.k8s.io/structured-merge-diff/v4 v4.7.0 // indirect
73-
sigs.k8s.io/yaml v1.5.0 // indirect
71+
sigs.k8s.io/yaml v1.6.0 // indirect
7472
)
7573

7674
// mschuppert: map to latest commit from release-4.18 tag
@@ -98,3 +96,5 @@ replace k8s.io/component-base => k8s.io/component-base v0.31.13 //allow-merging
9896
replace github.com/rabbitmq/cluster-operator/v2 => github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20250929174222-a0d328fa4dec //allow-merging
9997

10098
replace k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20250627150254-e9823e99808e //allow-merging
99+
100+
replace github.com/openstack-k8s-operators/keystone-operator/api => github.com/Deydra71/keystone-operator/api v0.0.0-20251014080018-27792b7a40a5

api/go.sum

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ github.com/evanphx/json-patch/v5 v5.9.11 h1:/8HVnzMq13/3x9TPvjG08wUGqBTmZBsCWzjT
1616
github.com/evanphx/json-patch/v5 v5.9.11/go.mod h1:3j+LviiESTElxA4p3EMKAB9HXj3/XEtnUf6OZxqIQTM=
1717
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
1818
github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
19-
github.com/fxamacker/cbor/v2 v2.8.0 h1:fFtUGXUzXPHTIUdne5+zzMPTfffl3RD5qYnkY40vtxU=
20-
github.com/fxamacker/cbor/v2 v2.8.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ=
19+
github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM=
20+
github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ=
2121
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
2222
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
2323
github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ=
@@ -69,22 +69,23 @@ github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUt
6969
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
7070
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
7171
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
72-
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
7372
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
73+
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8=
74+
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
7475
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
7576
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
76-
github.com/onsi/ginkgo/v2 v2.25.3 h1:Ty8+Yi/ayDAGtk4XxmmfUy4GabvM+MegeB4cDLRi6nw=
77-
github.com/onsi/ginkgo/v2 v2.25.3/go.mod h1:43uiyQC4Ed2tkOzLsEYm7hnrb7UJTWHYNsuy3bG/snE=
77+
github.com/onsi/ginkgo/v2 v2.26.0 h1:1J4Wut1IlYZNEAWIV3ALrT9NfiaGW2cDCJQSFQMs/gE=
78+
github.com/onsi/ginkgo/v2 v2.26.0/go.mod h1:qhEywmzWTBUY88kfO0BRvX4py7scov9yR+Az2oavUzw=
7879
github.com/onsi/gomega v1.38.2 h1:eZCjf2xjZAqe+LeWvKb5weQ+NcPwX84kqJ0cZNxok2A=
7980
github.com/onsi/gomega v1.38.2/go.mod h1:W2MJcYxRGV63b418Ai34Ud0hEdTVXq9NW9+Sx6uXf3k=
8081
github.com/openshift/api v0.0.0-20250711200046-c86d80652a9e h1:E1OdwSpqWuDPCedyUt0GEdoAE+r5TXy7YS21yNEo+2U=
8182
github.com/openshift/api v0.0.0-20250711200046-c86d80652a9e/go.mod h1:Shkl4HanLwDiiBzakv+con/aMGnVE2MAGvoKp5oyYUo=
82-
github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20250922155301-057562fb7182 h1:Ea+FZQOW0Eha1jorgSECFeqI9UrKz8TZlGnSM7X8Yf4=
83-
github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20250922155301-057562fb7182/go.mod h1:3Im8PFiRKPaOZpOuqYShJRN2O2pfjUuhDTUpW4KMHZw=
84-
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250922082314-c83d83092a04 h1:JqJd39rF8rD9KIHmOEFbHP8UyYgttfuouj+kAFNtymU=
85-
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250922082314-c83d83092a04/go.mod h1:SmKRclrynSSRCXSLOoWlETalJPvt62ObHsfW8iPvtDA=
86-
github.com/openstack-k8s-operators/lib-common/modules/storage v0.6.1-0.20250922082314-c83d83092a04 h1:j5P/ehO4bQ+VqNvqNiX7N/R8wnBweFy7MX685nh4mmY=
87-
github.com/openstack-k8s-operators/lib-common/modules/storage v0.6.1-0.20250922082314-c83d83092a04/go.mod h1:WbDAhyvX2UTyK9LzYZKjRvEGdn2fsQJHUo5l2J5q/vg=
83+
github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20251002120642-c2d58c6fc03e h1:5q47hHT53v0PnNj2pwHHQ1+ZWC3kQLu1jtulTUrJ2cE=
84+
github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20251002120642-c2d58c6fc03e/go.mod h1:LfqzznghLpo+b9jVgyvqUoOZMcc3Ff0gXSmLLtFsj9w=
85+
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250929092825-4c2402451077 h1:missBxDwEfOdkHVKd6zyCyaQjSObw9Ge1O4A7WU5EuM=
86+
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250929092825-4c2402451077/go.mod h1:CjsYQ/dUr4eUmBEvM3UFUxvYvl2bAhGfGflaD+N4fWA=
87+
github.com/openstack-k8s-operators/lib-common/modules/storage v0.6.1-0.20250929092825-4c2402451077 h1:9tpPDBV2RLXMDgt13ec8XR2OatFriItseqg+Oyvx9GA=
88+
github.com/openstack-k8s-operators/lib-common/modules/storage v0.6.1-0.20250929092825-4c2402451077/go.mod h1:JPQHkExlxeT6MU3DNJgXXJJG0NMQHlZwxxfbYRaP3eg=
8889
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
8990
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
9091
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
@@ -100,8 +101,8 @@ github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzM
100101
github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is=
101102
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
102103
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
103-
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
104-
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
104+
github.com/spf13/pflag v1.0.7 h1:vN6T9TfwStFPFM5XzjsvmzZkLuaLX+HS+0SeFLRgU6M=
105+
github.com/spf13/pflag v1.0.7/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
105106
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
106107
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
107108
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
@@ -129,6 +130,8 @@ golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 h1:1UoZQm6f0P/ZO0w1Ri+f+ifG/
129130
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67/go.mod h1:qj5a5QZpwLU2NLQudwIN5koi3beDhSAlJwa67PuM98c=
130131
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
131132
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
133+
golang.org/x/mod v0.27.0 h1:kb+q2PyFnEADO2IEF935ehFUXlWiNjJWtRNgBLSfbxQ=
134+
golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc=
132135
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
133136
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
134137
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
@@ -140,6 +143,8 @@ golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKl
140143
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
141144
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
142145
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
146+
golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
147+
golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
143148
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
144149
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
145150
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -200,5 +205,5 @@ sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxO
200205
sigs.k8s.io/structured-merge-diff/v4 v4.7.0 h1:qPeWmscJcXP0snki5IYF79Z8xrl8ETFxgMd7wez1XkI=
201206
sigs.k8s.io/structured-merge-diff/v4 v4.7.0/go.mod h1:dDy58f92j70zLsuZVuUX5Wp9vtxXpaZnkPGWeqDfCps=
202207
sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY=
203-
sigs.k8s.io/yaml v1.5.0 h1:M10b2U7aEUY6hRtU870n2VTPgR5RZiL/I6Lcc2F4NUQ=
204-
sigs.k8s.io/yaml v1.5.0/go.mod h1:wZs27Rbxoai4C0f8/9urLZtZtF3avA3gKvGyPdDqTO4=
208+
sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs=
209+
sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4=

controllers/glanceapi_controller.go

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,42 @@ func (r *GlanceAPIReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Man
378378
return nil
379379
}
380380

381+
// Application Credential secret watching function
382+
acSecretFn := func(_ context.Context, o client.Object) []reconcile.Request {
383+
name := o.GetName()
384+
ns := o.GetNamespace()
385+
result := []reconcile.Request{}
386+
387+
// Only handle Secret objects
388+
if _, isSecret := o.(*corev1.Secret); !isSecret {
389+
return nil
390+
}
391+
392+
// Check if this is a glance AC secret by name pattern (ac-glance-secret)
393+
expectedSecretName := keystonev1.GetACSecretName("glance")
394+
if name == expectedSecretName {
395+
// get all GlanceAPI CRs in this namespace
396+
glanceAPIs := &glancev1.GlanceAPIList{}
397+
listOpts := []client.ListOption{
398+
client.InNamespace(ns),
399+
}
400+
if err := r.List(context.Background(), glanceAPIs, listOpts...); err != nil {
401+
return nil
402+
}
403+
404+
// Enqueue reconcile for all glance API instances
405+
for _, cr := range glanceAPIs.Items {
406+
objKey := client.ObjectKey{
407+
Namespace: ns,
408+
Name: cr.Name,
409+
}
410+
result = append(result, reconcile.Request{NamespacedName: objKey})
411+
}
412+
}
413+
414+
return result
415+
}
416+
381417
return ctrl.NewControllerManagedBy(mgr).
382418
For(&glancev1.GlanceAPI{}).
383419
Owns(&keystonev1.KeystoneEndpoint{}).
@@ -393,6 +429,8 @@ func (r *GlanceAPIReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Man
393429
handler.EnqueueRequestsFromMapFunc(r.findObjectsForSrc),
394430
builder.WithPredicates(predicate.ResourceVersionChangedPredicate{}),
395431
).
432+
Watches(&corev1.Secret{},
433+
handler.EnqueueRequestsFromMapFunc(acSecretFn)).
396434
Watches(&memcachedv1.Memcached{},
397435
handler.EnqueueRequestsFromMapFunc(memcachedFn)).
398436
Watches(&topologyv1.Topology{},
@@ -709,6 +747,11 @@ func (r *GlanceAPIReconciler) reconcileNormal(
709747
instance.Status.Conditions.MarkTrue(condition.InputReadyCondition, condition.InputReadyMessage)
710748
// run check OpenStack secret - end
711749

750+
// Verify Application Credentials if available
751+
if res, err := keystonev1.VerifyApplicationCredentialsForService(ctx, r.Client, instance.Namespace, instance.APIName(), &configVars, glance.NormalDuration); err != nil || res.RequeueAfter > 0 {
752+
return res, err
753+
}
754+
712755
//
713756
// Check for required memcached used for caching
714757
//
@@ -1164,6 +1207,7 @@ func (r *GlanceAPIReconciler) generateServiceConfig(
11641207
memcached *memcachedv1.Memcached,
11651208
wsgi bool,
11661209
) error {
1210+
Log := r.GetLogger(ctx)
11671211
labels := labels.GetLabels(instance, labels.GetGroupLabel(glance.ServiceName), GetServiceLabels(instance))
11681212

11691213
db, err := mariadbv1.GetDatabaseByNameAndAccount(ctx, h, glance.DatabaseName, instance.Spec.DatabaseAccount, instance.Namespace)
@@ -1261,6 +1305,17 @@ func (r *GlanceAPIReconciler) generateServiceConfig(
12611305
"Wsgi": wsgi,
12621306
}
12631307

1308+
templateParameters["UseApplicationCredentials"] = false
1309+
// Try to get Application Credential for this service (via keystone api helper)
1310+
if acData, err := keystonev1.GetApplicationCredentialFromSecret(ctx, r.Client, instance.Namespace, glance.ServiceName); err != nil {
1311+
Log.Error(err, "Failed to get ApplicationCredential for service", "service", glance.ServiceName)
1312+
} else if acData != nil {
1313+
templateParameters["UseApplicationCredentials"] = true
1314+
templateParameters["ACID"] = acData.ID
1315+
templateParameters["ACSecret"] = acData.Secret
1316+
Log.Info("Using ApplicationCredentials auth", "service", glance.ServiceName)
1317+
}
1318+
12641319
// (OSPRH-18291)Only set EndpointID parameter when the Endpoint has been
12651320
// created and the associated ID is set in the keystoneapi CR. Because we
12661321
// have the Keystone CR, we get the Region parameter mirrored in its

go.mod

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ require (
77
github.com/google/uuid v1.6.0
88
github.com/gophercloud/gophercloud v1.14.1
99
github.com/k8snetworkplumbingwg/network-attachment-definition-client v1.7.7
10-
github.com/onsi/ginkgo/v2 v2.25.3
10+
github.com/onsi/ginkgo/v2 v2.26.0
1111
github.com/onsi/gomega v1.38.2
1212
github.com/openstack-k8s-operators/cinder-operator/api v0.6.1-0.20250916151837-4aab51f61506
1313
github.com/openstack-k8s-operators/glance-operator/api v0.0.0-00010101000000-000000000000
1414
github.com/openstack-k8s-operators/horizon-operator/api v0.6.1-0.20250911092040-f829125f6046
15-
github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20250922155301-057562fb7182
15+
github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20251002120642-c2d58c6fc03e
1616
github.com/openstack-k8s-operators/keystone-operator/api v0.6.1-0.20250916093250-82a76386143d
17-
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250922082314-c83d83092a04
18-
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.6.1-0.20250922082314-c83d83092a04
19-
github.com/openstack-k8s-operators/lib-common/modules/storage v0.6.1-0.20250922082314-c83d83092a04
20-
github.com/openstack-k8s-operators/lib-common/modules/test v0.6.1-0.20250922082314-c83d83092a04
17+
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250929092825-4c2402451077
18+
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.6.1-0.20250929092825-4c2402451077
19+
github.com/openstack-k8s-operators/lib-common/modules/storage v0.6.1-0.20250929092825-4c2402451077
20+
github.com/openstack-k8s-operators/lib-common/modules/test v0.6.1-0.20250929092825-4c2402451077
2121
github.com/openstack-k8s-operators/mariadb-operator/api v0.6.1-0.20250922154138-e032ee393bab
2222
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67
2323
gopkg.in/yaml.v3 v3.0.1
@@ -36,7 +36,7 @@ require (
3636
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
3737
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
3838
github.com/fsnotify/fsnotify v1.9.0 // indirect
39-
github.com/fxamacker/cbor/v2 v2.8.0 // indirect
39+
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
4040
github.com/go-logr/zapr v1.3.0 // indirect
4141
github.com/go-openapi/jsonpointer v0.21.1 // indirect
4242
github.com/go-openapi/jsonreference v0.21.0 // indirect
@@ -54,16 +54,16 @@ require (
5454
github.com/json-iterator/go v1.1.12 // indirect
5555
github.com/mailru/easyjson v0.9.0 // indirect
5656
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
57-
github.com/modern-go/reflect2 v1.0.2 // indirect
57+
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
5858
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
5959
github.com/openshift/api v3.9.0+incompatible // indirect
6060
github.com/pkg/errors v0.9.1 // indirect
6161
github.com/prometheus/client_golang v1.22.0 // indirect
6262
github.com/prometheus/client_model v0.6.2 // indirect
6363
github.com/prometheus/common v0.65.0 // indirect
6464
github.com/prometheus/procfs v0.16.1 // indirect
65-
github.com/rabbitmq/cluster-operator/v2 v2.9.0 // indirect
66-
github.com/spf13/pflag v1.0.6 // indirect
65+
github.com/rabbitmq/cluster-operator/v2 v2.16.0 // indirect
66+
github.com/spf13/pflag v1.0.7 // indirect
6767
github.com/x448/float16 v0.8.4 // indirect
6868
go.uber.org/automaxprocs v1.6.0 // indirect
6969
go.uber.org/multierr v1.11.0 // indirect
@@ -73,6 +73,7 @@ require (
7373
golang.org/x/mod v0.27.0 // indirect
7474
golang.org/x/net v0.43.0 // indirect
7575
golang.org/x/oauth2 v0.30.0 // indirect
76+
golang.org/x/sync v0.16.0 // indirect
7677
golang.org/x/sys v0.35.0 // indirect
7778
golang.org/x/term v0.34.0 // indirect
7879
golang.org/x/text v0.28.0 // indirect
@@ -83,11 +84,11 @@ require (
8384
gopkg.in/inf.v0 v0.9.1 // indirect
8485
k8s.io/apiextensions-apiserver v0.33.2 // indirect
8586
k8s.io/klog/v2 v2.130.1 // indirect
86-
k8s.io/kube-openapi v0.0.0-20250610211856-8b98d1ed966a // indirect
87+
k8s.io/kube-openapi v0.0.0-20250902184714-7fc278399c7f // indirect
8788
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
8889
sigs.k8s.io/randfill v1.0.0 // indirect
8990
sigs.k8s.io/structured-merge-diff/v4 v4.7.0 // indirect
90-
sigs.k8s.io/yaml v1.5.0 // indirect
91+
sigs.k8s.io/yaml v1.6.0 // indirect
9192
)
9293

9394
replace github.com/openstack-k8s-operators/glance-operator/api => ./api
@@ -117,3 +118,5 @@ replace k8s.io/component-base => k8s.io/component-base v0.31.13 //allow-merging
117118
replace github.com/rabbitmq/cluster-operator/v2 => github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20250929174222-a0d328fa4dec //allow-merging
118119

119120
replace k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20250627150254-e9823e99808e //allow-merging
121+
122+
replace github.com/openstack-k8s-operators/keystone-operator/api => github.com/Deydra71/keystone-operator/api v0.0.0-20251014080018-27792b7a40a5

0 commit comments

Comments
 (0)