@@ -25,6 +25,7 @@ import (
2525 "github.com/openstack-k8s-operators/lib-common/modules/common/service"
2626 "github.com/openstack-k8s-operators/lib-common/modules/common/tls"
2727 "github.com/openstack-k8s-operators/lib-common/modules/common/util"
28+ "github.com/openstack-k8s-operators/lib-common/modules/storage"
2829 "k8s.io/apimachinery/pkg/util/validation/field"
2930 corev1 "k8s.io/api/core/v1"
3031 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -201,6 +202,10 @@ type KeystoneAPISpecCore struct {
201202 // TopologyRef to apply the Topology defined by the associated CR referenced
202203 // by name
203204 TopologyRef * topologyv1.TopoRef `json:"topologyRef,omitempty"`
205+
206+ // ExtraMounts containing conf files
207+ // +kubebuilder:default={}
208+ ExtraMounts []KeystoneExtraMounts `json:"extraMounts,omitempty"`
204209}
205210
206211// APIOverrideSpec to override the generated manifest of several child resources.
@@ -334,6 +339,27 @@ func SetupDefaults() {
334339 SetupKeystoneAPIDefaults (keystoneDefaults )
335340}
336341
342+ // KeystoneExtraVolMounts exposes additional parameters processed by keystone-operator
343+ // and defines the common VolMounts structure provided by the main storage module
344+ type KeystoneExtraMounts struct {
345+ // +kubebuilder:validation:Optional
346+ Name string `json:"name,omitempty"`
347+ // +kubebuilder:validation:Optional
348+ Region string `json:"region,omitempty"`
349+ // +kubebuilder:validation:Required
350+ VolMounts []storage.VolMounts `json:"extraVol"`
351+ }
352+
353+ // Propagate is a function used to filter VolMounts according to the specified
354+ // PropagationType array
355+ func (c * KeystoneExtraMounts ) Propagate (svc []storage.PropagationType ) []storage.VolMounts {
356+ var vl []storage.VolMounts
357+ for _ , gv := range c .VolMounts {
358+ vl = append (vl , gv .Propagate (svc )... )
359+ }
360+ return vl
361+ }
362+
337363// GetLastTopologyRef - Returns a TopoRef object that can be passed to the
338364// Handle topology logic
339365func (instance KeystoneAPI ) GetLastAppliedTopologyRef () * topologyv1.TopoRef {
0 commit comments