File tree 4 files changed +14
-31
lines changed
4 files changed +14
-31
lines changed Original file line number Diff line number Diff line change 47
47
with :
48
48
go-version : " ~1.21.3"
49
49
50
- - name : " install kuttl"
51
- run : ./hack/install-kuttl.sh
52
-
53
50
- name : " run tests"
54
51
env :
55
52
KUBE_VERSION : ${{ matrix.kube-version }}
Original file line number Diff line number Diff line change @@ -27,21 +27,13 @@ jobs:
27
27
with :
28
28
go-version : " ~1.21.1"
29
29
30
- - name : Setup kind
31
- env :
32
- KIND_VERSION : " 0.20.0"
33
- run : go install sigs.k8s.io/kind@v${KIND_VERSION}
34
-
35
30
- name : Check out code into the Go module directory
36
31
uses : actions/checkout@v4
37
32
38
- - name : " install kuttl and kind"
39
- run : ./hack/install-kuttl.sh
40
-
41
33
- name : " start kind"
42
34
env :
43
35
KUBE_VERSION : ${{ matrix.kube-version }}
44
- run : kind create cluster --config kind-$KUBE_VERSION.yaml
36
+ run : make start- kind
45
37
46
38
- name : " wait until cluster is ready"
47
39
run : kubectl wait --timeout=5m --for=condition=available deployment/coredns -n kube-system
Original file line number Diff line number Diff line change @@ -356,6 +356,7 @@ cmctl:
356
356
357
357
KUSTOMIZE ?= $(LOCALBIN ) /kustomize
358
358
KIND ?= $(LOCALBIN ) /kind
359
+ KUTTL ?= $(LOCALBIN ) /kubectl-kuttl
359
360
CONTROLLER_GEN ?= $(LOCALBIN ) /controller-gen
360
361
ENVTEST ?= $(LOCALBIN ) /setup-envtest
361
362
CHLOGGEN ?= $(LOCALBIN ) /chloggen
@@ -365,6 +366,7 @@ KUSTOMIZE_VERSION ?= v5.0.3
365
366
CONTROLLER_TOOLS_VERSION ?= v0.12.0
366
367
GOLANGCI_LINT_VERSION ?= v1.54.0
367
368
KIND_VERSION ?= v0.20.0
369
+ KUTTL_VERSION ?= 0.15.0
368
370
369
371
370
372
.PHONY : kustomize
@@ -411,22 +413,7 @@ endef
411
413
412
414
.PHONY : kuttl
413
415
kuttl :
414
- ifeq (, $(shell which kubectl-kuttl) )
415
- echo ${PATH}
416
- ls -l /usr/local/bin
417
- which kubectl-kuttl
418
-
419
- @{ \
420
- set -e ;\
421
- echo "" ;\
422
- echo "ERROR: kuttl not found." ;\
423
- echo "Please check https://kuttl.dev/docs/cli.html for installation instructions and try again." ;\
424
- echo "" ;\
425
- exit 1 ;\
426
- }
427
- else
428
- KUTTL =$(shell which kubectl-kuttl)
429
- endif
416
+ @KUTTL=$(KUTTL ) KUTTL_VERSION=$(KUTTL_VERSION ) ./hack/install-kuttl.sh
430
417
431
418
OPERATOR_SDK = $(shell pwd) /bin/operator-sdk
432
419
.PHONY : operator-sdk
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- sudo curl -Lo /usr/local/bin/kubectl-kuttl https://github.com/kudobuilder/kuttl/releases/download/v0.15.0/kubectl-kuttl_0.15.0_linux_x86_64
4
- sudo chmod +x /usr/local/bin/kubectl-kuttl
5
- export PATH=$PATH :/usr/local/bin
3
+ if (${KUTTL} version | grep ${KUTTL_VERSION} ) > /dev/null 2>&1 ; then
4
+ exit 0;
5
+ fi
6
+
7
+ OS=$( go env GOOS)
8
+ ARCH=$( uname -m)
9
+
10
+ curl -Lo ${KUTTL} https://github.com/kudobuilder/kuttl/releases/download/v${KUTTL_VERSION} /kubectl-kuttl_${KUTTL_VERSION} _${OS} _${ARCH}
11
+ chmod +x ${KUTTL}
12
+
You can’t perform that action at this time.
0 commit comments