From ad1ddf830ae695094ef352b579b6838a777e0832 Mon Sep 17 00:00:00 2001 From: Roberto Bonafiglia Date: Fri, 9 Feb 2024 17:52:30 +0100 Subject: [PATCH] Update Calico to v3.27.0 Signed-off-by: Roberto Bonafiglia --- packages/rke2-calico/charts-crd/Chart.yaml | 5 +++++ .../generated-changes/patch/Chart.yaml.patch | 2 +- .../patch/templates/_helpers.tpl.patch | 4 +++- .../templates/crs/custom-resources.yaml.patch | 8 ++++---- .../01-imagepullsecret.yaml.patch | 2 +- ...02-serviceaccount-tigera-operator.yaml.patch | 4 ++-- .../02-tigera-operator.yaml.patch | 2 +- .../generated-changes/patch/values.yaml.patch | 17 ++++++++++++----- packages/rke2-calico/package.yaml | 2 +- .../templates/crd-template/Chart.yaml | 2 +- 10 files changed, 31 insertions(+), 17 deletions(-) create mode 100755 packages/rke2-calico/charts-crd/Chart.yaml diff --git a/packages/rke2-calico/charts-crd/Chart.yaml b/packages/rke2-calico/charts-crd/Chart.yaml new file mode 100755 index 000000000..3cff2b878 --- /dev/null +++ b/packages/rke2-calico/charts-crd/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +version: v3.27.0 +description: Installs the CRDs for rke2-calico +name: rke2-calico-crd +type: application diff --git a/packages/rke2-calico/generated-changes/patch/Chart.yaml.patch b/packages/rke2-calico/generated-changes/patch/Chart.yaml.patch index 251b6f0f7..37617346b 100644 --- a/packages/rke2-calico/generated-changes/patch/Chart.yaml.patch +++ b/packages/rke2-calico/generated-changes/patch/Chart.yaml.patch @@ -10,6 +10,6 @@ - https://github.com/projectcalico/calico/tree/master/calico/_includes/charts/tigera-operator - https://github.com/tigera/operator - https://github.com/projectcalico/calico - version: v3.26.3 + version: v3.27.0 +annotations: + catalog.cattle.io/namespace: tigera-operator diff --git a/packages/rke2-calico/generated-changes/patch/templates/_helpers.tpl.patch b/packages/rke2-calico/generated-changes/patch/templates/_helpers.tpl.patch index 6a7c566fb..36ed570a2 100644 --- a/packages/rke2-calico/generated-changes/patch/templates/_helpers.tpl.patch +++ b/packages/rke2-calico/generated-changes/patch/templates/_helpers.tpl.patch @@ -1,6 +1,6 @@ --- charts-original/templates/_helpers.tpl +++ charts/templates/_helpers.tpl -@@ -1,7 +1,10 @@ +@@ -1,9 +1,12 @@ {{/* generate the image name for a component*/}} {{- define "tigera-operator.image" -}} -{{- if .registry -}} @@ -14,3 +14,5 @@ +{{- end -}} +{{- .Values.tigeraOperator.image -}}:{{- .Values.tigeraOperator.version -}} {{- end -}} + + {{/* diff --git a/packages/rke2-calico/generated-changes/patch/templates/crs/custom-resources.yaml.patch b/packages/rke2-calico/generated-changes/patch/templates/crs/custom-resources.yaml.patch index 74db987c6..1ad2eab4b 100644 --- a/packages/rke2-calico/generated-changes/patch/templates/crs/custom-resources.yaml.patch +++ b/packages/rke2-calico/generated-changes/patch/templates/crs/custom-resources.yaml.patch @@ -1,9 +1,9 @@ --- charts-original/templates/crs/custom-resources.yaml +++ charts/templates/crs/custom-resources.yaml -@@ -6,6 +6,33 @@ - {{ $secrets = append $secrets $item }} - {{ end }} - {{ $_ := set $installSpec "imagePullSecrets" $secrets }} +@@ -2,6 +2,33 @@ + {{ $installSpec := omit .Values.installation "enabled" }} + {{ $_ := set $installSpec "imagePullSecrets" (include "tigera-operator.imagePullSecrets" . | fromYamlArray) }} + {{ $_ := set $installSpec "kubeletVolumePluginPath" .Values.kubeletVolumePluginPath }} +{{ $defaultRegistry := get $installSpec "registry" }} +{{ $finalRegistry := coalesce .Values.global.systemDefaultRegistry $defaultRegistry }} +{{ $_ := set $installSpec "registry" $finalRegistry }} diff --git a/packages/rke2-calico/generated-changes/patch/templates/tigera-operator/01-imagepullsecret.yaml.patch b/packages/rke2-calico/generated-changes/patch/templates/tigera-operator/01-imagepullsecret.yaml.patch index 29029d516..f458be8a0 100644 --- a/packages/rke2-calico/generated-changes/patch/templates/tigera-operator/01-imagepullsecret.yaml.patch +++ b/packages/rke2-calico/generated-changes/patch/templates/tigera-operator/01-imagepullsecret.yaml.patch @@ -5,7 +5,7 @@ {{- $envAll := . }} {{- if .Values.imagePullSecrets }} -@@ -7,7 +6,7 @@ +@@ -8,7 +7,7 @@ kind: Secret metadata: name: {{ $key }} diff --git a/packages/rke2-calico/generated-changes/patch/templates/tigera-operator/02-serviceaccount-tigera-operator.yaml.patch b/packages/rke2-calico/generated-changes/patch/templates/tigera-operator/02-serviceaccount-tigera-operator.yaml.patch index 465c45a5e..60298302b 100644 --- a/packages/rke2-calico/generated-changes/patch/templates/tigera-operator/02-serviceaccount-tigera-operator.yaml.patch +++ b/packages/rke2-calico/generated-changes/patch/templates/tigera-operator/02-serviceaccount-tigera-operator.yaml.patch @@ -1,9 +1,9 @@ --- charts-original/templates/tigera-operator/02-serviceaccount-tigera-operator.yaml +++ charts/templates/tigera-operator/02-serviceaccount-tigera-operator.yaml -@@ -8,5 +8,5 @@ +@@ -2,5 +2,5 @@ kind: ServiceAccount metadata: name: tigera-operator - namespace: {{.Release.Namespace}} + namespace: tigera-operator - imagePullSecrets: {{- $secrets | toYaml | nindent 2 }} + imagePullSecrets: {{- include "tigera-operator.imagePullSecrets" . | nindent 2 }} diff --git a/packages/rke2-calico/generated-changes/patch/templates/tigera-operator/02-tigera-operator.yaml.patch b/packages/rke2-calico/generated-changes/patch/templates/tigera-operator/02-tigera-operator.yaml.patch index c52ab1698..1676d32b3 100644 --- a/packages/rke2-calico/generated-changes/patch/templates/tigera-operator/02-tigera-operator.yaml.patch +++ b/packages/rke2-calico/generated-changes/patch/templates/tigera-operator/02-tigera-operator.yaml.patch @@ -9,7 +9,7 @@ labels: k8s-app: tigera-operator spec: -@@ -37,7 +37,7 @@ +@@ -40,7 +40,7 @@ dnsPolicy: ClusterFirstWithHostNet containers: - name: tigera-operator diff --git a/packages/rke2-calico/generated-changes/patch/values.yaml.patch b/packages/rke2-calico/generated-changes/patch/values.yaml.patch index 3e28aedf5..85f974fcc 100644 --- a/packages/rke2-calico/generated-changes/patch/values.yaml.patch +++ b/packages/rke2-calico/generated-changes/patch/values.yaml.patch @@ -1,6 +1,6 @@ --- charts-original/values.yaml +++ charts/values.yaml -@@ -1,11 +1,24 @@ +@@ -6,8 +6,21 @@ imagePullSecrets: {} installation: @@ -13,12 +13,17 @@ + effect: "NoExecute" enabled: true + kubeletVolumePluginPath: "None" - kubernetesProvider: '' + kubernetesProvider: "" + calicoNetwork: + bgp: Disabled + imagePath: "rancher" + imagePrefix: "mirrored-calico-" + flexVolumePath: "/var/lib/kubelet/volumeplugins/" + # imagePullSecrets are configured on all images deployed by the tigera-operator. + # secrets specified here must exist in the tigera-operator namespace; they won't be created by the operator or helm. + # imagePullSecrets are a slice of LocalObjectReferences, which is the same format they appear as on deployments. +@@ -16,7 +29,7 @@ + imagePullSecrets: [] apiServer: - enabled: true @@ -26,19 +31,21 @@ certs: node: -@@ -40,9 +53,28 @@ +@@ -51,11 +64,30 @@ # Image and registry configuration for the tigera/operator pod. tigeraOperator: - image: tigera/operator + image: rancher/mirrored-calico-operator - version: v1.30.7 + version: v1.32.3 - registry: quay.io + registry: docker.io calicoctl: - image: docker.io/calico/ctl + image: rancher/mirrored-calico-ctl - tag: v3.26.3 + tag: v3.27.0 + + kubeletVolumePluginPath: /var/lib/kubelet + +global: + systemDefaultRegistry: "" diff --git a/packages/rke2-calico/package.yaml b/packages/rke2-calico/package.yaml index ab562701c..625f0f574 100644 --- a/packages/rke2-calico/package.yaml +++ b/packages/rke2-calico/package.yaml @@ -1,4 +1,4 @@ -url: https://github.com/projectcalico/calico/releases/download/v3.26.3/tigera-operator-v3.26.3.tgz +url: https://github.com/projectcalico/calico/releases/download/v3.27.0/tigera-operator-v3.27.0.tgz packageVersion: 00 additionalCharts: - workingDir: charts-crd diff --git a/packages/rke2-calico/templates/crd-template/Chart.yaml b/packages/rke2-calico/templates/crd-template/Chart.yaml index 82ade7246..3cff2b878 100644 --- a/packages/rke2-calico/templates/crd-template/Chart.yaml +++ b/packages/rke2-calico/templates/crd-template/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v1 -version: v3.26.3 +version: v3.27.0 description: Installs the CRDs for rke2-calico name: rke2-calico-crd type: application