Skip to content

Commit

Permalink
Merge pull request #1017 from syself/kr/update-helm-makefile
Browse files Browse the repository at this point in the history
🌱 add helm target to Makefile
  • Loading branch information
kranurag7 authored Oct 22, 2023
2 parents c30f29b + 8d0e6f8 commit 7e804de
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,15 @@ $(CTLPTL):
CLUSTERCTL := $(abspath $(TOOLS_BIN_DIR)/clusterctl)
clusterctl: $(CLUSTERCTL) ## Build a local copy of clusterctl
$(CLUSTERCTL):
curl -sSLf https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.0/clusterctl-$$(go env GOOS)-$$(go env GOARCH) -o $(CLUSTERCTL)
curl -sSLf https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.2/clusterctl-$$(go env GOOS)-$$(go env GOARCH) -o $(CLUSTERCTL)
chmod a+rx $(CLUSTERCTL)

HELM := $(abspath $(TOOLS_BIN_DIR)/helm)
helm: $(HELM) ## Build a local copy of helm
$(HELM):
curl -sSL https://get.helm.sh/helm-v3.13.1-linux-amd64.tar.gz | tar xz -C $(TOOLS_BIN_DIR) --strip-components=1 linux-amd64/helm
chmod a+rx $(HELM)

KIND := $(abspath $(TOOLS_BIN_DIR)/kind)
kind: $(KIND) ## Build a local copy of kind
$(KIND):
Expand All @@ -147,7 +153,7 @@ gotestsum: $(GOTESTSUM) # Build gotestsum from tools folder.
$(GOTESTSUM):
go install gotest.tools/gotestsum@v1.10.0

all-tools: $(GOTESTSUM) $(go-cover-treemap) $(go-binsize-treemap) $(KIND) $(KUBECTL) $(CLUSTERCTL) $(CTLPTL) $(SETUP_ENVTEST) $(ENVSUBST) $(KUSTOMIZE) $(CONTROLLER_GEN)
all-tools: $(GOTESTSUM) $(go-cover-treemap) $(go-binsize-treemap) $(KIND) $(KUBECTL) $(CLUSTERCTL) $(CTLPTL) $(SETUP_ENVTEST) $(ENVSUBST) $(KUSTOMIZE) $(CONTROLLER_GEN) $(HELM)
echo 'done'

##@ Development
Expand Down Expand Up @@ -182,16 +188,16 @@ wait-and-get-secret:

install-cilium-in-wl-cluster:
# Deploy cilium
helm repo add cilium https://helm.cilium.io/
helm repo update cilium
KUBECONFIG=$(WORKER_CLUSTER_KUBECONFIG) helm upgrade --install cilium cilium/cilium --version 1.12.2 \
$(HELM) repo add cilium https://helm.cilium.io/
$(HELM) repo update cilium
KUBECONFIG=$(WORKER_CLUSTER_KUBECONFIG) $(HELM) upgrade --install cilium cilium/cilium --version 1.12.2 \
--namespace kube-system \
-f templates/cilium/cilium.yaml

install-ccm-in-wl-cluster:
helm repo add syself https://charts.syself.com
helm repo update syself
KUBECONFIG=$(WORKER_CLUSTER_KUBECONFIG) helm upgrade --install ccm syself/ccm-hetzner --version 1.1.10 \
$(HELM) repo add syself https://charts.syself.com
$(HELM) repo update syself
KUBECONFIG=$(WORKER_CLUSTER_KUBECONFIG) $(HELM) upgrade --install ccm syself/ccm-hetzner --version 1.1.10 \
--namespace kube-system \
--set privateNetwork.enabled=$(PRIVATE_NETWORK)
@echo 'run "kubectl --kubeconfig=$(WORKER_CLUSTER_KUBECONFIG) ..." to work with the new target cluster'
Expand Down

0 comments on commit 7e804de

Please sign in to comment.