@@ -212,6 +212,11 @@ type OpenStackControlPlaneSpec struct {
212212 // TopologyRef to apply the Topology defined by the associated CR referenced
213213 // by name
214214 TopologyRef * topologyv1.TopoRef `json:"topologyRef,omitempty"`
215+
216+ // +kubebuilder:validation:Optional
217+ // +operator-sdk:csv:customresourcedefinitions:type=spec
218+ // ApplicationCredential - Parameters related to the ApplicationCredential
219+ ApplicationCredential ApplicationCredentialSection `json:"applicationCredential"`
215220}
216221
217222// TLSSection defines the desired state of TLS configuration
@@ -406,6 +411,13 @@ type PlacementSection struct {
406411 // +operator-sdk:csv:customresourcedefinitions:type=spec
407412 // APIOverride, provides the ability to override the generated manifest of several child resources.
408413 APIOverride Override `json:"apiOverride,omitempty"`
414+
415+ // ApplicationCredential allows service-specific overrides of the global AC configuration.
416+ // +operator-sdk:csv:customresourcedefinitions:type=spec
417+ // +kubebuilder:validation:Optional
418+ // +nullable
419+ // +kubebuilder:default={enabled:false}
420+ ApplicationCredential * ServiceAppCredSection `json:"applicationCredential"`
409421}
410422
411423// GlanceSection defines the desired state of Glance service
@@ -432,6 +444,13 @@ type GlanceSection struct {
432444 // Convenient to avoid podname (and thus hostname) collision between different deployments.
433445 // Useful for CI jobs as well as preproduction and production environments that use the same storage backend, etc.
434446 UniquePodNames bool `json:"uniquePodNames"`
447+
448+ // ApplicationCredential allows service-specific overrides of the global AC configuration.
449+ // +operator-sdk:csv:customresourcedefinitions:type=spec
450+ // +kubebuilder:validation:Optional
451+ // +nullable
452+ // +kubebuilder:default={enabled:false}
453+ ApplicationCredential * ServiceAppCredSection `json:"applicationCredential"`
435454}
436455
437456// CinderSection defines the desired state of Cinder service
@@ -458,6 +477,13 @@ type CinderSection struct {
458477 // Convenient to avoid podname (and thus hostname) collision between different deployments.
459478 // Useful for CI jobs as well as preproduction and production environments that use the same storage backend, etc.
460479 UniquePodNames bool `json:"uniquePodNames"`
480+
481+ // ApplicationCredential allows service-specific overrides of the global AC configuration.
482+ // +operator-sdk:csv:customresourcedefinitions:type=spec
483+ // +kubebuilder:validation:Optional
484+ // +nullable
485+ // +kubebuilder:default={enabled:false}
486+ ApplicationCredential * ServiceAppCredSection `json:"applicationCredential"`
461487}
462488
463489// GaleraSection defines the desired state of Galera services
@@ -551,6 +577,13 @@ type NeutronSection struct {
551577 // +operator-sdk:csv:customresourcedefinitions:type=spec
552578 // APIOverride, provides the ability to override the generated manifest of several child resources.
553579 APIOverride Override `json:"apiOverride,omitempty"`
580+
581+ // ApplicationCredential allows service-specific overrides of the global AC configuration.
582+ // +operator-sdk:csv:customresourcedefinitions:type=spec
583+ // +kubebuilder:validation:Optional
584+ // +nullable
585+ // +kubebuilder:default={enabled:false}
586+ ApplicationCredential * ServiceAppCredSection `json:"applicationCredential"`
554587}
555588
556589// NovaSection defines the desired state of Nova services
@@ -577,6 +610,13 @@ type NovaSection struct {
577610 // for a nova cell. cell0 never have compute nodes and therefore it won't have a noVNCProxy deployed.
578611 // Providing an override for cell0 noVNCProxy does not have an effect.
579612 CellOverride map [string ]NovaCellOverrideSpec `json:"cellOverride,omitempty"`
613+
614+ // ApplicationCredential allows service-specific overrides of the global AC configuration.
615+ // +operator-sdk:csv:customresourcedefinitions:type=spec
616+ // +kubebuilder:validation:Optional
617+ // +nullable
618+ // +kubebuilder:default={enabled:false}
619+ ApplicationCredential * ServiceAppCredSection `json:"applicationCredential"`
580620}
581621
582622// NovaCellOverrideSpec to override the generated manifest of several child resources.
@@ -698,6 +738,13 @@ type TelemetrySection struct {
698738 // +operator-sdk:csv:customresourcedefinitions:type=spec
699739 // AlertmanagerOverride, provides the ability to override the generated manifest of several child resources.
700740 AlertmanagerOverride Override `json:"alertmanagerOverride,omitempty"`
741+
742+ // ApplicationCredential allows service-specific overrides of the global AC configuration.
743+ // +operator-sdk:csv:customresourcedefinitions:type=spec
744+ // +kubebuilder:validation:Optional
745+ // +nullable
746+ // +kubebuilder:default={enabled:false}
747+ ApplicationCredential * ServiceAppCredSection `json:"applicationCredential"`
701748}
702749
703750// SwiftSection defines the desired state of Swift service
@@ -717,6 +764,13 @@ type SwiftSection struct {
717764 // +operator-sdk:csv:customresourcedefinitions:type=spec
718765 // ProxyOverride, provides the ability to override the generated manifest of several child resources.
719766 ProxyOverride Override `json:"proxyOverride,omitempty"`
767+
768+ // ApplicationCredential allows service-specific overrides of the global AC configuration.
769+ // +operator-sdk:csv:customresourcedefinitions:type=spec
770+ // +kubebuilder:validation:Optional
771+ // +nullable
772+ // +kubebuilder:default={enabled:false}
773+ ApplicationCredential * ServiceAppCredSection `json:"applicationCredential"`
720774}
721775
722776// OctaviaSection defines the desired state of the Octavia service
@@ -774,6 +828,13 @@ type BarbicanSection struct {
774828 // +operator-sdk:csv:customresourcedefinitions:type=spec
775829 // APIOverride, provides the ability to override the generated manifest of several child resources.
776830 APIOverride Override `json:"apiOverride,omitempty"`
831+
832+ // ApplicationCredential allows service-specific overrides of the global AC configuration.
833+ // +operator-sdk:csv:customresourcedefinitions:type=spec
834+ // +kubebuilder:validation:Optional
835+ // +nullable
836+ // +kubebuilder:default={enabled:false}
837+ ApplicationCredential * ServiceAppCredSection `json:"applicationCredential"`
777838}
778839
779840// RedisSection defines the desired state of the Redis service
@@ -798,6 +859,43 @@ type OpenStackClientSection struct {
798859 Template v1beta1.OpenStackClientSpecCore `json:"template,omitempty"`
799860}
800861
862+ // +kubebuilder:validation:XValidation:rule="self.gracePeriodDays < self.expirationDays",message="gracePeriodDays must be smaller than expirationDays"
863+ // ApplicationCredentialSection defines the desired configuration for ApplicationCredentials
864+ type ApplicationCredentialSection struct {
865+ // Enabled indicates whether an ApplicationCredential should be created
866+ // +kubebuilder:validation:Optional
867+ // +kubebuilder:default=false
868+ Enabled bool `json:"enabled"`
869+
870+ // ExpirationDays sets the lifetime in days for the AC
871+ // +kubebuilder:validation:Optional
872+ // +kubebuilder:default=14
873+ // +kubebuilder:validation:Minimum=2
874+ ExpirationDays * int `json:"expirationDays,omitempty"`
875+
876+ // GracePeriodDays sets how many days before expiration the AC should be rotated
877+ // +kubebuilder:validation:Optional
878+ // +kubebuilder:default=7
879+ // +kubebuilder:validation:Minimum=1
880+ GracePeriodDays * int `json:"gracePeriodDays,omitempty"`
881+ }
882+
883+ // +kubebuilder:validation:XValidation:rule="!(has(self.expirationDays) && has(self.gracePeriodDays)) || self.gracePeriodDays < self.expirationDays",message="gracePeriodDays must be smaller than expirationDays"
884+ // ServiceAppCredSection allows service-specific overrides of the global AC configuration
885+ type ServiceAppCredSection struct {
886+ // +kubebuilder:validation:Optional
887+ // +kubebuilder:default=false
888+ Enabled bool `json:"enabled"`
889+
890+ // +kubebuilder:validation:Optional
891+ // +kubebuilder:validation:Minimum=2
892+ ExpirationDays * int `json:"expirationDays,omitempty"`
893+
894+ // +kubebuilder:validation:Optional
895+ // +kubebuilder:validation:Minimum=1
896+ GracePeriodDays * int `json:"gracePeriodDays,omitempty"`
897+ }
898+
801899// OpenStackControlPlaneStatus defines the observed state of OpenStackControlPlane
802900type OpenStackControlPlaneStatus struct {
803901 // +operator-sdk:csv:customresourcedefinitions:type=status,xDescriptors={"urn:alm:descriptor:io.kubernetes.conditions"}
0 commit comments