From beda7911df957790d6d91083477d2c3157dda079 Mon Sep 17 00:00:00 2001 From: Yury Tsarev Date: Wed, 20 Oct 2021 21:40:08 +0200 Subject: [PATCH] Move local Prometheus port exposure to less standard ports (#673) * Expose local testing Prometheus UI on `:9080` and `:9081` * Otherwise it conflicts with default `kubebuilder` metricAddress/probeAddr and transitively breaks `make run` both for k8gb and freshly generated kubebuilder projects(see https://github.com/kubernetes-sigs/kubebuilder/blob/ecce96f6892e29b441bbe08d6694ad1806cba392/testdata/project-v3-v1beta1/main.go#L55-L56) * Update EDGE_DNS_SERVER->EDGE_DNS_SERVERS to fix local k8gb `make run` Signed-off-by: Yury Tsarev --- CONTRIBUTING.md | 4 ++-- Makefile | 2 +- deploy/grafana/values.yaml | 6 +++--- k3d/test-gslb1.yaml | 6 +++--- k3d/test-gslb2.yaml | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 52e38e825d..1b89214869 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -142,8 +142,8 @@ If you need to check and query the k8gb metrics locally, you can install a Prome The deployed Prometheus scrapes metrics from the dedicated k8gb operator endpoint and makes them accessible via Prometheus web UI: -- http://127.0.0.1:8080 -- http://127.0.0.1:8081 +- http://127.0.0.1:9080 +- http://127.0.0.1:9081 To uninstall Prometheus, run `make uninstall-prometheus` diff --git a/Makefile b/Makefile index c91a02be4d..35baf5cc9f 100644 --- a/Makefile +++ b/Makefile @@ -323,7 +323,7 @@ run: lint POD_NAMESPACE=$(POD_NAMESPACE) \ CLUSTER_GEO_TAG=$(CLUSTER_GEO_TAG) \ EXT_GSLB_CLUSTERS_GEO_TAGS=$(EXT_GSLB_CLUSTERS_GEO_TAGS) \ - EDGE_DNS_SERVER=$(EDGE_DNS_SERVER) \ + EDGE_DNS_SERVERS=$(EDGE_DNS_SERVER) \ EDGE_DNS_ZONE=$(EDGE_DNS_ZONE) \ DNS_ZONE=$(DNS_ZONE) \ go run ./main.go diff --git a/deploy/grafana/values.yaml b/deploy/grafana/values.yaml index d5373e388b..e28f2eb351 100644 --- a/deploy/grafana/values.yaml +++ b/deploy/grafana/values.yaml @@ -20,12 +20,12 @@ datasources: # isDefault: true - name: Prometheus-cluster1 type: prometheus - url: http://localhost:8080 + url: http://localhost:9080 access: direct isDefault: false - name: Prometheus-cluster2 type: prometheus - url: http://localhost:8081 + url: http://localhost:9081 access: direct isDefault: false dashboardProviders: @@ -44,4 +44,4 @@ dashboards: default: k8s-node-exporter-full: # Node Exporter Full https://grafana.com/grafana/dashboards/1860 - url: https://grafana.com/api/dashboards/1860/revisions/23/download \ No newline at end of file + url: https://grafana.com/api/dashboards/1860/revisions/23/download diff --git a/k3d/test-gslb1.yaml b/k3d/test-gslb1.yaml index 56e3640e38..cdbce1fd2f 100644 --- a/k3d/test-gslb1.yaml +++ b/k3d/test-gslb1.yaml @@ -7,19 +7,19 @@ network: k3d-action-bridge-network ports: - port: 80:80 nodeFilters: - - agent[0] + - agent[0] - port: 443:443 nodeFilters: - agent[0] - port: 3000:30030 nodeFilters: - agent[0] -- port: 8080:30090 +- port: 9080:30090 nodeFilters: - agent[0] - port: 5053:53/udp nodeFilters: - - agent[0] + - agent[0] options: k3d: disableLoadbalancer: true diff --git a/k3d/test-gslb2.yaml b/k3d/test-gslb2.yaml index 6cf0fa9feb..9d5435a423 100644 --- a/k3d/test-gslb2.yaml +++ b/k3d/test-gslb2.yaml @@ -7,16 +7,16 @@ network: k3d-action-bridge-network ports: - port: 81:80 nodeFilters: - - agent[0] + - agent[0] - port: 444:443 nodeFilters: - agent[0] -- port: 8081:30090 +- port: 9081:30090 nodeFilters: - agent[0] - port: 5054:53/udp nodeFilters: - - agent[0] + - agent[0] options: k3d: disableLoadbalancer: true