Skip to content

Commit 4ebeb65

Browse files
committed
Add support for External Keystone Service
This patch adds a new `ExternalKeystoneAPI` property to KeystoneAPI to enable the use of an existing Keystone Service that is external to the OpenShift environment used to run this operator. For example, a multi-region deployment where one region is running a centralized Keystone service can use this to deploy additional regions that can use the centralized Keystone service without the need to run their own instance of Keystone. Assisted-by: Cursor (Auto Model)
1 parent 593df0a commit 4ebeb65

File tree

6 files changed

+267
-58
lines changed

6 files changed

+267
-58
lines changed

api/bases/keystone.openstack.org_keystoneapis.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ spec:
9898
description: EnableSecureRBAC - Enable Consistent and Secure RBAC
9999
policies
100100
type: boolean
101+
externalKeystoneAPI:
102+
default: false
103+
description: ExternalKeystoneAPI - Enable use of external Keystone
104+
API endpoints instead of deploying a local Keystone API
105+
type: boolean
101106
extraMounts:
102107
default: []
103108
description: ExtraMounts containing conf files

api/v1beta1/conditions.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,25 @@ const (
111111

112112
// KeystoneServiceOSUserReadyErrorMessage
113113
KeystoneServiceOSUserReadyErrorMessage = "Keystone Service user error occured %s"
114+
115+
//
116+
// External Keystone API condition messages
117+
//
118+
// ExternalKeystoneAPIDBMessage
119+
ExternalKeystoneAPIDBMessage = "External Keystone API configured - database is not managed by this operator"
120+
121+
// ExternalKeystoneAPIDBAccountMessage
122+
ExternalKeystoneAPIDBAccountMessage = "External Keystone API configured - database account is not managed by this operator"
123+
124+
// ExternalKeystoneAPIRabbitMQTransportURLMessage
125+
ExternalKeystoneAPIRabbitMQTransportURLMessage = "External Keystone API configured - RabbitMQ is not managed by this operator"
126+
127+
// ExternalKeystoneAPIMemcachedReadyMessage
128+
ExternalKeystoneAPIMemcachedReadyMessage = "External Keystone API configured - memcached is not managed by this operator"
129+
130+
// ExternalKeystoneAPIServiceConfigReadyMessage
131+
ExternalKeystoneAPIServiceMessage = "External Keystone API configured - service is not managed by this operator"
132+
133+
// ExternalKeystoneAPINetworkAttachmentsReadyMessage
134+
ExternalKeystoneAPINetworkAttachmentsReadyMessage = "External Keystone API configured - network attachments are not managed by this operator"
114135
)

api/v1beta1/keystoneapi_types.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,18 @@ type KeystoneAPISpecCore struct {
213213
// This is only needed when multiple realms are federated.
214214
// Config files mount path is set to /var/lib/httpd/metadata/
215215
FederatedRealmConfig string `json:"federatedRealmConfig"`
216+
217+
// +kubebuilder:validation:Optional
218+
// +kubebuilder:default=false
219+
// ExternalKeystoneAPI - Enable use of external Keystone API endpoints instead of deploying a local Keystone API
220+
ExternalKeystoneAPI bool `json:"externalKeystoneAPI,omitempty"`
221+
}
222+
223+
// ExternalKeystoneAPI defines the configuration for an external Keystone API
224+
type ExternalKeystoneAPI struct {
225+
// +kubebuilder:validation:Optional
226+
// Endpoints - Endpoint URLs for the external Keystone API
227+
Endpoints map[string]string `json:"endpoints,omitempty"`
216228
}
217229

218230
// APIOverrideSpec to override the generated manifest of several child resources.

api/v1beta1/zz_generated.deepcopy.go

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

config/crd/bases/keystone.openstack.org_keystoneapis.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ spec:
9898
description: EnableSecureRBAC - Enable Consistent and Secure RBAC
9999
policies
100100
type: boolean
101+
externalKeystoneAPI:
102+
default: false
103+
description: ExternalKeystoneAPI - Enable use of external Keystone
104+
API endpoints instead of deploying a local Keystone API
105+
type: boolean
101106
extraMounts:
102107
default: []
103108
description: ExtraMounts containing conf files

0 commit comments

Comments
 (0)