1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00

feat: added ability to bump version using in-file editing (#8857)

* added ability to bump version using in-file editing

Signed-off-by: swastik959 <Sswastik959@gmail.com>

* corrected error

Signed-off-by: swastik959 <Sswastik959@gmail.com>

* changed the name and added one

Signed-off-by: swastik959 <Sswastik959@gmail.com>

* added corrections

Signed-off-by: swastik959 <Sswastik959@gmail.com>

* few corrections

Signed-off-by: swastik959 <Sswastik959@gmail.com>

* makefile

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* rm tmp

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* codegen

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* codegen

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

---------

Signed-off-by: swastik959 <Sswastik959@gmail.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
Swastik Gour 2024-01-31 19:54:56 +05:30 committed by GitHub
parent 635f160ae0
commit 141e7d056f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 63 additions and 44 deletions

View file

@ -403,6 +403,10 @@ INFORMERS_PACKAGE := $(OUT_PACKAGE)/informers
APPLYCONFIGURATIONS_PACKAGE := $(OUT_PACKAGE)/applyconfigurations
CRDS_PATH := ${PWD}/config/crds
INSTALL_MANIFEST_PATH := ${PWD}/config/install-latest-testing.yaml
KYVERNO_CHART_VERSION ?= v0.0.0
POLICIES_CHART_VERSION ?= v0.0.0
APP_CHART_VERSION ?= latest
KUBE_CHART_VERSION ?= ">=1.25.0-0"
$(GOPATH_SHIM):
@echo Create gopath shim... >&2
@ -626,7 +630,6 @@ codegen-manifest-debug: $(HELM) ## Create debug manifest
| $(SED) -e '/^#.*/d' \
> ./.manifest/debug.yaml
# guidance https://github.com/kyverno/kyverno/wiki/Generate-a-Release
.PHONY: codegen-manifest-release
codegen-manifest-release: $(HELM) ## Create release manifest
@echo Generate release manifest... >&2
@ -644,6 +647,22 @@ codegen-manifest-release: $(HELM) ## Create release manifest
.PHONY: codegen-manifest-all
codegen-manifest-all: codegen-manifest-install-latest codegen-manifest-debug ## Create all manifests
.PHONY: codegen-helm-update-versions
codegen-helm-update-versions: ## Update helm charts versions
@echo Updating Chart.yaml files... >&2
@$(SED) -i 's/version: .*/version: $(POLICIES_CHART_VERSION)/' charts/kyverno-policies/Chart.yaml
@$(SED) -i 's/appVersion: .*/appVersion: $(APP_CHART_VERSION)/' charts/kyverno-policies/Chart.yaml
@$(SED) -i 's/kubeVersion: .*/kubeVersion: $(KUBE_CHART_VERSION)/' charts/kyverno-policies/Chart.yaml
@$(SED) -i 's/version: .*/version: $(KYVERNO_CHART_VERSION)/' charts/kyverno/Chart.yaml
@$(SED) -i 's/appVersion: .*/appVersion: $(APP_CHART_VERSION)/' charts/kyverno/Chart.yaml
@$(SED) -i 's/kubeVersion: .*/kubeVersion: $(KUBE_CHART_VERSION)/' charts/kyverno/Chart.yaml
@$(SED) -i 's/version: .*/version: $(KYVERNO_CHART_VERSION)/' charts/kyverno/charts/crds/Chart.yaml
@$(SED) -i 's/appVersion: .*/appVersion: $(APP_CHART_VERSION)/' charts/kyverno/charts/crds/Chart.yaml
@$(SED) -i 's/kubeVersion: .*/kubeVersion: $(KUBE_CHART_VERSION)/' charts/kyverno/charts/crds/Chart.yaml
@$(SED) -i 's/version: .*/version: $(KYVERNO_CHART_VERSION)/' charts/kyverno/charts/grafana/Chart.yaml
@$(SED) -i 's/appVersion: .*/appVersion: $(APP_CHART_VERSION)/' charts/kyverno/charts/grafana/Chart.yaml
@$(SED) -i 's/kubeVersion: .*/kubeVersion: $(KUBE_CHART_VERSION)/' charts/kyverno/charts/grafana/Chart.yaml
.PHONY: codegen-quick
codegen-quick: codegen-deepcopy-all codegen-crds-all codegen-docs-all codegen-helm-all codegen-manifest-all ## Generate all generated code except client

View file

@ -1,8 +1,8 @@
apiVersion: v2
type: application
name: kyverno-policies
version: v2.5.5
appVersion: v1.7.3
version: v0.0.0
appVersion: latest
icon: https://github.com/kyverno/kyverno/raw/main/img/logo.png
description: Kubernetes Pod Security Standards implemented as Kyverno policies
keywords:
@ -17,7 +17,7 @@ sources:
maintainers:
- name: kyverno-maintainers
email: cncf-kyverno-maintainers@lists.cncf.io
kubeVersion: ">=1.16.0-0"
kubeVersion: ">=1.25.0-0"
annotations:
artifacthub.io/operator: "false"
artifacthub.io/prerelease: "false"

View file

@ -2,7 +2,7 @@
Kubernetes Pod Security Standards implemented as Kyverno policies
![Version: v2.5.5](https://img.shields.io/badge/Version-v2.5.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.7.3](https://img.shields.io/badge/AppVersion-v1.7.3-informational?style=flat-square)
![Version: v0.0.0](https://img.shields.io/badge/Version-v0.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)
## About
@ -88,7 +88,7 @@ The command removes all the Kubernetes components associated with the chart and
## Requirements
Kubernetes: `>=1.16.0-0`
Kubernetes: `>=1.25.0-0`
## Maintainers

View file

@ -1,7 +1,7 @@
apiVersion: v2
type: application
name: kyverno
version: v3.0.0
version: v0.0.0
appVersion: latest
icon: https://github.com/kyverno/kyverno/raw/main/img/logo.png
description: Kubernetes Native Policy Management
@ -43,8 +43,8 @@ annotations:
description: Add podLabels to the pre-delete hook
dependencies:
- name: grafana
version: "0.0.0"
version: v0.0.0
condition: grafana.enabled
- name: crds
version: "0.0.0"
version: v0.0.0
condition: crds.install

View file

@ -2,7 +2,7 @@
Kubernetes Native Policy Management
![Version: v3.0.0](https://img.shields.io/badge/Version-v3.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)
![Version: v0.0.0](https://img.shields.io/badge/Version-v0.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)
## About
@ -855,8 +855,8 @@ Kubernetes: `>=1.25.0-0`
| Repository | Name | Version |
|------------|------|---------|
| | crds | 0.0.0 |
| | grafana | 0.0.0 |
| | crds | v0.0.0 |
| | grafana | v0.0.0 |
## Maintainers

View file

@ -1,3 +1,3 @@
apiVersion: v2
name: crds
version: 0.0.0
version: v0.0.0

View file

@ -1,6 +1,6 @@
# crds
![Version: 0.0.0](https://img.shields.io/badge/Version-0.0.0-informational?style=flat-square)
![Version: v0.0.0](https://img.shields.io/badge/Version-v0.0.0-informational?style=flat-square)
## Values

View file

@ -1,3 +1,3 @@
apiVersion: v2
name: grafana
version: 0.0.0
version: v0.0.0

View file

@ -1,6 +1,6 @@
# grafana
![Version: 0.0.0](https://img.shields.io/badge/Version-0.0.0-informational?style=flat-square)
![Version: v0.0.0](https://img.shields.io/badge/Version-v0.0.0-informational?style=flat-square)
## Values

View file

@ -212,8 +212,8 @@ metadata:
app.kubernetes.io/instance: kyverno
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: kyverno-crds
app.kubernetes.io/version: 0.0.0
helm.sh/chart: crds-0.0.0
app.kubernetes.io/version: v0.0.0
helm.sh/chart: crds-v0.0.0
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
name: admissionreports.kyverno.io
@ -859,8 +859,8 @@ metadata:
app.kubernetes.io/instance: kyverno
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: kyverno-crds
app.kubernetes.io/version: 0.0.0
helm.sh/chart: crds-0.0.0
app.kubernetes.io/version: v0.0.0
helm.sh/chart: crds-v0.0.0
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
name: backgroundscanreports.kyverno.io
@ -1440,8 +1440,8 @@ metadata:
app.kubernetes.io/instance: kyverno
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: kyverno-crds
app.kubernetes.io/version: 0.0.0
helm.sh/chart: crds-0.0.0
app.kubernetes.io/version: v0.0.0
helm.sh/chart: crds-v0.0.0
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
name: cleanuppolicies.kyverno.io
@ -5190,8 +5190,8 @@ metadata:
app.kubernetes.io/instance: kyverno
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: kyverno-crds
app.kubernetes.io/version: 0.0.0
helm.sh/chart: crds-0.0.0
app.kubernetes.io/version: v0.0.0
helm.sh/chart: crds-v0.0.0
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
name: clusteradmissionreports.kyverno.io
@ -5839,8 +5839,8 @@ metadata:
app.kubernetes.io/instance: kyverno
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: kyverno-crds
app.kubernetes.io/version: 0.0.0
helm.sh/chart: crds-0.0.0
app.kubernetes.io/version: v0.0.0
helm.sh/chart: crds-v0.0.0
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
name: clusterbackgroundscanreports.kyverno.io
@ -6420,8 +6420,8 @@ metadata:
app.kubernetes.io/instance: kyverno
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: kyverno-crds
app.kubernetes.io/version: 0.0.0
helm.sh/chart: crds-0.0.0
app.kubernetes.io/version: v0.0.0
helm.sh/chart: crds-v0.0.0
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
name: clustercleanuppolicies.kyverno.io
@ -10170,8 +10170,8 @@ metadata:
app.kubernetes.io/instance: kyverno
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: kyverno-crds
app.kubernetes.io/version: 0.0.0
helm.sh/chart: crds-0.0.0
app.kubernetes.io/version: v0.0.0
helm.sh/chart: crds-v0.0.0
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
name: clusterpolicies.kyverno.io
@ -28147,8 +28147,8 @@ metadata:
app.kubernetes.io/instance: kyverno
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: kyverno-crds
app.kubernetes.io/version: 0.0.0
helm.sh/chart: crds-0.0.0
app.kubernetes.io/version: v0.0.0
helm.sh/chart: crds-v0.0.0
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
name: policies.kyverno.io
@ -46127,8 +46127,8 @@ metadata:
app.kubernetes.io/instance: kyverno
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: kyverno-crds
app.kubernetes.io/version: 0.0.0
helm.sh/chart: crds-0.0.0
app.kubernetes.io/version: v0.0.0
helm.sh/chart: crds-v0.0.0
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
name: policyexceptions.kyverno.io
@ -48083,8 +48083,8 @@ metadata:
app.kubernetes.io/instance: kyverno
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: kyverno-crds
app.kubernetes.io/version: 0.0.0
helm.sh/chart: crds-0.0.0
app.kubernetes.io/version: v0.0.0
helm.sh/chart: crds-v0.0.0
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
name: updaterequests.kyverno.io
@ -48881,8 +48881,8 @@ metadata:
app.kubernetes.io/instance: kyverno
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: kyverno-crds
app.kubernetes.io/version: 0.0.0
helm.sh/chart: crds-0.0.0
app.kubernetes.io/version: v0.0.0
helm.sh/chart: crds-v0.0.0
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
name: clusterpolicyreports.wgpolicyk8s.io
@ -49248,8 +49248,8 @@ metadata:
app.kubernetes.io/instance: kyverno
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: kyverno-crds
app.kubernetes.io/version: 0.0.0
helm.sh/chart: crds-0.0.0
app.kubernetes.io/version: v0.0.0
helm.sh/chart: crds-v0.0.0
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
name: policyreports.wgpolicyk8s.io
@ -49614,8 +49614,8 @@ metadata:
app.kubernetes.io/instance: kyverno
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: kyverno-crds
app.kubernetes.io/version: 0.0.0
helm.sh/chart: crds-0.0.0
app.kubernetes.io/version: v0.0.0
helm.sh/chart: crds-v0.0.0
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
name: clusterephemeralreports.reports.kyverno.io
@ -49961,8 +49961,8 @@ metadata:
app.kubernetes.io/instance: kyverno
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: kyverno-crds
app.kubernetes.io/version: 0.0.0
helm.sh/chart: crds-0.0.0
app.kubernetes.io/version: v0.0.0
helm.sh/chart: crds-v0.0.0
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
name: ephemeralreports.reports.kyverno.io