Skip to content

Commit 34e7d27

Browse files
committed
[OSPRH-12079] Verify mysqld_exporter image is set
This checks that the mysqld_exporter image is set. The mysqld_exporter reconciliation ends with an error if it isn't set.
1 parent 8284599 commit 34e7d27

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

controllers/ceilometer_controller.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,15 @@ func (r *CeilometerReconciler) reconcileMysqldExporter(
764764
return r.reconcileDeleteMysqldExporter(ctx, instance, helper)
765765
}
766766

767+
if instance.Spec.MysqldExporterImage == "" {
768+
instance.CeilometerStatus.Conditions.Set(condition.FalseCondition(
769+
telemetryv1.MysqldExporterDeploymentReadyCondition,
770+
condition.ErrorReason,
771+
condition.SeverityError,
772+
"mysqld_exporter container image isn't set"))
773+
return ctrl.Result{}, nil
774+
}
775+
767776
configMapVars := make(map[string]env.Setter)
768777
//
769778
// TLS input validation

0 commit comments

Comments
 (0)