Skip to content

Commit

Permalink
Kyverno 1.12.5 (#673)
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Jogeleit <[email protected]>
  • Loading branch information
fjogeleit authored Jul 22, 2024
1 parent ac29e22 commit 2c2f16a
Show file tree
Hide file tree
Showing 708 changed files with 237,135 additions and 211,789 deletions.
1 change: 1 addition & 0 deletions .github/workflows/push-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- release-1.12

permissions:
id-token: write
Expand Down
65 changes: 33 additions & 32 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
# DEFAULTS #
############

KIND_IMAGE ?= kindest/node:v1.28.0
KIND_IMAGE ?= kindest/node:v1.29.2
KIND_NAME ?= kind
KYVERNO_VERSION ?= v1.11.0
KYVERNO_VERSION ?= v1.12.5
KOCACHE ?= /tmp/ko-cache
USE_CONFIG ?= standard,no-ingress,in-cluster,all-read-rbac
KUBECONFIG ?= ""
PIP ?= "pip3"

#############
# VARIABLES #
Expand Down Expand Up @@ -43,18 +42,19 @@ endif
#########

TOOLS_DIR := $(PWD)/.tools
CURRENT_DIR := $(PWD)
HELM := $(TOOLS_DIR)/helm
HELM_VERSION := v3.10.1
HELM_VERSION := v3.14.0
KIND := $(TOOLS_DIR)/kind
KIND_VERSION := v0.20.0
KIND_VERSION := v0.22.0
KO := $(TOOLS_DIR)/ko
KO_VERSION := v0.14.1
KO_VERSION := v0.15.2
HELM_DOCS := $(TOOLS_DIR)/helm-docs
HELM_DOCS_VERSION := v1.11.0
HELM_DOCS_VERSION := v1.13.1
GCI := $(TOOLS_DIR)/gci
GCI_VERSION := v0.9.1
GCI_VERSION := v0.13.4
GOFUMPT := $(TOOLS_DIR)/gofumpt
GOFUMPT_VERSION := v0.4.0
GOFUMPT_VERSION := v0.6.0
TOOLS := $(KIND) $(HELM) $(KO) $(HELM_DOCS) $(GCI) $(GOFUMPT)

$(HELM):
Expand Down Expand Up @@ -119,32 +119,33 @@ codegen-schema-openapi: $(KIND) $(HELM) ## Generate openapi schemas (v2 and v3)
@mkdir -p ./schemas/openapi/v3/apis/kyverno.io
@mkdir -p ./schemas/openapi/v3/apis/admissionregistration.k8s.io
@$(KIND) create cluster --name schema --image $(KIND_IMAGE) --config ./scripts/config/kind.yaml
@kubectl create -f https://raw.githubusercontent.com/kyverno/kyverno/$(KYVERNO_VERSION)/config/crds/kyverno.io_admissionreports.yaml
@kubectl create -f https://raw.githubusercontent.com/kyverno/kyverno/$(KYVERNO_VERSION)/config/crds/kyverno.io_backgroundscanreports.yaml
@kubectl create -f https://raw.githubusercontent.com/kyverno/kyverno/$(KYVERNO_VERSION)/config/crds/kyverno.io_cleanuppolicies.yaml
@kubectl create -f https://raw.githubusercontent.com/kyverno/kyverno/$(KYVERNO_VERSION)/config/crds/kyverno.io_clusteradmissionreports.yaml
@kubectl create -f https://raw.githubusercontent.com/kyverno/kyverno/$(KYVERNO_VERSION)/config/crds/kyverno.io_clusterbackgroundscanreports.yaml
@kubectl create -f https://raw.githubusercontent.com/kyverno/kyverno/$(KYVERNO_VERSION)/config/crds/kyverno.io_clustercleanuppolicies.yaml
@kubectl create -f https://raw.githubusercontent.com/kyverno/kyverno/$(KYVERNO_VERSION)/config/crds/kyverno.io_clusterpolicies.yaml
@kubectl create -f https://raw.githubusercontent.com/kyverno/kyverno/$(KYVERNO_VERSION)/config/crds/kyverno.io_policies.yaml
@kubectl create -f https://raw.githubusercontent.com/kyverno/kyverno/$(KYVERNO_VERSION)/config/crds/kyverno.io_policyexceptions.yaml
@kubectl create -f https://raw.githubusercontent.com/kyverno/kyverno/$(KYVERNO_VERSION)/config/crds/kyverno.io_updaterequests.yaml
@kubectl create -f https://raw.githubusercontent.com/kyverno/kyverno/$(KYVERNO_VERSION)/config/crds/wgpolicyk8s.io_clusterpolicyreports.yaml
@kubectl create -f https://raw.githubusercontent.com/kyverno/kyverno/$(KYVERNO_VERSION)/config/crds/wgpolicyk8s.io_policyreports.yaml
@kubectl create -f https://raw.githubusercontent.com/kyverno/kyverno/$(KYVERNO_VERSION)/config/crds/kyverno/kyverno.io_admissionreports.yaml
@kubectl create -f https://raw.githubusercontent.com/kyverno/kyverno/$(KYVERNO_VERSION)/config/crds/kyverno/kyverno.io_backgroundscanreports.yaml
@kubectl create -f https://raw.githubusercontent.com/kyverno/kyverno/$(KYVERNO_VERSION)/config/crds/kyverno/kyverno.io_cleanuppolicies.yaml
@kubectl create -f https://raw.githubusercontent.com/kyverno/kyverno/$(KYVERNO_VERSION)/config/crds/kyverno/kyverno.io_clusteradmissionreports.yaml
@kubectl create -f https://raw.githubusercontent.com/kyverno/kyverno/$(KYVERNO_VERSION)/config/crds/kyverno/kyverno.io_clusterbackgroundscanreports.yaml
@kubectl create -f https://raw.githubusercontent.com/kyverno/kyverno/$(KYVERNO_VERSION)/config/crds/kyverno/kyverno.io_clustercleanuppolicies.yaml
@kubectl create -f https://raw.githubusercontent.com/kyverno/kyverno/$(KYVERNO_VERSION)/config/crds/kyverno/kyverno.io_clusterpolicies.yaml
@kubectl create -f https://raw.githubusercontent.com/kyverno/kyverno/$(KYVERNO_VERSION)/config/crds/kyverno/kyverno.io_policies.yaml
@kubectl create -f https://raw.githubusercontent.com/kyverno/kyverno/$(KYVERNO_VERSION)/config/crds/kyverno/kyverno.io_policyexceptions.yaml
@kubectl create -f https://raw.githubusercontent.com/kyverno/kyverno/$(KYVERNO_VERSION)/config/crds/kyverno/kyverno.io_updaterequests.yaml
@kubectl create -f https://raw.githubusercontent.com/kyverno/kyverno/$(KYVERNO_VERSION)/config/crds/policyreport/wgpolicyk8s.io_clusterpolicyreports.yaml
@kubectl create -f https://raw.githubusercontent.com/kyverno/kyverno/$(KYVERNO_VERSION)/config/crds/policyreport/wgpolicyk8s.io_policyreports.yaml
@kubectl create -f https://raw.githubusercontent.com/kyverno/kyverno/$(KYVERNO_VERSION)/config/crds/reports/reports.kyverno.io_clusterephemeralreports.yaml
@kubectl create -f https://raw.githubusercontent.com/kyverno/kyverno/$(KYVERNO_VERSION)/config/crds/reports/reports.kyverno.io_ephemeralreports.yaml
@sleep 15
@kubectl get --raw /openapi/v2 > ./schemas/openapi/v2/schema.json
@kubectl get --raw /openapi/v3/apis/kyverno.io/v1 > ./schemas/openapi/v3/apis/kyverno.io/v1.json
@kubectl get --raw /openapi/v3/apis/kyverno.io/v2beta1 > ./schemas/openapi/v3/apis/kyverno.io/v2beta1.json
@kubectl get --raw /openapi/v3/apis/kyverno.io/v2alpha1 > ./schemas/openapi/v3/apis/kyverno.io/v2alpha1.json
@kubectl get --raw /openapi/v3/apis/admissionregistration.k8s.io/v1alpha1 > ./schemas/openapi/v3/apis/admissionregistration.k8s.io/v1alpha1.json
@kubectl get --raw /openapi/v3/apis/admissionregistration.k8s.io/v1beta1 > ./schemas/openapi/v3/apis/admissionregistration.k8s.io/v1beta1.json
@kubectl get --raw /openapi/v3/apis/admissionregistration.k8s.io/v1 > ./schemas/openapi/v3/apis/admissionregistration.k8s.io/v1.json
@$(KIND) delete cluster --name schema

.PHONY: codegen-schema-json
codegen-schema-json: codegen-schema-openapi ## Generate json schemas
@$(PIP) install openapi2jsonschema
@rm -rf ./schemas/json
@openapi2jsonschema ./schemas/openapi/v2/schema.json --kubernetes --stand-alone --expanded -o ./schemas/json
@mkdir -p ./schemas/json
@chmod 777 ./schemas/json
@docker run --rm --name openapi2jsonschema --mount type=bind,source="$(PWD)"/schemas/openapi/v2,target=/v2 --mount type=bind,source="$(PWD)"/schemas/json,target=/json ghcr.io/hectorm/openapi2jsonschema:v0.11 /v2/schema.json --kubernetes --stand-alone --expanded -o /json

.PHONY: codegen-all
codegen-all: codegen-helm-docs codegen-schema-json codegen-schema-openapi ## Generate all codegen
Expand Down Expand Up @@ -183,12 +184,12 @@ build-clean: ## Clean built files
.PHONY: build-frontend
build-frontend: ## Build frontend
@echo Building frontend... >&2
@cp schemas/json/clusterpolicy-kyverno-v1.json frontend/src/schemas
@cp schemas/json/clusterpolicy-kyverno-v2beta1.json frontend/src/schemas
@cp schemas/json/policy-kyverno-v1.json frontend/src/schemas
@cp schemas/json/policy-kyverno-v2beta1.json frontend/src/schemas
@cp schemas/json/policyexception-kyverno-v2alpha1.json frontend/src/schemas
@cp schemas/json/validatingadmissionpolicy-admissionregistration-v1alpha1.json frontend/src/schemas
@cp schemas/json/clusterpolicy-kyverno.io-v1.json frontend/src/schemas
@cp schemas/json/clusterpolicy-kyverno.io-v2beta1.json frontend/src/schemas
@cp schemas/json/policy-kyverno.io-v1.json frontend/src/schemas
@cp schemas/json/policy-kyverno.io-v2beta1.json frontend/src/schemas
@cp schemas/json/policyexception-kyverno.io-v2.json frontend/src/schemas
@cp schemas/json/policyexception-kyverno.io-v2beta1.json frontend/src/schemas
@cp schemas/json/validatingadmissionpolicy-admissionregistration-v1beta1.json frontend/src/schemas
@cd frontend && npm install && APP_VERSION=$(APP_VERSION) npm run build

Expand Down
2 changes: 1 addition & 1 deletion backend/data/schemas/apis/kyverno.io/v1.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion backend/data/schemas/apis/kyverno.io/v2alpha1.json

This file was deleted.

2 changes: 1 addition & 1 deletion backend/data/schemas/apis/kyverno.io/v2beta1.json

Large diffs are not rendered by default.

Loading

0 comments on commit 2c2f16a

Please sign in to comment.