Skip to content

Commit 1f2f07a

Browse files
committed
chore(ci): Makefile - updates and targets
- update k8s to 1.31.2 - cilium to 1.16.3 - fix quickstart - split out quickstart into separate targets - move quickstart help into its own help section - add minikube delete
1 parent 4aee7f0 commit 1f2f07a

File tree

2 files changed

+27
-18
lines changed

2 files changed

+27
-18
lines changed

Makefile

+26-17
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ CONTAINER_TOOL ?= docker
2828
SHELL = /usr/bin/env bash -o pipefail
2929
.SHELLFLAGS = -ec
3030

31-
K8S_VERSION ?= 1.31.1
32-
CILIUM_VERSION ?= 1.16.2
31+
K8S_VERSION ?= 1.31.2
32+
CILIUM_VERSION ?= 1.16.3
3333

3434
V ?= 0
3535
ifeq ($(V), 1)
@@ -173,6 +173,29 @@ deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in
173173
undeploy: kustomize ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
174174
$(KUSTOMIZE) build config/default | $(KUBECTL) delete --ignore-not-found=$(ignore-not-found) -f -
175175

176+
##@ Quickstart
177+
178+
.PHONY: minikube
179+
minikube: ## Spool up a local minikube cluster for development
180+
$QK8S_VERSION=$(K8S_VERSION) \
181+
CILIUM_VERSION=$(CILIUM_VERSION) \
182+
CERTMANAGER_VERSION=$(CERTMANAGER_VERSION) \
183+
TLS=$(TLS) \
184+
PROMETHEUS=$(PROMETHEUS) \
185+
hack/minikube.sh
186+
187+
.PHONY: quickstart install-operator install-cr
188+
quickstart: minikube install-operator install-cr ## Install the operator into the minikube cluster and deploy the sample CR use the TLS and PROMETHEUS variables to enable those features
189+
190+
install-operator: ## Install the operator into the minikube cluster
191+
$QLATEST=$(shell curl -s https://api.github.com/repos/hyperspike/valkey-operator/releases/latest | jq -Mr .tag_name) \
192+
&& curl -sL https://github.com/hyperspike/valkey-operator/releases/download/$$LATEST/install.yaml | kubectl apply -f -
193+
install-cr: ## Install the sample CR into the minikube cluster
194+
$Q(if [ ! -z $$TLS ] ; then TLS_VALUE=true ; else TLS_VALUE=false ; fi ; if [ ! -z $$PROMETHEUS ] ; then PROMETHEUS_VALUE=true ; else PROMETHEUS_VALUE=false ; fi ; sed -e "s/@TLS@/$$TLS_VALUE/" -e "s/@PROMETHEUS@/$$PROMETHEUS_VALUE/" valkey.yml.tpl | $(KUBECTL) apply -f - )
195+
196+
minikube-delete: ## Delete the minikube cluster
197+
$Qminikube delete -p north
198+
176199
##@ Dependencies
177200

178201
## Location to install dependencies to
@@ -211,21 +234,7 @@ helm-package: helm-gen helm ## Package Helm chart
211234
helm-publish: helm-package ## Publish Helm chart
212235
$Q$(HELM) push valkey-operator-$(VERSION)-chart.tgz oci://ghcr.io/hyperspike
213236

214-
.PHONY: minikube tunnel registry-proxy prometheus-proxy
215-
minikube: ## Spool up a local minikube cluster for development
216-
$QK8S_VERSION=$(K8S_VERSION) \
217-
CILIUM_VERSION=$(CILIUM_VERSION) \
218-
CERTMANAGER_VERSION=$(CERTMANAGER_VERSION) \
219-
TLS=$(TLS) \
220-
PROMETHEUS=$(PROMETHEUS) \
221-
hack/minikube.sh
222-
223-
.PHONY: quickstart
224-
quickstart: minikube ## Install the operator into the minikube cluster and deploy the sample CR use the TLS and PROMETHEUS variables to enable those features
225-
$QLATEST=$(curl -s https://api.github.com/repos/hyperspike/valkey-operator/releases/latest | jq -cr .tag_name) \
226-
&& curl -sL https://github.com/hyperspike/valkey-operator/releases/download/$$LATEST/install.yaml | kubectl create -f -
227-
$Q(if [ ! -z $$TLS ] ; then TLS_VALUE=true ; else TLS_VALUE=false ; fi ; if [ ! -z $$PROMETHEUS ] ; then PROMETHEUS_VALUE=true ; else PROMETHEUS_VALUE=false ; fi ; sed -e "s/@TLS@/$$TLS_VALUE/" -e "s/@PROMETHEUS@/$$PROMETHEUS_VALUE/" valkey.yml.tpl | $(KUBECTL) apply -f - )
228-
237+
.PHONY: tunnel registry-proxy prometheus-proxy
229238
tunnel: ## turn on minikube's tunnel to test ingress and get UI access
230239
$Q$(MINIKUBE) tunnel -p north
231240

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ make quickstart TLS=1 PROMETHEUS=1
3232
### To Uninstall
3333

3434
```sh
35-
minikube delete -p north
35+
make minikube-delete
3636
```
3737

3838

0 commit comments

Comments
 (0)