@@ -20,6 +20,7 @@ REGISTRY_NAMESPACE=rukpak-e2e
20
20
DNS_NAME =$(REGISTRY_NAME ) .$(REGISTRY_NAMESPACE ) .svc.cluster.local
21
21
22
22
CONTAINER_RUNTIME ?= docker
23
+ KUBECTL ?= kubectl
23
24
24
25
# kernel-style V=1 build verbosity
25
26
ifeq ("$(origin V ) ", "command line")
@@ -106,7 +107,7 @@ kind-cluster: kind kind-cluster-cleanup ## Standup a kind cluster
106
107
kind-cluster-cleanup : kind # # Delete the kind cluster
107
108
$(KIND ) delete cluster --name ${KIND_CLUSTER_NAME}
108
109
109
- image-registry : # # Setup in-cluster image registry
110
+ image-registry : # # Setup in-cluster image registry
110
111
./tools/imageregistry/setup_imageregistry.sh ${KIND_CLUSTER_NAME}
111
112
112
113
# ##################
@@ -119,22 +120,22 @@ image-registry: ## Setup in-cluster image registry
119
120
install : generate cert-mgr install-manifests wait # # Install rukpak
120
121
121
122
install-manifests :
122
- kubectl apply -k manifests
123
+ $( KUBECTL ) apply -k manifests
123
124
124
125
wait :
125
- kubectl wait --for=condition=Available --namespace=$(RUKPAK_NAMESPACE ) deployment/core --timeout=60s
126
- kubectl wait --for=condition=Available --namespace=$(RUKPAK_NAMESPACE ) deployment/rukpak-webhooks --timeout=60s
127
- kubectl wait --for=condition=Available --namespace=$(RUKPAK_NAMESPACE ) deployment/helm-provisioner --timeout=60s
128
- kubectl wait --for=condition=Available --namespace=crdvalidator-system deployment/crd-validation-webhook --timeout=60s
126
+ $( KUBECTL ) wait --for=condition=Available --namespace=$(RUKPAK_NAMESPACE ) deployment/core --timeout=60s
127
+ $( KUBECTL ) wait --for=condition=Available --namespace=$(RUKPAK_NAMESPACE ) deployment/rukpak-webhooks --timeout=60s
128
+ $( KUBECTL ) wait --for=condition=Available --namespace=$(RUKPAK_NAMESPACE ) deployment/helm-provisioner --timeout=60s
129
+ $( KUBECTL ) wait --for=condition=Available --namespace=crdvalidator-system deployment/crd-validation-webhook --timeout=60s
129
130
130
131
run : build-container kind-cluster kind-load install # # Build image, stop/start a local kind cluster, and run operator in that cluster
131
132
132
133
cert-mgr : # # Install the certification manager
133
- kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/$(CERT_MGR_VERSION ) /cert-manager.yaml
134
- kubectl wait --for=condition=Available --namespace=cert-manager deployment/cert-manager-webhook --timeout=60s
134
+ $( KUBECTL ) apply -f https://github.com/cert-manager/cert-manager/releases/download/$(CERT_MGR_VERSION ) /cert-manager.yaml
135
+ $( KUBECTL ) wait --for=condition=Available --namespace=cert-manager deployment/cert-manager-webhook --timeout=60s
135
136
136
137
uninstall : # # Remove all rukpak resources from the cluster
137
- kubectl delete -k manifests
138
+ $( KUBECTL ) delete -k manifests
138
139
139
140
# #################
140
141
# Build and Load #
@@ -204,7 +205,7 @@ release: goreleaser substitute ## Run goreleaser
204
205
205
206
quickstart : VERSION ?= $(shell git describe --abbrev=0 --tags)
206
207
quickstart : generate # # Generate the installation release manifests
207
- kubectl kustomize manifests | sed " s/:latest/:$( VERSION) /g" > rukpak.yaml
208
+ $( KUBECTL ) kustomize manifests | sed " s/:latest/:$( VERSION) /g" > rukpak.yaml
208
209
209
210
# ###############
210
211
# Hack / Tools #
@@ -242,4 +243,3 @@ $(GORELEASER): $(TOOLS_DIR)/go.mod # Build goreleaser from tools folder.
242
243
cd $(TOOLS_DIR ) ; go build -tags=tools -o $(BIN_DIR ) /goreleaser github.com/goreleaser/goreleaser
243
244
$(KIND ) : $(TOOLS_DIR ) /go.mod
244
245
cd $(TOOLS_DIR ) ; go build -tags=tools -o $(BIN_DIR ) /kind sigs.k8s.io/kind
245
-
0 commit comments