Skip to content

Commit

Permalink
Don't evaluate COREDNS IP too early
Browse files Browse the repository at this point in the history
kubectl context is not yet established during initialization. Revert
K8GB_COREDNS_IP to command to be executed rather than commands result.

Fixes #770

Signed-off-by: Dinar Valeev <dinar.valeev@absa.africa>
  • Loading branch information
k0da committed Nov 25, 2021
1 parent f2729ad commit cc51976
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ REPO = absaoss/k8gb
VALUES_YAML ?= ""
PODINFO_IMAGE_REPO ?= ghcr.io/stefanprodan/podinfo
HELM_ARGS ?=
K8GB_COREDNS_IP ?= $(shell kubectl get svc k8gb-coredns -n k8gb -o custom-columns='IP:spec.clusterIP' --no-headers)
K8GB_COREDNS_IP ?= kubectl get svc k8gb-coredns -n k8gb -o custom-columns='IP:spec.clusterIP' --no-headers
LOG_FORMAT ?= simple
LOG_LEVEL ?= debug
CONTROLLER_GEN_VERSION ?= v0.7.0
Expand Down Expand Up @@ -479,7 +479,7 @@ endef

define hit-testapp-host
kubectl run -it --rm busybox --restart=Never --image=busybox --command \
--overrides='{"spec": {"dnsConfig": {"nameservers": ["$(K8GB_COREDNS_IP)"]}, \"dnsPolicy\": \"None\"}}' \
--overrides "{\"spec\":{\"dnsConfig\":{\"nameservers\":[\"$(shell $(K8GB_COREDNS_IP))\"]},\"dnsPolicy\":\"None\"}}" \
-- wget -qO - $1
endef

Expand Down

0 comments on commit cc51976

Please sign in to comment.