Skip to content

Commit 34547a1

Browse files
committed
Application Credential support
Signed-off-by: Veronika Fisarova <vfisarov@redhat.com>
1 parent 764105e commit 34547a1

34 files changed

+608
-73
lines changed

api/bases/nova.openstack.org_nova.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,16 @@ spec:
371371
description: APITimeout for Route and Apache
372372
minimum: 10
373373
type: integer
374+
auth:
375+
description: Auth - Parameters related to authentication (shared by
376+
all Nova services)
377+
properties:
378+
applicationCredentialSecret:
379+
description: |-
380+
ApplicationCredentialSecret - the name of the k8s Secret that contains the
381+
application credential data used for authentication
382+
type: string
383+
type: object
374384
cellTemplates:
375385
additionalProperties:
376386
description: |-

api/bases/nova.openstack.org_novacells.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ spec:
5555
description: APITimeout for Route and Apache
5656
minimum: 10
5757
type: integer
58+
auth:
59+
description: Auth - Parameters related to authentication
60+
properties:
61+
applicationCredentialSecret:
62+
description: |-
63+
ApplicationCredentialSecret - the name of the k8s Secret that contains the
64+
application credential data used for authentication
65+
type: string
66+
type: object
5867
cellDatabaseAccount:
5968
default: nova
6069
description: CellDatabaseAccount - MariaDBAccount to use when accessing

api/bases/nova.openstack.org_novacomputes.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,15 @@ spec:
5252
spec:
5353
description: NovaComputeSpec defines the desired state of NovaCompute
5454
properties:
55+
auth:
56+
description: Auth - Parameters related to authentication
57+
properties:
58+
applicationCredentialSecret:
59+
description: |-
60+
ApplicationCredentialSecret - the name of the k8s Secret that contains the
61+
application credential data used for authentication
62+
type: string
63+
type: object
5564
cellName:
5665
description: CellName is the name of the Nova Cell this NovaCompute
5766
belongs to.

api/bases/nova.openstack.org_novaconductors.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,15 @@ spec:
6363
provided then up-calls will be disabled. This filed is Required for
6464
cell0.
6565
type: string
66+
auth:
67+
description: Auth - Parameters related to authentication
68+
properties:
69+
applicationCredentialSecret:
70+
description: |-
71+
ApplicationCredentialSecret - the name of the k8s Secret that contains the
72+
application credential data used for authentication
73+
type: string
74+
type: object
6675
cellDatabaseAccount:
6776
default: nova
6877
description: CellDatabaseAccount - MariaDBAccount to use when accessing

api/bases/nova.openstack.org_novanovncproxies.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,15 @@ spec:
5252
spec:
5353
description: NovaNoVNCProxySpec defines the desired state of NovaNoVNCProxy
5454
properties:
55+
auth:
56+
description: Auth - Parameters related to authentication
57+
properties:
58+
applicationCredentialSecret:
59+
description: |-
60+
ApplicationCredentialSecret - the name of the k8s Secret that contains the
61+
application credential data used for authentication
62+
type: string
63+
type: object
5564
cellDatabaseAccount:
5665
default: nova
5766
description: CellDatabaseAccount - MariaDBAccount to use when accessing

api/go.mod

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ 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.20251030184102-82d2cbaafd35
8-
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20251027074416-ab5c045dbe00
7+
github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20251110170511-c2d4a351a7c3
8+
github.com/openstack-k8s-operators/keystone-operator/api v0.6.1-0.20251027074845-ed8154b20ad1
9+
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20251103072528-9eb684fef4ef
910
github.com/robfig/cron/v3 v3.0.1
10-
k8s.io/api v0.31.13
11-
k8s.io/apimachinery v0.31.13
11+
k8s.io/api v0.31.14
12+
k8s.io/apimachinery v0.31.14
1213
k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d
1314
sigs.k8s.io/controller-runtime v0.19.7
1415
)
@@ -18,7 +19,6 @@ require (
1819
github.com/cespare/xxhash/v2 v2.3.0 // indirect
1920
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
2021
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
21-
github.com/evanphx/json-patch v5.9.11+incompatible // indirect
2222
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
2323
github.com/fsnotify/fsnotify v1.9.0 // indirect
2424
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
@@ -32,36 +32,39 @@ require (
3232
github.com/google/gnostic-models v0.7.0 // indirect
3333
github.com/google/gofuzz v1.2.0 // indirect
3434
github.com/google/uuid v1.6.0 // indirect
35+
github.com/gophercloud/gophercloud/v2 v2.8.0 // indirect
3536
github.com/imdario/mergo v0.3.16 // indirect
3637
github.com/josharian/intern v1.0.0 // indirect
3738
github.com/json-iterator/go v1.1.12 // indirect
3839
github.com/mailru/easyjson v0.9.0 // indirect
3940
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
4041
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
4142
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
43+
github.com/openshift/api v3.9.0+incompatible // indirect
44+
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.6.1-0.20251103072528-9eb684fef4ef // indirect
45+
github.com/openstack-k8s-operators/lib-common/modules/storage v0.6.1-0.20251103072528-9eb684fef4ef // indirect
4246
github.com/pkg/errors v0.9.1 // indirect
4347
github.com/prometheus/client_golang v1.22.0 // indirect
4448
github.com/prometheus/client_model v0.6.2 // indirect
4549
github.com/prometheus/common v0.65.0 // indirect
4650
github.com/prometheus/procfs v0.16.1 // indirect
47-
github.com/rogpeppe/go-internal v1.13.1 // indirect
4851
github.com/spf13/pflag v1.0.7 // indirect
4952
github.com/x448/float16 v0.8.4 // indirect
5053
go.yaml.in/yaml/v2 v2.4.2 // indirect
5154
go.yaml.in/yaml/v3 v3.0.4 // indirect
5255
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 // indirect
5356
golang.org/x/net v0.43.0 // indirect
5457
golang.org/x/oauth2 v0.30.0 // indirect
55-
golang.org/x/sys v0.35.0 // indirect
56-
golang.org/x/term v0.34.0 // indirect
57-
golang.org/x/text v0.28.0 // indirect
58+
golang.org/x/sys v0.36.0 // indirect
59+
golang.org/x/term v0.35.0 // indirect
60+
golang.org/x/text v0.29.0 // indirect
5861
golang.org/x/time v0.12.0 // indirect
5962
gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect
6063
google.golang.org/protobuf v1.36.7 // indirect
6164
gopkg.in/inf.v0 v0.9.1 // indirect
6265
gopkg.in/yaml.v3 v3.0.1 // indirect
6366
k8s.io/apiextensions-apiserver v0.33.2 // indirect
64-
k8s.io/client-go v0.31.13 // indirect
67+
k8s.io/client-go v0.31.14 // indirect
6568
k8s.io/klog/v2 v2.130.1 // indirect
6669
k8s.io/kube-openapi v0.0.0-20250902184714-7fc278399c7f // indirect
6770
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
@@ -95,3 +98,5 @@ replace k8s.io/component-base => k8s.io/component-base v0.31.13 //allow-merging
9598
replace github.com/rabbitmq/cluster-operator/v2 => github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20250929174222-a0d328fa4dec //allow-merging
9699

97100
replace k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20250627150254-e9823e99808e //allow-merging
101+
102+
replace github.com/openstack-k8s-operators/keystone-operator/api => github.com/Deydra71/keystone-operator/api v0.0.0-20251211085602-3e1a3e022c81

api/go.sum

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
github.com/Deydra71/keystone-operator/api v0.0.0-20251211085602-3e1a3e022c81 h1:plax+NFgJJL1SrERyXAnf3jOHRhLTtBlJ2oc7d84EoU=
2+
github.com/Deydra71/keystone-operator/api v0.0.0-20251211085602-3e1a3e022c81/go.mod h1:b98Jl8eyUw8V07l9YiuQnoMlnWC748oV8IhXH15NCC4=
13
github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0=
24
github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
35
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
@@ -48,6 +50,8 @@ github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J
4850
github.com/google/pprof v0.0.0-20250403155104-27863c87afa6/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA=
4951
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
5052
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
53+
github.com/gophercloud/gophercloud/v2 v2.8.0 h1:of2+8tT6+FbEYHfYC8GBu8TXJNsXYSNm9KuvpX7Neqo=
54+
github.com/gophercloud/gophercloud/v2 v2.8.0/go.mod h1:Ki/ILhYZr/5EPebrPL9Ej+tUg4lqx71/YH2JWVeU+Qk=
5155
github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4=
5256
github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY=
5357
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
@@ -74,14 +78,20 @@ github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFd
7478
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
7579
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
7680
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
77-
github.com/onsi/ginkgo/v2 v2.27.1 h1:0LJC8MpUSQnfnp4n/3W3GdlmJP3ENGF0ZPzjQGLPP7s=
78-
github.com/onsi/ginkgo/v2 v2.27.1/go.mod h1:wmy3vCqiBjirARfVhAqFpYt8uvX0yaFe+GudAqqcCqA=
81+
github.com/onsi/ginkgo/v2 v2.27.2 h1:LzwLj0b89qtIy6SSASkzlNvX6WktqurSHwkk2ipF/Ns=
82+
github.com/onsi/ginkgo/v2 v2.27.2/go.mod h1:ArE1D/XhNXBXCBkKOLkbsb2c81dQHCRcF5zwn/ykDRo=
7983
github.com/onsi/gomega v1.38.2 h1:eZCjf2xjZAqe+LeWvKb5weQ+NcPwX84kqJ0cZNxok2A=
8084
github.com/onsi/gomega v1.38.2/go.mod h1:W2MJcYxRGV63b418Ai34Ud0hEdTVXq9NW9+Sx6uXf3k=
81-
github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20251030184102-82d2cbaafd35 h1:QFFGu93A+XCvDUxZIgfBE4gB5hEdVQAIw+E8dF1kP/E=
82-
github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20251030184102-82d2cbaafd35/go.mod h1:qq8BCRxTEmLRriUsQ4HeDUzqltWg32MQPDTMhgbBGK4=
83-
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20251027074416-ab5c045dbe00 h1:Xih6tYYqiDVllo4fDGHqTPL+M2biO5YLOUmbiTqrW/I=
84-
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20251027074416-ab5c045dbe00/go.mod h1:PMoNILOdQ1Ij7DyrKgljN6RAiq8pFM2AGsUb6mcxe98=
85+
github.com/openshift/api v0.0.0-20250711200046-c86d80652a9e h1:E1OdwSpqWuDPCedyUt0GEdoAE+r5TXy7YS21yNEo+2U=
86+
github.com/openshift/api v0.0.0-20250711200046-c86d80652a9e/go.mod h1:Shkl4HanLwDiiBzakv+con/aMGnVE2MAGvoKp5oyYUo=
87+
github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20251110170511-c2d4a351a7c3 h1:gKazSLpq0Ytn4OLzNtSKQpLswAdki8u8mXZgpJy83bE=
88+
github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20251110170511-c2d4a351a7c3/go.mod h1:Y9LqOS1wYhn7RT4jFknINdWa+ziYEIOU1jLNxkxiCsw=
89+
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20251103072528-9eb684fef4ef h1:1j7kk+D4ZdIXm6C/IwEjuTzIuvWUytxO39E/x94JY7k=
90+
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20251103072528-9eb684fef4ef/go.mod h1:kUT/SyuxZiOcX8ZuvpFN3PaQa2V8uQon8YwY+1RoQWM=
91+
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.6.1-0.20251103072528-9eb684fef4ef h1:Ql4G7sRHpqWFGwXypN7MorDGUWv4jz5n34ayzVt3R9E=
92+
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.6.1-0.20251103072528-9eb684fef4ef/go.mod h1:yf13jWb60XV26eA7A8o86ZCXNWBLNK9dPkTSWFaTPCw=
93+
github.com/openstack-k8s-operators/lib-common/modules/storage v0.6.1-0.20251103072528-9eb684fef4ef h1:VMwP0988m1VCjpVn+MxHt7i3B0OuBhQnM5akKt4taVA=
94+
github.com/openstack-k8s-operators/lib-common/modules/storage v0.6.1-0.20251103072528-9eb684fef4ef/go.mod h1:jl+SNs7K7XBx5jVbUJwWV0NRDfM8LyeV4AsGAroP8XA=
8595
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
8696
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
8797
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
@@ -109,14 +119,12 @@ github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
109119
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
110120
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
111121
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
112-
go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs=
113-
go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8=
114122
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
115123
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
116124
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
117125
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
118-
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
119-
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
126+
go.uber.org/zap v1.27.1 h1:08RqriUEv8+ArZRYSTXy1LeBScaMpVSTBhCeaZYfMYc=
127+
go.uber.org/zap v1.27.1/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
120128
go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI=
121129
go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU=
122130
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
@@ -141,19 +149,19 @@ golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKl
141149
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
142150
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
143151
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
144-
golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
145-
golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
152+
golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug=
153+
golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
146154
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
147155
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
148156
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
149-
golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=
150-
golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
151-
golang.org/x/term v0.34.0 h1:O/2T7POpk0ZZ7MAzMeWFSg6S5IpWd/RXDlM9hgM3DR4=
152-
golang.org/x/term v0.34.0/go.mod h1:5jC53AEywhIVebHgPVeg0mj8OD3VO9OzclacVrqpaAw=
157+
golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k=
158+
golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
159+
golang.org/x/term v0.35.0 h1:bZBVKBudEyhRcajGcNc3jIfWPqV4y/Kt2XcoigOWtDQ=
160+
golang.org/x/term v0.35.0/go.mod h1:TPGtkTLesOwf2DE8CgVYiZinHAOuy5AYUYT1lENIZnA=
153161
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
154162
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
155-
golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng=
156-
golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU=
163+
golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk=
164+
golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4=
157165
golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE=
158166
golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg=
159167
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=

api/v1beta1/common_types.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,15 @@ type PasswordSelector struct {
104104
PrefixMetadataCellsSecret string `json:"prefixMetadataCellsSecret"`
105105
}
106106

107+
// AuthSpec defines authentication parameters for Nova services
108+
type AuthSpec struct {
109+
// +kubebuilder:validation:Optional
110+
// +operator-sdk:csv:customresourcedefinitions:type=spec
111+
// ApplicationCredentialSecret - the name of the k8s Secret that contains the
112+
// application credential data used for authentication
113+
ApplicationCredentialSecret string `json:"applicationCredentialSecret,omitempty"`
114+
}
115+
107116
// NovaImages defines container images used by top level Nova CR
108117
type NovaImages struct {
109118
// +kubebuilder:validation:Required

api/v1beta1/nova_types.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,11 @@ type NovaSpecCore struct {
131131
// Avoid colocating it with RabbitMqClusterName, APIMessageBusInstance or CellMessageBusInstance used for RPC.
132132
// For particular Nova cells, notifications cannot be disabled, nor configured differently.
133133
NotificationsBusInstance *string `json:"notificationsBusInstance,omitempty"`
134+
135+
// +kubebuilder:validation:Optional
136+
// +operator-sdk:csv:customresourcedefinitions:type=spec
137+
// Auth - Parameters related to authentication (shared by all Nova services)
138+
Auth AuthSpec `json:"auth,omitempty"`
134139
}
135140

136141
// NovaSpec defines the desired state of Nova

api/v1beta1/nova_webhook.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ import (
2626
"fmt"
2727

2828
"github.com/google/go-cmp/cmp"
29+
topologyv1 "github.com/openstack-k8s-operators/infra-operator/apis/topology/v1beta1"
30+
keystonev1 "github.com/openstack-k8s-operators/keystone-operator/api/v1beta1"
2931
service "github.com/openstack-k8s-operators/lib-common/modules/common/service"
3032
"github.com/robfig/cron/v3"
3133

32-
topologyv1 "github.com/openstack-k8s-operators/infra-operator/apis/topology/v1beta1"
3334
apierrors "k8s.io/apimachinery/pkg/api/errors"
3435
"k8s.io/apimachinery/pkg/runtime"
3536
"k8s.io/apimachinery/pkg/runtime/schema"
@@ -88,6 +89,11 @@ func (spec *NovaSpecCore) Default() {
8889
spec.APITimeout = novaDefaults.APITimeout
8990
}
9091

92+
// Default Auth.ApplicationCredentialSecret if not set
93+
if spec.Auth.ApplicationCredentialSecret == "" {
94+
spec.Auth.ApplicationCredentialSecret = keystonev1.GetACSecretName("nova")
95+
}
96+
9197
for cellName, cellTemplate := range spec.CellTemplates {
9298

9399
if cellTemplate.MetadataServiceTemplate.Enabled == nil {

0 commit comments

Comments
 (0)