-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.custom.mk
47 lines (35 loc) · 1.18 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
38
39
40
41
42
43
44
45
46
47
SHELL:=/usr/bin/env bash
# Kind cluster name to use
KIND_CLUSTER_NAME ?= "kyverno-cluster"
# If not already set through env
KUBERNETES_VERSION ?= v1.21.1
##@ Generate
.PHONY: generate
generate: ## Replace variables on Helm manifests.
./hack/template.sh
.PHONY: verify
verify:
@$(MAKE) generate
git diff --exit-code
##@ 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://raw.githubusercontent.com/kyverno/kyverno/v1.5.1/definitions/release/install.yaml
kubectl wait --context kind-$(KIND_CLUSTER_NAME) --for=condition=ready pod -l app=kyverno -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-dx