-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.custom.mk
37 lines (28 loc) · 1.16 KB
/
Makefile.custom.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
SHELL:=/usr/bin/env bash
# Kind cluster name to use
KIND_CLUSTER_NAME ?= "kyverno-cluster"
# These values should be set by the outer environment / CircleCI environment config.
KUBERNETES_VERSION ?= v1.29.8
KYVERNO_VERSION ?= v1.12.6
##@ Test
.PHONY: clean
clean: ## Delete test manifests from kind cluster.
./hack/cleanup-local.sh
.PHONY: kind-create
kind-create: ## create kind cluster if needed
KIND_CLUSTER_NAME=$(KIND_CLUSTER_NAME) ./hack/kind-with-registry.sh
./hack/setup-kind.sh
.PHONY: tilt-up
tilt-up: ## Start Tilt
tilt up
# If you change kyverno version here remember to change it in the Tiltfile too
.PHONY: install-kyverno
install-kyverno:
kubectl create --context kind-$(KIND_CLUSTER_NAME) -f https://github.com/kyverno/kyverno/releases/download/$(KYVERNO_VERSION)/install.yaml
kubectl wait --context kind-$(KIND_CLUSTER_NAME) --for=condition=ready pod -l app.kubernetes.io/name=kyverno -l app.kubernetes.io/component=admission-controller -nkyverno
.PHONY: kind-get-kubeconfig
kind-get-kubeconfig:
kind get kubeconfig --name $(KIND_CLUSTER_NAME) > $(PWD)/kube.config
.PHONY: dabs
dabs: # generate
dabs.sh --generate-metadata --chart-dir helm/kyverno-policies