From df64e32b42c6c61a417df13abfc092d421690326 Mon Sep 17 00:00:00 2001 From: Igor Beliakov <46579601+weisdd@users.noreply.github.com> Date: Sat, 25 Mar 2023 10:30:49 +0100 Subject: [PATCH] fix: don't use hardcoded cluster domain (#962) --- controllers/reconcilers/grafana/grafana_service_reconciler.go | 2 +- docs/blog/v5-getting-started.md | 2 +- tests/e2e/example-test/00-assert.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/controllers/reconcilers/grafana/grafana_service_reconciler.go b/controllers/reconcilers/grafana/grafana_service_reconciler.go index 643befd7c..02cb919cc 100644 --- a/controllers/reconcilers/grafana/grafana_service_reconciler.go +++ b/controllers/reconcilers/grafana/grafana_service_reconciler.go @@ -48,7 +48,7 @@ func (r *ServiceReconciler) Reconcile(ctx context.Context, cr *v1beta1.Grafana, // try to assign the admin url if !cr.PreferIngress() { - status.AdminUrl = fmt.Sprintf("%v://%v.%v.svc.cluster.local:%d", getGrafanaServerProtocol(cr), service.Name, cr.Namespace, + status.AdminUrl = fmt.Sprintf("%v://%v.%v:%d", getGrafanaServerProtocol(cr), service.Name, cr.Namespace, int32(GetGrafanaPort(cr))) } diff --git a/docs/blog/v5-getting-started.md b/docs/blog/v5-getting-started.md index 3c67f9857..5fade3fa1 100644 --- a/docs/blog/v5-getting-started.md +++ b/docs/blog/v5-getting-started.md @@ -278,7 +278,7 @@ Should show you something like this ```yaml status: - adminUrl: http://grafana-ingress-service.default.svc.cluster.local:3000 + adminUrl: http://grafana-ingress-service.default:3000 dashboards: - default/grafanadashboard-sample-ingress/6eaed1ab-0b0a-4d7f-bc46-0e3c1f58c8a8 stage: complete diff --git a/tests/e2e/example-test/00-assert.yaml b/tests/e2e/example-test/00-assert.yaml index b9d1fa3ba..405b7216a 100644 --- a/tests/e2e/example-test/00-assert.yaml +++ b/tests/e2e/example-test/00-assert.yaml @@ -3,7 +3,7 @@ kind: Grafana metadata: name: grafana status: - adminUrl: http://grafana-service.grafana-operator-system.svc.cluster.local:3000 + adminUrl: http://grafana-service.grafana-operator-system:3000 stage: complete stageStatus: success ---