Skip to content

Commit

Permalink
Emit no error for missing parameter when default present (#581)
Browse files Browse the repository at this point in the history
  • Loading branch information
alenkacz committed Jul 16, 2019
1 parent c8bb3c6 commit d9b5a33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controller/instance/instance_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ func (r *ReconcileInstance) Reconcile(request reconcile.Request) (reconcile.Resu

// Make sure all the required parameters in the operatorVersion are present
for _, param := range ov.Spec.Parameters {
if param.Required {
if param.Required && param.Default == nil {
if _, ok := instance.Spec.Parameters[param.Name]; !ok {
r.recorder.Event(instance, "Warning", "MissingParameter", fmt.Sprintf("Missing parameter \"%v\" required by operatorversion \"%v\"", param.Name, ov.Name))
}
Expand Down

0 comments on commit d9b5a33

Please sign in to comment.