-
Notifications
You must be signed in to change notification settings - Fork 478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
find the true jaeger and grafana URLs to better support different dev evirons #770
Conversation
… environs. the defaults are not necessarily correct (for me, they are never correct).
Note that you can still override the URLs yourself (like you could before) by simply setting the env vars yourself...e.g. this will use your own URLs rather than relying on that "oc" cmd:
|
@@ -249,8 +245,14 @@ docker-push: | |||
@$(eval OC ?= $(shell which istiooc 2>/dev/null || which oc)) | |||
@${OC} get project ${NAMESPACE} > /dev/null | |||
|
|||
.openshift-find-addons: .openshift-validate | |||
@$(eval JAEGER_URL ?= $(shell echo http://$$(${OC} get svc tracing -n istio-system -o jsonpath='{.spec.clusterIP}'):80)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also check if the route is https, like what I did here: https://github.com/kiali/kiali/pull/768/files#diff-5e6fb42f8bf476d6c792f7dcceabf189R147
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally, it works for me
And is anyway safe enough to merge as it's only for dev scripts
"make openshift-deploy" causes: |
What version of make are you using? works for me and @jotak ... here's what I have:
|
@hhovsepy see if this workaround helps --- I just replaced the $() notation with `` (backticks). Works still for me. diff --git a/Makefile b/Makefile
index 9c8f312..e9a9abd 100644
--- a/Makefile
+++ b/Makefile
@@ -246,9 +246,9 @@ docker-push:
@${OC} get project ${NAMESPACE} > /dev/null
.openshift-find-addons: .openshift-validate
- @$(eval JAEGER_URL ?= $(shell echo http://$$(${OC} get svc tracing -n istio-system -o jsonpath='{.spec.clusterIP}'):80))
+ @$(eval JAEGER_URL ?= $(shell echo http://`${OC} get svc tracing -n istio-system -o jsonpath='{.spec.clusterIP}'`:80))
@echo "Found Jaeger at: ${JAEGER_URL}"
- @$(eval GRAFANA_URL ?= $(shell echo http://$$(${OC} get svc grafana -n istio-system -o jsonpath='{.spec.clusterIP}'):3000))
+ @$(eval GRAFANA_URL ?= $(shell echo http://`${OC} get svc grafana -n istio-system -o jsonpath='{.spec.clusterIP}'`:3000))
@echo "Found Grafana at: ${GRAFANA_URL}"
## openshift-deploy: Deploy docker image in Openshift project.
@@ -278,9 +278,9 @@ openshift-reload-image: .openshift-validate
@${KUBECTL} get namespace ${NAMESPACE} > /dev/null
.k8s-find-addons: .k8s-validate
- @$(eval JAEGER_URL ?= $(shell echo http://$$(${KUBECTL} get svc tracing -n istio-system -o jsonpath='{.spec.clusterIP}'):80))
+ @$(eval JAEGER_URL ?= $(shell echo http://`${KUBECTL} get svc tracing -n istio-system -o jsonpath='{.spec.clusterIP}'`:80))
@echo "Found Jaeger at: ${JAEGER_URL}"
- @$(eval GRAFANA_URL ?= $(shell echo http://$$(${KUBECTL} get svc grafana -n istio-system -o jsonpath='{.spec.clusterIP}'):3000))
+ @$(eval GRAFANA_URL ?= $(shell echo http://`${KUBECTL} get svc grafana -n istio-system -o jsonpath='{.spec.clusterIP}'`:3000))
@echo "Found Grafana at: ${GRAFANA_URL}" |
Mine is also: GNU Make 3.82 |
But the workaround did not help. Building on CentOS machines. |
I just tried on a CentOS container (CentOS 7.6.1810) - and it works for me. I git cloned the kiali repo and ran "make .openshift-find-addons" and "make .k8s-find-addons" and it works. I don't have true "oc" or "kubectl" in my CentOS for this test; I just have a dummy "oc" and "kubectl" scripts that spit out "127.0.0.2" - but this should be OK, we just want to see the .openshift-find-addons and .k8s-find-addons targets run successfully:
|
This just changes the Makefile, and so only affects devs.
The defaults for the addon URLs are not necessarily correct (for me, they are never correct). This changes the Makefile to more accurately get the Jaeger and Grafana URLs.