From ce14a5a2b161d8a90703f26917727f192a06d6ac Mon Sep 17 00:00:00 2001 From: Igor Beliakov <46579601+weisdd@users.noreply.github.com> Date: Wed, 20 Jul 2022 21:25:19 +0200 Subject: [PATCH] fix: return correct message about unsupported protocol (#796) * fix: return correct message about unsupported protocol Signed-off-by: Igor Beliakov * Slightly rewrite the switch Signed-off-by: Igor Beliakov Co-authored-by: Edvin N --- controllers/grafana/grafana_controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/grafana/grafana_controller.go b/controllers/grafana/grafana_controller.go index be3d21a5b..08cb6d2d4 100644 --- a/controllers/grafana/grafana_controller.go +++ b/controllers/grafana/grafana_controller.go @@ -281,7 +281,7 @@ func (r *ReconcileGrafana) getGrafanaAdminUrl(cr *grafanav1alpha1.Grafana, state case "https": protocol = "https" default: - return "", fmt.Errorf("server protocol %v is not supported, please use either http or https", protocol) + return "", fmt.Errorf("server protocol %v is not supported, please use either http or https", cr.Spec.Config.Server.Protocol) } }