Skip to content

Commit

Permalink
Move local Prometheus port exposure to less standard ports (#673)
Browse files Browse the repository at this point in the history
* 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 <yury.tsarev@absa.africa>
  • Loading branch information
ytsarev authored Oct 20, 2021
1 parent 98480ef commit beda791
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions deploy/grafana/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
url: https://grafana.com/api/dashboards/1860/revisions/23/download
6 changes: 3 additions & 3 deletions k3d/test-gslb1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions k3d/test-gslb2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit beda791

Please sign in to comment.