1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-15 17:51:20 +00:00

chore: add support for different kind config (#8079)

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
Charles-Edouard Brétéché 2023-08-21 15:56:57 +02:00 committed by GitHub
parent 794dc782bd
commit 67151888d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 42 additions and 1 deletions

View file

@ -9,6 +9,7 @@ REGISTRY ?= ghcr.io
REPO ?= kyverno REPO ?= kyverno
KIND_IMAGE ?= kindest/node:v1.27.3 KIND_IMAGE ?= kindest/node:v1.27.3
KIND_NAME ?= kind KIND_NAME ?= kind
KIND_CONFIG ?= default
GOOS ?= $(shell go env GOOS) GOOS ?= $(shell go env GOOS)
GOARCH ?= $(shell go env GOARCH) GOARCH ?= $(shell go env GOARCH)
KOCACHE ?= /tmp/ko-cache 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 .PHONY: kind-create-cluster
kind-create-cluster: $(KIND) ## Create kind cluster kind-create-cluster: $(KIND) ## Create kind cluster
@echo Create kind cluster... >&2 @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 .PHONY: kind-delete-cluster
kind-delete-cluster: $(KIND) ## Delete kind cluster kind-delete-cluster: $(KIND) ## Delete kind cluster

View file

@ -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