@@ -105,7 +105,7 @@ check: license lint gokart test ## Check project integrity
105105
106106.PHONY : clean-test-apps
107107clean-test-apps :
108- kubectl delete -f deploy/test-apps
108+ kubectl delete --ignore-not-found - f deploy/test-apps
109109 helm -n test-gslb uninstall frontend
110110
111111# see: https://dev4devs.com/2019/05/04/operator-framework-how-to-debug-golang-operator-projects/
@@ -264,9 +264,17 @@ deploy-grafana:
264264 helm repo add grafana https://grafana.github.io/helm-charts
265265 helm repo update
266266 helm -n k8gb upgrade -i grafana grafana/grafana -f deploy/grafana/values.yaml \
267- --wait --timeout=2m30s \
267+ --wait --timeout=4m \
268+ --version=6.38.6 \
268269 --kube-context=k3d-$(CLUSTER_NAME ) 1
269270 kubectl --context k3d-$(CLUSTER_NAME ) 1 apply -f deploy/grafana/dashboard-cm.yaml -n k8gb
271+ mkdir grafana/dashboards/ || true
272+ cat grafana/controller-resources-metrics.json | sed ' s/$${DS_PROMETHEUS}/Prometheus/g' > grafana/dashboards/controller-resources-metrics.json
273+ cat grafana/controller-runtime-metrics.json | sed ' s/$${DS_PROMETHEUS}/Prometheus/g' > grafana/dashboards/controller-runtime-metrics.json
274+ cat grafana/custom-metrics/pretty-custom-metrics-dashboard.json | sed ' s/$${DS_PROMETHEUS}/Prometheus/g' > grafana/dashboards/pretty-custom-metrics-dashboard.json
275+ kubectl --context k3d-$(CLUSTER_NAME ) 1 -n k8gb create cm -n k8gb k8gb-dashboards --from-file=./grafana/dashboards/ --dry-run=client -oyaml | kubectl apply --context k3d-$(CLUSTER_NAME ) 1 -f -
276+ kubectl --context k3d-$(CLUSTER_NAME ) 1 -n k8gb label cm k8gb-dashboards grafana_dashboard=true --overwrite
277+ rm -rf grafana/dashboards/
270278 @echo -e " \nGrafana is listening on http://localhost:3000\n"
271279 @echo -e " 🖖 credentials are admin:admin\n"
272280
@@ -275,7 +283,8 @@ deploy-grafana:
275283uninstall-grafana :
276284 @echo -e " \n$( YELLOW) Local cluster $( CYAN) $( CLUSTER_GSLB1) $( NC) "
277285 @echo -e " \n$( YELLOW) uninstall grafana $( NC) "
278- kubectl --context k3d-$(CLUSTER_NAME ) 1 delete -f deploy/grafana/dashboard-cm.yaml -n k8gb
286+ kubectl --context k3d-$(CLUSTER_NAME ) 1 delete --ignore-not-found -f deploy/grafana/dashboard-cm.yaml -n k8gb
287+ kubectl --context k3d-$(CLUSTER_NAME ) 1 delete cm --ignore-not-found -n k8gb k8gb-dashboards
279288 helm uninstall grafana -n k8gb --kube-context=k3d-$(CLUSTER_NAME ) 1
280289
281290.PHONY : dns-tools
@@ -309,7 +318,7 @@ ensure-cluster-size:
309318
310319.PHONY : goreleaser
311320goreleaser :
312- go install github.com/goreleaser/
[email protected] 321+ command -v goreleaser & > /dev/null || go install github.com/goreleaser/
[email protected] 313322
314323.PHONY : release-images
315324release-images : goreleaser
@@ -572,7 +581,7 @@ define deploy-prometheus
572581 helm repo add prometheus-community https://prometheus-community.github.io/helm-charts ;\
573582 helm repo update ;\
574583 helm -n k8gb upgrade -i prometheus prometheus-community/prometheus -f deploy/prometheus/values.yaml \
575- --version 14.2 .0 \
584+ --version 15.14 .0 \
576585 --wait --timeout=2m0s \
577586 --kube-context=k3d-$1
578587endef
0 commit comments