diff --git a/Makefile b/Makefile index 70c24acb09..d7414fc404 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,7 @@ REGISTRY ?= ghcr.io REPO ?= kyverno KIND_IMAGE ?= kindest/node:v1.27.3 KIND_NAME ?= kind +KIND_CONFIG ?= default GOOS ?= $(shell go env GOOS) GOARCH ?= $(shell go env GOARCH) KOCACHE ?= /tmp/ko-cache @@ -794,7 +795,7 @@ docker-save-image-all: $(KIND) image-build-all ## Save docker images in archive .PHONY: kind-create-cluster kind-create-cluster: $(KIND) ## Create kind cluster @echo Create kind cluster... >&2 - @$(KIND) create cluster --name $(KIND_NAME) --image $(KIND_IMAGE) --config ./scripts/config/kind.yaml + @$(KIND) create cluster --name $(KIND_NAME) --image $(KIND_IMAGE) --config ./scripts/config/kind/$(KIND_CONFIG).yaml .PHONY: kind-delete-cluster kind-delete-cluster: $(KIND) ## Delete kind cluster diff --git a/scripts/config/kind.yaml b/scripts/config/kind/default.yaml similarity index 100% rename from scripts/config/kind.yaml rename to scripts/config/kind/default.yaml diff --git a/scripts/config/kind/vap.yaml b/scripts/config/kind/vap.yaml new file mode 100644 index 0000000000..b6d1c2a070 --- /dev/null +++ b/scripts/config/kind/vap.yaml @@ -0,0 +1,40 @@ +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +featureGates: + ValidatingAdmissionPolicy: true +runtimeConfig: + admissionregistration.k8s.io/v1alpha1: true +kubeadmConfigPatches: + - |- + kind: ClusterConfiguration + controllerManager: + extraArgs: + bind-address: 0.0.0.0 + etcd: + local: + extraArgs: + listen-metrics-urls: http://0.0.0.0:2382 + scheduler: + extraArgs: + bind-address: 0.0.0.0 + - |- + kind: KubeProxyConfiguration + metricsBindAddress: 0.0.0.0 +nodes: + - role: control-plane + kubeadmConfigPatches: + - |- + kind: InitConfiguration + nodeRegistration: + kubeletExtraArgs: + node-labels: "ingress-ready=true" + extraPortMappings: + - containerPort: 80 + hostPort: 80 + protocol: TCP + - containerPort: 443 + hostPort: 443 + protocol: TCP + - role: worker + - role: worker + - role: worker