Skip to content

Commit

Permalink
Fix RabbitMQ image default/override logic
Browse files Browse the repository at this point in the history
  • Loading branch information
abays committed Sep 19, 2023
1 parent cda0e1f commit cc93e92
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions apis/core/v1beta1/openstackcontrolplane_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,11 @@ func (r *OpenStackControlPlane) DefaultServices() {
// so we aren't able to add and call a Default function on its spec.
// Instead we just directly set the defaults we need.
for key, template := range r.Spec.Rabbitmq.Templates {
template.Image = openstackControlPlaneDefaults.RabbitMqImageURL
// By-value copy, need to update
r.Spec.Rabbitmq.Templates[key] = template
if template.Image == "" {
template.Image = openstackControlPlaneDefaults.RabbitMqImageURL
// By-value copy, need to update
r.Spec.Rabbitmq.Templates[key] = template
}
}

// Cinder
Expand Down

0 comments on commit cc93e92

Please sign in to comment.