Skip to content

Commit 50542c0

Browse files
committed
Add Application Credential support
Signed-off-by: Veronika Fisarova <[email protected]>
1 parent f50ba4f commit 50542c0

34 files changed

+398
-6
lines changed

api/bases/telemetry.openstack.org_autoscalings.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,14 @@ spec:
7070
default: 60
7171
description: APITimeout for Route and Apache
7272
type: integer
73+
auth:
74+
description: Auth - authentication settings for keystone integration
75+
properties:
76+
applicationCredentialSecret:
77+
description: ApplicationCredentialSecret - secret name for
78+
application credential
79+
type: string
80+
type: object
7381
customConfigsSecretName:
7482
description: |-
7583
A name of a secret containing custom configuration files. Files

api/bases/telemetry.openstack.org_ceilometers.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,14 @@ spec:
116116
default: 60
117117
description: APITimeout for Apache
118118
type: integer
119+
auth:
120+
description: Auth - authentication settings for keystone integration
121+
properties:
122+
applicationCredentialSecret:
123+
description: ApplicationCredentialSecret - secret name for application
124+
credential
125+
type: string
126+
type: object
119127
centralImage:
120128
type: string
121129
computeImage:

api/bases/telemetry.openstack.org_cloudkitties.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ spec:
4343
default: 60
4444
description: APITimeout for HAProxy, Apache, and rpc_response_timeout
4545
type: integer
46+
auth:
47+
description: Auth - authentication settings for keystone integration
48+
properties:
49+
applicationCredentialSecret:
50+
description: ApplicationCredentialSecret - secret name for application
51+
credential
52+
type: string
53+
type: object
4654
cloudKittyAPI:
4755
description: CloudKittyAPI - Spec definition for the API service of
4856
this CloudKitty deployment

api/bases/telemetry.openstack.org_cloudkittyapis.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ spec:
3939
spec:
4040
description: CloudKittyAPISpec defines the desired state of CloudKittyAPI
4141
properties:
42+
auth:
43+
description: Auth - authentication settings for keystone integration
44+
properties:
45+
applicationCredentialSecret:
46+
description: ApplicationCredentialSecret - secret name for application
47+
credential
48+
type: string
49+
type: object
4250
containerImage:
4351
description: ContainerImage - CloudKitty Container Image URL (will
4452
be set to environmental default if empty)

api/bases/telemetry.openstack.org_cloudkittyprocs.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ spec:
5353
description: CloudKittyProcSpec defines the desired state of CloudKitty
5454
Processor
5555
properties:
56+
auth:
57+
description: Auth - authentication settings for keystone integration
58+
properties:
59+
applicationCredentialSecret:
60+
description: ApplicationCredentialSecret - secret name for application
61+
credential
62+
type: string
63+
type: object
5664
containerImage:
5765
description: ContainerImage - CloudKitty Container Image URL (will
5866
be set to environmental default if empty)

api/bases/telemetry.openstack.org_telemetries.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,14 @@ spec:
7373
default: 60
7474
description: APITimeout for Route and Apache
7575
type: integer
76+
auth:
77+
description: Auth - authentication settings for keystone integration
78+
properties:
79+
applicationCredentialSecret:
80+
description: ApplicationCredentialSecret - secret name
81+
for application credential
82+
type: string
83+
type: object
7684
customConfigsSecretName:
7785
description: |-
7886
A name of a secret containing custom configuration files. Files
@@ -439,6 +447,14 @@ spec:
439447
default: 60
440448
description: APITimeout for Apache
441449
type: integer
450+
auth:
451+
description: Auth - authentication settings for keystone integration
452+
properties:
453+
applicationCredentialSecret:
454+
description: ApplicationCredentialSecret - secret name for
455+
application credential
456+
type: string
457+
type: object
442458
centralImage:
443459
type: string
444460
computeImage:
@@ -614,6 +630,14 @@ spec:
614630
default: 60
615631
description: APITimeout for HAProxy, Apache, and rpc_response_timeout
616632
type: integer
633+
auth:
634+
description: Auth - authentication settings for keystone integration
635+
properties:
636+
applicationCredentialSecret:
637+
description: ApplicationCredentialSecret - secret name for
638+
application credential
639+
type: string
640+
type: object
617641
cloudKittyAPI:
618642
description: CloudKittyAPI - Spec definition for the API service
619643
of this CloudKitty deployment

api/go.mod

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ go 1.24.4
44

55
require (
66
github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20260108154501-11e5091cddf1
7+
github.com/openstack-k8s-operators/keystone-operator/api v0.6.1-0.20260109123729-8c46aa6cb459
78
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20251230215914-6ba873b49a35
89
github.com/rhobs/observability-operator v0.3.1
910
k8s.io/api v0.31.14
@@ -16,7 +17,6 @@ require (
1617
github.com/cespare/xxhash/v2 v2.3.0 // indirect
1718
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
1819
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
19-
github.com/evanphx/json-patch v5.9.11+incompatible // indirect
2020
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
2121
github.com/fsnotify/fsnotify v1.9.0 // indirect
2222
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
@@ -31,13 +31,17 @@ require (
3131
github.com/google/go-cmp v0.7.0 // indirect
3232
github.com/google/gofuzz v1.2.0 // indirect
3333
github.com/google/uuid v1.6.0 // indirect
34+
github.com/gophercloud/gophercloud/v2 v2.8.0 // indirect
3435
github.com/imdario/mergo v0.3.16 // indirect
3536
github.com/josharian/intern v1.0.0 // indirect
3637
github.com/json-iterator/go v1.1.12 // indirect
3738
github.com/mailru/easyjson v0.9.0 // indirect
3839
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
3940
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
4041
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
42+
github.com/openshift/api v3.9.0+incompatible // indirect
43+
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.6.1-0.20251230215914-6ba873b49a35 // indirect
44+
github.com/openstack-k8s-operators/lib-common/modules/storage v0.6.1-0.20251230215914-6ba873b49a35 // indirect
4145
github.com/pkg/errors v0.9.1 // indirect
4246
github.com/prometheus/client_golang v1.22.0 // indirect
4347
github.com/prometheus/client_model v0.6.2 // indirect
@@ -91,3 +95,5 @@ replace k8s.io/component-base => k8s.io/component-base v0.31.13 //allow-merging
9195
replace github.com/rabbitmq/cluster-operator/v2 => github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20250929174222-a0d328fa4dec //allow-merging
9296

9397
replace k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20250627150254-e9823e99808e //allow-merging
98+
99+
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: 10 additions & 0 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=
@@ -78,10 +82,16 @@ github.com/onsi/ginkgo/v2 v2.27.3 h1:ICsZJ8JoYafeXFFlFAG75a7CxMsJHwgKwtO+82SE9L8
7882
github.com/onsi/ginkgo/v2 v2.27.3/go.mod h1:ArE1D/XhNXBXCBkKOLkbsb2c81dQHCRcF5zwn/ykDRo=
7983
github.com/onsi/gomega v1.38.3 h1:eTX+W6dobAYfFeGC2PV6RwXRu/MyT+cQguijutvkpSM=
8084
github.com/onsi/gomega v1.38.3/go.mod h1:ZCU1pkQcXDO5Sl9/VVEGlDyp+zm0m1cmeG5TOzLgdh4=
85+
github.com/openshift/api v3.9.0+incompatible h1:fJ/KsefYuZAjmrr3+5U9yZIZbTOpVkDDLDLFresAeYs=
86+
github.com/openshift/api v3.9.0+incompatible/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY=
8187
github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20260108154501-11e5091cddf1 h1:zAbZVtpldi1TU/CO9aU2ZByzcsi+N3aIv6snpSjBVLY=
8288
github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20260108154501-11e5091cddf1/go.mod h1:ZXwFlspJCdZEUjMbmaf61t5AMB4u2vMyAMMoe/vJroE=
8389
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20251230215914-6ba873b49a35 h1:pF3mJ3nwq6r4qwom+rEWZNquZpcQW/iftHlJ1KPIDsk=
8490
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20251230215914-6ba873b49a35/go.mod h1:kycZyoe7OZdW1HUghr2nI3N7wSJtNahXf6b/ypD14f4=
91+
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.6.1-0.20251230215914-6ba873b49a35 h1:IdcI8DFvW8rXtchONSzbDmhhRp1YyO2YaBJDBXr44Gk=
92+
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.6.1-0.20251230215914-6ba873b49a35/go.mod h1:zOX7Y05keiSppIvLabuyh42QHBMhCcoskAtxFRbwXKo=
93+
github.com/openstack-k8s-operators/lib-common/modules/storage v0.6.1-0.20251230215914-6ba873b49a35 h1:8WZYfCt1VJHa5sJRX0UhpmoXud/fn8LHQhXsakdYXuQ=
94+
github.com/openstack-k8s-operators/lib-common/modules/storage v0.6.1-0.20251230215914-6ba873b49a35/go.mod h1:H0aQANk8iJPRhS2Bg9n6cYb/IHF0Cks9g7+uZG04Rhk=
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=

api/v1beta1/autoscaling_types.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,11 @@ type AodhCore struct {
142142
// from this secret will get copied into /etc/aodh/ and they'll
143143
// overwrite any default files already present there.
144144
CustomConfigsSecretName string `json:"customConfigsSecretName,omitempty"`
145+
146+
// +kubebuilder:validation:Optional
147+
// +operator-sdk:csv:customresourcedefinitions:type=spec
148+
// Auth - authentication settings for keystone integration
149+
Auth AuthSpec `json:"auth,omitempty"`
145150
}
146151

147152
// AutoscalingSpec defines the desired state of Autoscaling

api/v1beta1/autoscaling_webhook.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package v1beta1
1919
import (
2020
"fmt"
2121

22+
keystonev1 "github.com/openstack-k8s-operators/keystone-operator/api/v1beta1"
2223
"k8s.io/apimachinery/pkg/runtime"
2324
logf "sigs.k8s.io/controller-runtime/pkg/log"
2425
"sigs.k8s.io/controller-runtime/pkg/webhook"
@@ -76,6 +77,10 @@ func (spec *AodhCore) Default() {
7677
if spec.MemcachedInstance == "" {
7778
spec.MemcachedInstance = "memcached"
7879
}
80+
// Default Auth fields for Application Credentials
81+
if spec.Auth.ApplicationCredentialSecret == "" {
82+
spec.Auth.ApplicationCredentialSecret = keystonev1.GetACSecretName("aodh")
83+
}
7984
}
8085

8186
// SetDefaultRouteAnnotations sets HAProxy timeout values of the route

0 commit comments

Comments
 (0)