Skip to content

Commit

Permalink
fix(install): avoid kubectl execution on Makefile evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
gansheer committed Jul 4, 2024
1 parent 54b82ea commit efd5a8a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions script/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,6 @@ $(GOIMPORT): $(LOCALBIN)
#####

KUSTOMIZE_DIR = "install/overlays/kubernetes/descoped"
MINIKUBE_REGISTRY = "$(shell kubectl -n kube-system get service registry -o jsonpath='{.spec.clusterIP}' 2> /dev/null)"
DEFAULT_NS = "camel-k"

.PHONY: install install-k8s-global install-k8s-ns install-openshift-global install-openshift-ns
Expand Down Expand Up @@ -787,8 +786,8 @@ ifdef REGISTRY
@sed -i 's/address: .*/address: $(REGISTRY)/' $(KUST_TMP)/install/overlays/platform/integration-platform.yaml
kubectl apply -k $(KUST_TMP)/install/overlays/platform --server-side -n $(NAMESPACE) --force-conflicts
else
# verify if a minikube registry is existing by any chance, and set it automatically in such a case
ifneq ($(MINIKUBE_REGISTRY), "")
$(eval MINIKUBE_REGISTRY=$(shell kubectl -n kube-system get service registry -o jsonpath='{.spec.clusterIP}' 2> /dev/null))
ifneq ($(MINIKUBE_REGISTRY),"")
@echo "INFO: Looks like you're on Minikube. Setting IntegrationPlatform container registry to $(MINIKUBE_REGISTRY)"
@sed -i 's/address: .*/address: $(MINIKUBE_REGISTRY)/' $(KUST_TMP)/install/overlays/platform/integration-platform.yaml
kubectl apply -k $(KUST_TMP)/install/overlays/platform --server-side -n $(NAMESPACE) --force-conflicts
Expand Down

0 comments on commit efd5a8a

Please sign in to comment.