Skip to content

Commit d785b91

Browse files
xekDeydra71cursoragent
authored andcommitted
Application Credential support
Co-authored-by: Veronika Fisarova <vfisarov@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 25f0938 commit d785b91

37 files changed

Lines changed: 1091 additions & 30 deletions

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/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ require (
3939
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
4040
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
4141
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
42-
github.com/onsi/ginkgo/v2 v2.27.4 // indirect
42+
github.com/onsi/ginkgo/v2 v2.27.5 // indirect
4343
github.com/onsi/gomega v1.39.0 // indirect
4444
github.com/pkg/errors v0.9.1 // indirect
4545
github.com/prometheus/client_golang v1.22.0 // indirect

api/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFd
7474
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
7575
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
7676
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
77-
github.com/onsi/ginkgo/v2 v2.27.4 h1:fcEcQW/A++6aZAZQNUmNjvA9PSOzefMJBerHJ4t8v8Y=
78-
github.com/onsi/ginkgo/v2 v2.27.4/go.mod h1:ArE1D/XhNXBXCBkKOLkbsb2c81dQHCRcF5zwn/ykDRo=
77+
github.com/onsi/ginkgo/v2 v2.27.5 h1:ZeVgZMx2PDMdJm/+w5fE/OyG6ILo1Y3e+QX4zSR0zTE=
78+
github.com/onsi/ginkgo/v2 v2.27.5/go.mod h1:ArE1D/XhNXBXCBkKOLkbsb2c81dQHCRcF5zwn/ykDRo=
7979
github.com/onsi/gomega v1.39.0 h1:y2ROC3hKFmQZJNFeGAMeHZKkjBL65mIZcvrLQBF9k6Q=
8080
github.com/onsi/gomega v1.39.0/go.mod h1:ZCU1pkQcXDO5Sl9/VVEGlDyp+zm0m1cmeG5TOzLgdh4=
8181
github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20260123105816-865d02e287a9 h1:tD6nnTRcyUCXdVMWPHLApk12tzQlQni5eoxvQ8XdbP8=

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/conditions.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ const (
134134
// InputReadyWaitingMessage
135135
InputReadyWaitingMessage = "Input data resources missing: %s"
136136

137+
// NovaApplicationCredentialSecretErrorMessage
138+
NovaApplicationCredentialSecretErrorMessage = "Error with application credential secret"
139+
137140
// NovaCellReadyInitMessage
138141
NovaCellReadyInitMessage = "The status of NovaCell %s is unknown"
139142

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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ import (
2626
"fmt"
2727

2828
"github.com/google/go-cmp/cmp"
29+
topologyv1 "github.com/openstack-k8s-operators/infra-operator/apis/topology/v1beta1"
2930
service "github.com/openstack-k8s-operators/lib-common/modules/common/service"
3031
"github.com/robfig/cron/v3"
3132

32-
topologyv1 "github.com/openstack-k8s-operators/infra-operator/apis/topology/v1beta1"
3333
apierrors "k8s.io/apimachinery/pkg/api/errors"
3434
"k8s.io/apimachinery/pkg/runtime"
3535
"k8s.io/apimachinery/pkg/runtime/schema"

api/v1beta1/zz_generated.deepcopy.go

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/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: |-

config/manifests/bases/nova-operator.clusterserviceversion.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,15 @@ spec:
107107
- description: TLS - Parameters related to the TLS
108108
displayName: TLS
109109
path: apiServiceTemplate.tls
110+
- description: Auth - Parameters related to authentication (shared by all Nova
111+
services)
112+
displayName: Auth
113+
path: auth
114+
- description: |-
115+
ApplicationCredentialSecret - the name of the k8s Secret that contains the
116+
application credential data used for authentication
117+
displayName: Application Credential Secret
118+
path: auth.applicationCredentialSecret
110119
- description: TLS - Parameters related to the TLS
111120
displayName: TLS
112121
path: cellTemplates.metadataServiceTemplate.tls

0 commit comments

Comments
 (0)