From 5c66bd0524db42067d036f22e53243c1f58dec5e Mon Sep 17 00:00:00 2001 From: Brad Davidson Date: Fri, 4 Oct 2024 20:00:11 +0000 Subject: [PATCH 1/2] Bump rke2-snapshot-validation-webhook Signed-off-by: Brad Davidson --- .../exclude/tests/invalid-admission.json | 1 - .../exclude/tests/valid-admission.json | 1 - .../generated-changes/patch/Chart.yaml.patch | 23 ++++++++++++++++--- .../patch/templates/deployment.yaml.patch | 2 +- .../generated-changes/patch/values.yaml.patch | 8 +++---- .../package.yaml | 4 ++-- 6 files changed, 27 insertions(+), 12 deletions(-) delete mode 100644 packages/rke2-snapshot-validation-webhook/generated-changes/exclude/tests/invalid-admission.json delete mode 100644 packages/rke2-snapshot-validation-webhook/generated-changes/exclude/tests/valid-admission.json diff --git a/packages/rke2-snapshot-validation-webhook/generated-changes/exclude/tests/invalid-admission.json b/packages/rke2-snapshot-validation-webhook/generated-changes/exclude/tests/invalid-admission.json deleted file mode 100644 index cda1defe5..000000000 --- a/packages/rke2-snapshot-validation-webhook/generated-changes/exclude/tests/invalid-admission.json +++ /dev/null @@ -1 +0,0 @@ -{"apiVersion":"admission.k8s.io/v1","kind":"AdmissionReview","request":{"dryRun":true,"kind":{"group":"snapshot.storage.k8s.io","kind":"VolumeSnapshot","version":"v1"},"name":"valid-snapshot","namespace":"test","object":{"apiVersion":"snapshot.storage.k8s.io/v1","kind":"VolumeSnapshot","metadata":{"name":"valid-snapshot","namespace":"test","uid":"30c34ffe-6d19-40a6-b1a4-3afe5936e673"},"spec":{"source":{"persistentVolumeClaimName":"some-claim"},"volumeSnapshotClassName":""}},"oldObject":null,"operation":"CREATE","requestKind":{"group":"snapshot.storage.k8s.io","kind":"VolumeSnapshot","version":"v1"},"requestResource":{"group":"snapshot.storage.k8s.io","resource":"volumesnapshots","version":"v1"},"resource":{"group":"snapshot.storage.k8s.io","resource":"volumesnapshots","version":"v1"},"uid":"705ab4f5-6393-11e8-b7cc-42010a800002"}} diff --git a/packages/rke2-snapshot-validation-webhook/generated-changes/exclude/tests/valid-admission.json b/packages/rke2-snapshot-validation-webhook/generated-changes/exclude/tests/valid-admission.json deleted file mode 100644 index 789871d5e..000000000 --- a/packages/rke2-snapshot-validation-webhook/generated-changes/exclude/tests/valid-admission.json +++ /dev/null @@ -1 +0,0 @@ -{"apiVersion":"admission.k8s.io/v1","kind":"AdmissionReview","request":{"dryRun":true,"kind":{"group":"snapshot.storage.k8s.io","kind":"VolumeSnapshot","version":"v1"},"name":"valid-snapshot","namespace":"test","object":{"apiVersion":"snapshot.storage.k8s.io/v1","kind":"VolumeSnapshot","metadata":{"name":"valid-snapshot","namespace":"test","uid":"30c34ffe-6d19-40a6-b1a4-3afe5936e673"},"spec":{"source":{"persistentVolumeClaimName":"some-claim"},"volumeSnapshotClassName":"snapshot-class"}},"oldObject":null,"operation":"CREATE","requestKind":{"group":"snapshot.storage.k8s.io","kind":"VolumeSnapshot","version":"v1"},"requestResource":{"group":"snapshot.storage.k8s.io","resource":"volumesnapshots","version":"v1"},"resource":{"group":"snapshot.storage.k8s.io","resource":"volumesnapshots","version":"v1"},"uid":"705ab4f5-6393-11e8-b7cc-42010a800002"}} diff --git a/packages/rke2-snapshot-validation-webhook/generated-changes/patch/Chart.yaml.patch b/packages/rke2-snapshot-validation-webhook/generated-changes/patch/Chart.yaml.patch index 47ec0a29c..f723757d0 100644 --- a/packages/rke2-snapshot-validation-webhook/generated-changes/patch/Chart.yaml.patch +++ b/packages/rke2-snapshot-validation-webhook/generated-changes/patch/Chart.yaml.patch @@ -1,10 +1,27 @@ --- charts-original/Chart.yaml +++ charts/Chart.yaml -@@ -1,6 +1,6 @@ +@@ -1,8 +1,8 @@ apiVersion: v2 type: application -name: snapshot-validation-webhook +name: rke2-snapshot-validation-webhook - version: 1.7.3 - appVersion: "v6.2.2" + version: 1.9.0 +-appVersion: "v6.3.1" ++appVersion: "v8.1.0" icon: https://raw.githubusercontent.com/piraeusdatastore/piraeus/master/artwork/sandbox-artwork/icon/color.svg + maintainers: + - name: The Piraeus Maintainers +@@ -10,8 +10,6 @@ + description: | + Deploys the snapshot-validation-webhook and configures your cluster to validate every `VolumeSnapshot` and + `VolumeSnapshotContent` resource by sending it to the webhook. +- +- NOTE: Please use the snapshot-controller chart instead: it also deploys the validation webhook. + keywords: + - storage + - snapshot +@@ -22,4 +20,3 @@ + annotations: + artifacthub.io/recommendations: | + - url: https://artifacthub.io/packages/helm/piraeus-charts/snapshot-controller +-deprecated: true diff --git a/packages/rke2-snapshot-validation-webhook/generated-changes/patch/templates/deployment.yaml.patch b/packages/rke2-snapshot-validation-webhook/generated-changes/patch/templates/deployment.yaml.patch index e15c12be3..6bbda1032 100644 --- a/packages/rke2-snapshot-validation-webhook/generated-changes/patch/templates/deployment.yaml.patch +++ b/packages/rke2-snapshot-validation-webhook/generated-changes/patch/templates/deployment.yaml.patch @@ -1,6 +1,6 @@ --- charts-original/templates/deployment.yaml +++ charts/templates/deployment.yaml -@@ -32,7 +32,7 @@ +@@ -35,7 +35,7 @@ - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} diff --git a/packages/rke2-snapshot-validation-webhook/generated-changes/patch/values.yaml.patch b/packages/rke2-snapshot-validation-webhook/generated-changes/patch/values.yaml.patch index 73d24b2e0..0f0d3abef 100644 --- a/packages/rke2-snapshot-validation-webhook/generated-changes/patch/values.yaml.patch +++ b/packages/rke2-snapshot-validation-webhook/generated-changes/patch/values.yaml.patch @@ -1,7 +1,7 @@ --- charts-original/values.yaml +++ charts/values.yaml -@@ -6,7 +6,7 @@ - port: 8443 +@@ -7,7 +7,7 @@ + # enableVolumeGroupSnapshotWebhook: true image: - repository: registry.k8s.io/sig-storage/snapshot-validation-webhook @@ -9,7 +9,7 @@ pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. tag: "" -@@ -63,9 +63,16 @@ +@@ -65,9 +65,16 @@ resources: {} @@ -28,7 +28,7 @@ affinity: {} -@@ -75,3 +82,11 @@ +@@ -77,3 +84,11 @@ rbac: create: true diff --git a/packages/rke2-snapshot-validation-webhook/package.yaml b/packages/rke2-snapshot-validation-webhook/package.yaml index fb0834898..cca8f55f0 100644 --- a/packages/rke2-snapshot-validation-webhook/package.yaml +++ b/packages/rke2-snapshot-validation-webhook/package.yaml @@ -1,4 +1,4 @@ url: https://github.com/piraeusdatastore/helm-charts.git subdirectory: charts/snapshot-validation-webhook -commit: 994dde7e93cda78eaf098e5c39889c95be928b32 # snapshot-validation-webhook-1.7.3 -packageVersion: 02 +commit: 191804f1d509177b909b3ced07bf924d302debf2 # snapshot-validation-webhook-1.9.0 +packageVersion: 00 From e21180c002dead03883c422788d67d2b6daef4ec Mon Sep 17 00:00:00 2001 From: Brad Davidson Date: Fri, 4 Oct 2024 20:13:53 +0000 Subject: [PATCH 2/2] Bump rke2-snapshot-controller Signed-off-by: Brad Davidson --- .../generated-changes/patch/Chart.yaml.patch | 6 +- .../patch/templates/_helpers.tpl.patch | 8 +- .../patch/templates/deployment.yaml.patch | 11 -- .../deployment_controller.yaml.patch | 11 ++ .../deployment_validation_webhook.yaml.patch | 11 ++ .../generated-changes/patch/values.yaml.patch | 115 +++++++++++++----- .../rke2-snapshot-controller/package.yaml | 4 +- .../templates/crd-template/Chart.yaml | 4 +- 8 files changed, 116 insertions(+), 54 deletions(-) delete mode 100644 packages/rke2-snapshot-controller/generated-changes/patch/templates/deployment.yaml.patch create mode 100644 packages/rke2-snapshot-controller/generated-changes/patch/templates/deployment_controller.yaml.patch create mode 100644 packages/rke2-snapshot-controller/generated-changes/patch/templates/deployment_validation_webhook.yaml.patch diff --git a/packages/rke2-snapshot-controller/generated-changes/patch/Chart.yaml.patch b/packages/rke2-snapshot-controller/generated-changes/patch/Chart.yaml.patch index 2f3dd6fee..254f0d196 100644 --- a/packages/rke2-snapshot-controller/generated-changes/patch/Chart.yaml.patch +++ b/packages/rke2-snapshot-controller/generated-changes/patch/Chart.yaml.patch @@ -5,6 +5,6 @@ type: application -name: snapshot-controller +name: rke2-snapshot-controller - version: 1.7.2 - appVersion: "v6.2.1" - icon: https://raw.githubusercontent.com/piraeusdatastore/piraeus/master/artwork/sandbox-artwork/icon/color.svg + version: 3.0.6 + appVersion: "v8.1.0" + kubeVersion: ">= 1.25.0-0" diff --git a/packages/rke2-snapshot-controller/generated-changes/patch/templates/_helpers.tpl.patch b/packages/rke2-snapshot-controller/generated-changes/patch/templates/_helpers.tpl.patch index c8510c6e5..214038a58 100644 --- a/packages/rke2-snapshot-controller/generated-changes/patch/templates/_helpers.tpl.patch +++ b/packages/rke2-snapshot-controller/generated-changes/patch/templates/_helpers.tpl.patch @@ -1,9 +1,9 @@ --- charts-original/templates/_helpers.tpl +++ charts/templates/_helpers.tpl -@@ -55,3 +55,11 @@ - {{ default "default" .Values.serviceAccount.name }} - {{- end -}} - {{- end -}} +@@ -132,3 +132,11 @@ + {{- include "snapshot-validation-webhook.fullname" . }}-tls + {{- end }} + {{- end }} + +{{- define "system_default_registry" -}} +{{- if .Values.global.systemDefaultRegistry -}} diff --git a/packages/rke2-snapshot-controller/generated-changes/patch/templates/deployment.yaml.patch b/packages/rke2-snapshot-controller/generated-changes/patch/templates/deployment.yaml.patch deleted file mode 100644 index c3510a36c..000000000 --- a/packages/rke2-snapshot-controller/generated-changes/patch/templates/deployment.yaml.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- charts-original/templates/deployment.yaml -+++ charts/templates/deployment.yaml -@@ -29,7 +29,7 @@ - - name: {{ .Chart.Name }} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} -- image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" -+ image: "{{ template "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - args: - {{- range $flag, $val := .Values.args }} diff --git a/packages/rke2-snapshot-controller/generated-changes/patch/templates/deployment_controller.yaml.patch b/packages/rke2-snapshot-controller/generated-changes/patch/templates/deployment_controller.yaml.patch new file mode 100644 index 000000000..2fa10fded --- /dev/null +++ b/packages/rke2-snapshot-controller/generated-changes/patch/templates/deployment_controller.yaml.patch @@ -0,0 +1,11 @@ +--- charts-original/templates/deployment_controller.yaml ++++ charts/templates/deployment_controller.yaml +@@ -34,7 +34,7 @@ + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.controller.securityContext | nindent 12 }} +- image: "{{ .Values.controller.image.repository }}:{{ .Values.controller.image.tag | default .Chart.AppVersion }}" ++ image: "{{ template "system_default_registry" . }}{{ .Values.controller.image.repository }}:{{ .Values.controller.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.controller.image.pullPolicy }} + args: + {{- range $flag, $val := .Values.controller.args }} diff --git a/packages/rke2-snapshot-controller/generated-changes/patch/templates/deployment_validation_webhook.yaml.patch b/packages/rke2-snapshot-controller/generated-changes/patch/templates/deployment_validation_webhook.yaml.patch new file mode 100644 index 000000000..575bf3119 --- /dev/null +++ b/packages/rke2-snapshot-controller/generated-changes/patch/templates/deployment_validation_webhook.yaml.patch @@ -0,0 +1,11 @@ +--- charts-original/templates/deployment_validation_webhook.yaml ++++ charts/templates/deployment_validation_webhook.yaml +@@ -37,7 +37,7 @@ + - name: {{ include "snapshot-validation-webhook.name" . }} + securityContext: + {{- toYaml .Values.webhook.securityContext | nindent 12 }} +- image: "{{ .Values.webhook.image.repository }}:{{ .Values.webhook.image.tag | default .Chart.AppVersion }}" ++ image: "{{ template "system_default_registry" . }}{{ .Values.webhook.image.repository }}:{{ .Values.webhook.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.webhook.image.pullPolicy }} + args: + {{- range $flag, $val := .Values.webhook.args }} diff --git a/packages/rke2-snapshot-controller/generated-changes/patch/values.yaml.patch b/packages/rke2-snapshot-controller/generated-changes/patch/values.yaml.patch index 623747f9a..ca53475b0 100644 --- a/packages/rke2-snapshot-controller/generated-changes/patch/values.yaml.patch +++ b/packages/rke2-snapshot-controller/generated-changes/patch/values.yaml.patch @@ -1,37 +1,88 @@ --- charts-original/values.yaml +++ charts/values.yaml -@@ -6,7 +6,7 @@ - httpEndpoint: ":8080" - - image: -- repository: registry.k8s.io/sig-storage/snapshot-controller -+ repository: rancher/mirrored-sig-storage-snapshot-controller - pullPolicy: IfNotPresent - # Overrides the image tag whose default is the chart appVersion. - tag: "" -@@ -27,9 +27,16 @@ - - resources: {} - --nodeSelector: {} -+nodeSelector: -+ kubernetes.io/os: linux - --tolerations: [] -+tolerations: -+- key: "node-role.kubernetes.io/control-plane" -+ operator: "Exists" -+ effect: "NoSchedule" -+- key: "node-role.kubernetes.io/etcd" -+ operator: "Exists" -+ effect: "NoExecute" - - affinity: {} - -@@ -54,3 +61,6 @@ - # velero.io/csi-volumesnapshot-class: "true" - # driver: linstor.csi.linbit.com - # deletionPolicy: Delete +@@ -11,7 +11,7 @@ + httpEndpoint: ":8080" + + image: +- repository: registry.k8s.io/sig-storage/snapshot-controller ++ repository: rancher/mirrored-sig-storage-snapshot-controller + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "" +@@ -35,9 +35,16 @@ + + resources: {} + +- nodeSelector: {} ++ nodeSelector: ++ kubernetes.io/os: linux + +- tolerations: [] ++ tolerations: ++ - key: "node-role.kubernetes.io/control-plane" ++ operator: "Exists" ++ effect: "NoSchedule" ++ - key: "node-role.kubernetes.io/etcd" ++ operator: "Exists" ++ effect: "NoExecute" + + affinity: {} + +@@ -82,7 +89,7 @@ + dnsPolicy: ClusterFirst + + webhook: +- enabled: true ++ enabled: false + + replicaCount: 1 + +@@ -95,7 +102,7 @@ + # enableVolumeGroupSnapshotWebhook: true + + image: +- repository: registry.k8s.io/sig-storage/snapshot-validation-webhook ++ repository: rancher/mirrored-sig-storage-snapshot-validation-webhook + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "" +@@ -150,9 +157,16 @@ + + resources: {} + +- nodeSelector: {} ++ nodeSelector: ++ kubernetes.io/os: linux + +- tolerations: [] ++ tolerations: ++ - key: "node-role.kubernetes.io/control-plane" ++ operator: "Exists" ++ effect: "NoSchedule" ++ - key: "node-role.kubernetes.io/etcd" ++ operator: "Exists" ++ effect: "NoExecute" + + affinity: {} + +@@ -173,8 +187,18 @@ + dnsPolicy: ClusterFirst + + tests: +- nodeSelector: { } ++ nodeSelector: ++ kubernetes.io/os: linux + +- tolerations: [ ] ++ tolerations: ++ - key: "node-role.kubernetes.io/control-plane" ++ operator: "Exists" ++ effect: "NoSchedule" ++ - key: "node-role.kubernetes.io/etcd" ++ operator: "Exists" ++ effect: "NoExecute" + + affinity: { } + +global: + systemDefaultRegistry: "" diff --git a/packages/rke2-snapshot-controller/package.yaml b/packages/rke2-snapshot-controller/package.yaml index cddc57b99..c2db0a24a 100644 --- a/packages/rke2-snapshot-controller/package.yaml +++ b/packages/rke2-snapshot-controller/package.yaml @@ -1,7 +1,7 @@ url: https://github.com/piraeusdatastore/helm-charts.git subdirectory: charts/snapshot-controller -commit: 100f3d3c3513e14b423093cbb1a6f8fdd38fafd1 # snapshot-controller-1.7.2 -packageVersion: 02 +commit: 79c15f2317860baf58fa70d00ff355a631a77206 # snapshot-controller-3.0.6 +packageVersion: 00 additionalCharts: - workingDir: charts-crd crdOptions: diff --git a/packages/rke2-snapshot-controller/templates/crd-template/Chart.yaml b/packages/rke2-snapshot-controller/templates/crd-template/Chart.yaml index 3937f25b2..676159386 100644 --- a/packages/rke2-snapshot-controller/templates/crd-template/Chart.yaml +++ b/packages/rke2-snapshot-controller/templates/crd-template/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 -version: 1.7.2 -appVersion: "v6.2.1" +version: 3.0.6 +appVersion: "v8.1.0" description: Installs the CRDs for rke2-snapshot-controller name: rke2-snapshot-controller-crd type: application