Skip to content

Commit a65506a

Browse files
Merge pull request openstack-k8s-operators#1441 from olliewalsh/inherit_em
Propagate top-level extraMounts to Horizon and Keystone
2 parents f2575be + 0a4eb2d commit a65506a

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

pkg/openstack/horizon.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,15 @@ func ReconcileHorizon(ctx context.Context, instance *corev1beta1.OpenStackContro
157157
horizon.Spec.Secret = instance.Spec.Secret
158158
}
159159

160+
// Append globally defined extraMounts to the service's own list.
161+
for _, ev := range instance.Spec.ExtraMounts {
162+
horizon.Spec.ExtraMounts = append(horizon.Spec.ExtraMounts, horizonv1.HorizonExtraVolMounts{
163+
Name: ev.Name,
164+
Region: ev.Region,
165+
VolMounts: ev.VolMounts,
166+
})
167+
}
168+
160169
err := controllerutil.SetControllerReference(helper.GetBeforeObject(), horizon, helper.GetScheme())
161170
if err != nil {
162171
return err

pkg/openstack/keystone.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,15 @@ func ReconcileKeystoneAPI(ctx context.Context, instance *corev1beta1.OpenStackCo
128128
keystoneAPI.Spec.DatabaseInstance = "openstack" //FIXME: see above
129129
}
130130

131+
// Append globally defined extraMounts to the service's own list.
132+
for _, ev := range instance.Spec.ExtraMounts {
133+
keystoneAPI.Spec.ExtraMounts = append(keystoneAPI.Spec.ExtraMounts, keystonev1.KeystoneExtraMounts{
134+
Name: ev.Name,
135+
Region: ev.Region,
136+
VolMounts: ev.VolMounts,
137+
})
138+
}
139+
131140
err := controllerutil.SetControllerReference(helper.GetBeforeObject(), keystoneAPI, helper.GetScheme())
132141
if err != nil {
133142
return err

0 commit comments

Comments
 (0)