@@ -7,14 +7,16 @@ CACHE_BIN ?= $(CURDIR)/bin
77LOCALBIN ?= $(CACHE_BIN )
88
99DEVBOX_BIN ?= $(DEVBOX_PACKAGES_DIR ) /bin
10+ HELM ?= $(LOCALBIN ) /helm
11+ HELM_VERSION ?= v3.16.3
1012
1113# ####################################################################
1214# Dev Setup
1315# ####################################################################
1416CLUSTER_NAME ?= ccm-$(shell git rev-parse --short HEAD)
1517K8S_VERSION ?= "v1.29.1"
1618CAPI_VERSION ?= "v1.6.3"
17- HELM_VERSION ?= "v0.2.1"
19+ CAAPH_VERSION ?= "v0.2.1"
1820CAPL_VERSION ?= "v0.7.1"
1921CONTROLPLANE_NODES ?= 1
2022WORKER_NODES ?= 1
@@ -55,10 +57,15 @@ vet: fmt
5557
5658.PHONY : lint
5759lint :
58- docker run --rm -v " $( shell pwd) :/var/work:ro" -w /var/work \
59- golangci/golangci-lint:v1.57.2 golangci-lint run -v --timeout=5m
60- docker run --rm -v " $( shell pwd) :/var/work:ro" -w /var/work/e2e \
61- golangci/golangci-lint:v1.57.2 golangci-lint run -v --timeout=5m
60+ docker run --rm -v " $( PWD) :/var/work:ro" -w /var/work \
61+ golangci/golangci-lint:latest golangci-lint run -v --timeout=5m
62+ docker run --rm -v " $( PWD) :/var/work:ro" -w /var/work/e2e \
63+ golangci/golangci-lint:latest golangci-lint run -v --timeout=5m
64+
65+ .PHONY : gosec
66+ gosec : # # Run gosec against code.
67+ docker run --rm -v " $( PWD) :/var/work:ro" -w /var/work securego/gosec:2.19.0 \
68+ -exclude-dir=bin -exclude-generated ./...
6269
6370.PHONY : fmt
6471fmt :
@@ -150,13 +157,14 @@ create-capl-cluster:
150157 kubectl wait --for=condition=NodeHealthy=true machines -l cluster.x-k8s.io/cluster-name=$(CLUSTER_NAME ) --timeout=900s
151158 clusterctl get kubeconfig $(CLUSTER_NAME ) > $(KUBECONFIG_PATH )
152159 KUBECONFIG=$(KUBECONFIG_PATH ) kubectl wait --for=condition=Ready nodes --all --timeout=600s
153- # Remove all taints so that pods can be scheduled anywhere (without this, some tests fail)
160+ # Remove all taints from control plane node so that pods scheduled on it by tests can run (without this, some tests fail)
154161 KUBECONFIG=$(KUBECONFIG_PATH ) kubectl taint nodes -l node-role.kubernetes.io/control-plane node-role.kubernetes.io/control-plane-
155162
156163.PHONY : patch-linode-ccm
157164patch-linode-ccm :
158165 KUBECONFIG=$(KUBECONFIG_PATH ) kubectl patch -n kube-system daemonset ccm-linode --type=' json' -p=" [{'op': 'replace', 'path': '/spec/template/spec/containers/0/image', 'value': '${IMG} '}]"
159166 KUBECONFIG=$(KUBECONFIG_PATH ) kubectl rollout status -n kube-system daemonset/ccm-linode --timeout=600s
167+ KUBECONFIG=$(KUBECONFIG_PATH ) kubectl -n kube-system get daemonset/ccm-linode -o yaml
160168
161169.PHONY : mgmt-cluster
162170mgmt-cluster :
@@ -166,7 +174,7 @@ mgmt-cluster:
166174 --wait-providers \
167175 --wait-provider-timeout 600 \
168176 --core cluster-api:$(CAPI_VERSION ) \
169- --addon helm:$(HELM_VERSION ) \
177+ --addon helm:$(CAAPH_VERSION ) \
170178 --infrastructure linode-linode:$(CAPL_VERSION )
171179
172180.PHONY : cleanup-cluster
@@ -197,9 +205,6 @@ else ifeq ($(ARCH_SHORT),aarch64)
197205ARCH_SHORT := arm64
198206endif
199207
200- HELM ?= $(LOCALBIN ) /helm
201- HELM_VERSION ?= v3.9.1
202-
203208.PHONY : helm
204209helm : $(HELM ) # # Download helm locally if necessary
205210$(HELM ) : $(LOCALBIN )
0 commit comments