(dev-v2.6-archive) bump rancher-backup to 2.2.0-rc1

(partially cherry picked from commit 494564d483)
pull/1680/head
Jiaqi Luo 2021-06-15 14:09:57 -07:00 committed by Arvind Iyengar
parent 1110c8c82e
commit 944b14aaab
No known key found for this signature in database
GPG Key ID: A8DD9BFD6C811498
3 changed files with 5 additions and 8 deletions

View File

@ -1,2 +1 @@
url: https://github.com/rancher/backup-restore-operator/releases/download/v1.1.1/rancher-backup-crd-1.1.1.tgz
version: 100.0.0
url: https://github.com/rancher/backup-restore-operator/releases/download/v2.0.0-rc1/rancher-backup-crd-2.0.0-rc1.tgz

View File

@ -1,2 +1 @@
url: https://github.com/rancher/backup-restore-operator/releases/download/v1.1.1/rancher-backup-1.1.1.tgz
version: 100.0.0
url: https://github.com/rancher/backup-restore-operator/releases/download/v2.0.0-rc1/rancher-backup-2.0.0-rc1.tgz

View File

@ -30,11 +30,10 @@ spec:
{{- range $path, $_ := (.Files.Glob "crd-manifest/**.yaml") }}
{{- $crd := get (get ($.Files.Get $path | fromYaml) "metadata") "name" }}
if [[ -n "$(kubectl get crd {{ $crd }} -o jsonpath='{.spec.preserveUnknownFields}')" ]]; then
patch='{"spec": {"preserveUnknownFields": false}}';
if [[ -z "$(kubectl get crd {{ $crd }} -o jsonpath='{.spec.versions[0].schema}')" ]]; then
patch='{"spec": {"preserveUnknownFields": false, "versions": [{"name": "v1", "served": false, "storage": true, "schema": {"openAPIV3Schema": {"description": "placeholder", "type": "object"}}}]}}';
patch="{\"spec\": {\"preserveUnknownFields\": false}}";
if [[ -z "$(kubectl get crd {{ $crd }} -o jsonpath='{.spec.versions[0].schema}' 2>&1)" ]]; then
patch="{\"spec\": {\"preserveUnknownFields\": false, \"versions\": [{\"name\": \"v1\", \"served\": false, \"storage\": true}]}}";
fi
echo "Applying patch to {{ $crd }}: ${patch}"
if kubectl patch crd {{ $crd }} -p "${patch}" --type="merge"; then
{{- include "crd.established" $crd | nindent 18 }}
fi;