-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.custom.mk
48 lines (36 loc) · 1.23 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
48
SHELL:=/usr/bin/env bash
# Kind cluster name to use
KIND_CLUSTER_NAME ?= kyverno-cluster
# If not already set through env
KUBERNETES_VERSION ?= v1.29.10
KYVERNO_VERSION ?= v1.12.6
##@ 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://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/instance=kyverno -n kyverno
.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-ux