Skip to content

Commit f9bc0d6

Browse files
authored
Merge pull request #3602 from CecileRobertMichon/cherry-pick-3369-1.8
[release-1.8] Pin Calico to v3.25.1
2 parents 3baf099 + 91a0850 commit f9bc0d6

28 files changed

+89
-79
lines changed

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,14 +495,18 @@ generate-addons: fetch-calico-manifests ## Generate metric-server, calico calico
495495
$(KUSTOMIZE) build $(ADDONS_DIR)/calico-dual-stack > $(ADDONS_DIR)/calico-dual-stack.yaml
496496

497497
# When updating this, make sure to also update the Windows image version in templates/addons/windows/calico.
498-
CALICO_VERSION := v3.25.0
498+
export CALICO_VERSION := v3.25.1
499499
# Where all downloaded Calico manifests are unpacked and stored.
500500
CALICO_RELEASES := $(ARTIFACTS)/calico
501501
# Path to manifests directory in a Calico release archive.
502502
CALICO_RELEASE_MANIFESTS_DIR := release-$(CALICO_VERSION)/manifests
503503
# Path where Calico manifests are stored which should be used for addons generation.
504504
CALICO_MANIFESTS_DIR := $(ARTIFACTS)/calico/$(CALICO_RELEASE_MANIFESTS_DIR)
505505

506+
.PHONY: get-calico-version
507+
get-calico-version: ## Print the Calico version used for CNI in the repo.
508+
@echo $(CALICO_VERSION)
509+
506510
.PHONY: fetch-calico-manifests
507511
fetch-calico-manifests: $(CALICO_MANIFESTS_DIR) ## Get Calico release manifests and unzip them.
508512
cp $(CALICO_MANIFESTS_DIR)/calico-vxlan.yaml $(ADDONS_DIR)/calico

Tiltfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ def deploy_worker_templates(template, substitutions):
364364
calico_values = "./templates/addons/calico-dual-stack/values.yaml"
365365
else:
366366
calico_values = "./templates/addons/calico/values.yaml"
367-
flavor_cmd += "; " + helm_cmd + " repo add projectcalico https://docs.tigera.io/calico/charts; " + helm_cmd + " --kubeconfig ./${CLUSTER_NAME}.kubeconfig install calico projectcalico/tigera-operator -f " + calico_values + " --namespace tigera-operator --create-namespace"
367+
flavor_cmd += "; " + helm_cmd + " repo add projectcalico https://docs.tigera.io/calico/charts; " + helm_cmd + " --kubeconfig ./${CLUSTER_NAME}.kubeconfig install --version ${CALICO_VERSION} calico projectcalico/tigera-operator -f " + calico_values + " --namespace tigera-operator --create-namespace"
368368
if "intree-cloud-provider" not in flavor_name and "ipv6" not in flavor_name: # TODO: remove ipv6 once https://github.com/kubernetes-sigs/cloud-provider-azure/issues/3401 is fixed.
369369
flavor_cmd += "; " + helm_cmd + " --kubeconfig ./${CLUSTER_NAME}.kubeconfig install --repo https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo cloud-provider-azure --generate-name --set infra.clusterName=${CLUSTER_NAME}"
370370
if "flatcar" in flavor_name: # append caCetDir location to the cloud-provider-azure helm install command for flatcar flavor

docs/book/src/topics/addons.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Then install the Helm chart on the workload cluster:
2929

3030
```bash
3131
helm repo add projectcalico https://docs.tigera.io/calico/charts && \
32-
helm install calico projectcalico/tigera-operator -f https://raw.githubusercontent.com/kubernetes-sigs/cluster-api-provider-azure/main/templates/addons/calico/values.yaml --set-string "installation.calicoNetwork.ipPools[0].cidr=${IPV4_CIDR_BLOCK}" --namespace tigera-operator --create-namespace
32+
helm install calico projectcalico/tigera-operator --version v3.25.1 -f https://raw.githubusercontent.com/kubernetes-sigs/cluster-api-provider-azure/main/templates/addons/calico/values.yaml --set-string "installation.calicoNetwork.ipPools[0].cidr=${IPV4_CIDR_BLOCK}" --namespace tigera-operator --create-namespace
3333
```
3434

3535
### For IPv6 Clusters
@@ -44,7 +44,7 @@ Then install the Helm chart on the workload cluster:
4444

4545
```bash
4646
helm repo add projectcalico https://docs.tigera.io/calico/charts && \
47-
helm install calico projectcalico/tigera-operator -f https://raw.githubusercontent.com/kubernetes-sigs/cluster-api-provider-azure/main/templates/addons/calico-ipv6/values.yaml --set-string "installation.calicoNetwork.ipPools[0].cidr=${IPV6_CIDR_BLOCK}" --namespace tigera-operator --create-namespace
47+
helm install calico projectcalico/tigera-operator --version v3.25.1 -f https://raw.githubusercontent.com/kubernetes-sigs/cluster-api-provider-azure/main/templates/addons/calico-ipv6/values.yaml --set-string "installation.calicoNetwork.ipPools[0].cidr=${IPV6_CIDR_BLOCK}" --namespace tigera-operator --create-namespace
4848
```
4949

5050
### For Dual-Stack Clusters
@@ -60,7 +60,7 @@ Then install the Helm chart on the workload cluster:
6060

6161
```bash
6262
helm repo add projectcalico https://docs.tigera.io/calico/charts && \
63-
helm install calico projectcalico/tigera-operator -f https://raw.githubusercontent.com/kubernetes-sigs/cluster-api-provider-azure/main/templates/addons/calico-dual-stack/values.yaml --set-string "installation.calicoNetwork.ipPools[0].cidr=${IPV4_CIDR_BLOCK}","installation.calicoNetwork.ipPools[1].cidr=${IPV6_CIDR_BLOCK}" --namespace tigera-operator --create-namespace
63+
helm install calico projectcalico/tigera-operator --version v3.25.1 -f https://raw.githubusercontent.com/kubernetes-sigs/cluster-api-provider-azure/main/templates/addons/calico-dual-stack/values.yaml --set-string "installation.calicoNetwork.ipPools[0].cidr=${IPV4_CIDR_BLOCK}","installation.calicoNetwork.ipPools[1].cidr=${IPV6_CIDR_BLOCK}" --namespace tigera-operator --create-namespace
6464
```
6565

6666
<aside class="note">

scripts/ci-e2e.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ export AZURE_LOCATION_GPU="${AZURE_LOCATION_GPU:-$(capz::util::get_random_region
7171
export AZURE_LOCATION_EDGEZONE="${AZURE_LOCATION_EDGEZONE:-$(capz::util::get_random_region_edgezone)}"
7272
export AZURE_CONTROL_PLANE_MACHINE_TYPE="${AZURE_CONTROL_PLANE_MACHINE_TYPE:-"Standard_B2s"}"
7373
export AZURE_NODE_MACHINE_TYPE="${AZURE_NODE_MACHINE_TYPE:-"Standard_B2s"}"
74-
export KIND_EXPERIMENTAL_DOCKER_NETWORK="bridge"
74+
CALICO_VERSION=$(make get-calico-version)
75+
export CALICO_VERSION
76+
7577

7678
capz::util::generate_ssh_key
7779

scripts/ci-entrypoint.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@ install_calico() {
180180
rm kubeadm-config-kube-system
181181
fi
182182
# install Calico CNI
183-
echo "Installing Calico CNI via helm"
183+
CALICO_VERSION=$(make get-calico-version)
184+
echo "Installing Calico CNI ${CALICO_VERSION} via helm"
184185
if [[ "${CIDR0:-}" =~ .*:.* ]]; then
185186
echo "Cluster CIDR is IPv6"
186187
CALICO_VALUES_FILE="${REPO_ROOT}/templates/addons/calico-ipv6/values.yaml"
@@ -194,7 +195,7 @@ install_calico() {
194195
CALICO_VALUES_FILE="${REPO_ROOT}/templates/addons/calico/values.yaml"
195196
CIDR_STRING_VALUES="installation.calicoNetwork.ipPools[0].cidr=${CIDR0}"
196197
fi
197-
"${HELM}" upgrade calico --install --repo https://docs.tigera.io/calico/charts tigera-operator -f "${CALICO_VALUES_FILE}" --set-string "${CIDR_STRING_VALUES}" --namespace calico-system
198+
"${HELM}" upgrade calico --install --repo https://docs.tigera.io/calico/charts --version "${CALICO_VERSION}" tigera-operator -f "${CALICO_VALUES_FILE}" --set-string "${CIDR_STRING_VALUES}" --namespace calico-system
198199
}
199200

200201
# install_cloud_provider_azure installs OOT cloud-provider-azure componentry onto the Cluster.

templates/addons/calico-dual-stack.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4351,7 +4351,7 @@ spec:
43514351
value: node
43524352
- name: DATASTORE_TYPE
43534353
value: kubernetes
4354-
image: docker.io/calico/kube-controllers:v3.25.0
4354+
image: docker.io/calico/kube-controllers:v3.25.1
43554355
imagePullPolicy: IfNotPresent
43564356
livenessProbe:
43574357
exec:
@@ -4428,7 +4428,7 @@ spec:
44284428
- configMapRef:
44294429
name: kubernetes-services-endpoint
44304430
optional: true
4431-
image: docker.io/calico/typha:v3.25.0
4431+
image: docker.io/calico/typha:v3.25.1
44324432
imagePullPolicy: IfNotPresent
44334433
livenessProbe:
44344434
httpGet:
@@ -4546,7 +4546,7 @@ spec:
45464546
- configMapRef:
45474547
name: kubernetes-services-endpoint
45484548
optional: true
4549-
image: docker.io/calico/node:v3.25.0
4549+
image: docker.io/calico/node:v3.25.1
45504550
imagePullPolicy: IfNotPresent
45514551
lifecycle:
45524552
preStop:
@@ -4621,7 +4621,7 @@ spec:
46214621
- configMapRef:
46224622
name: kubernetes-services-endpoint
46234623
optional: true
4624-
image: docker.io/calico/cni:v3.25.0
4624+
image: docker.io/calico/cni:v3.25.1
46254625
imagePullPolicy: IfNotPresent
46264626
name: install-cni
46274627
securityContext:
@@ -4635,7 +4635,7 @@ spec:
46354635
- calico-node
46364636
- -init
46374637
- -best-effort
4638-
image: docker.io/calico/node:v3.25.0
4638+
image: docker.io/calico/node:v3.25.1
46394639
imagePullPolicy: IfNotPresent
46404640
name: mount-bpffs
46414641
securityContext:

templates/addons/calico-ipv6.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4340,7 +4340,7 @@ spec:
43404340
value: node
43414341
- name: DATASTORE_TYPE
43424342
value: kubernetes
4343-
image: docker.io/calico/kube-controllers:v3.25.0
4343+
image: docker.io/calico/kube-controllers:v3.25.1
43444344
imagePullPolicy: IfNotPresent
43454345
livenessProbe:
43464346
exec:
@@ -4417,7 +4417,7 @@ spec:
44174417
- configMapRef:
44184418
name: kubernetes-services-endpoint
44194419
optional: true
4420-
image: docker.io/calico/typha:v3.25.0
4420+
image: docker.io/calico/typha:v3.25.1
44214421
imagePullPolicy: IfNotPresent
44224422
livenessProbe:
44234423
httpGet:
@@ -4535,7 +4535,7 @@ spec:
45354535
- configMapRef:
45364536
name: kubernetes-services-endpoint
45374537
optional: true
4538-
image: docker.io/calico/node:v3.25.0
4538+
image: docker.io/calico/node:v3.25.1
45394539
imagePullPolicy: IfNotPresent
45404540
lifecycle:
45414541
preStop:
@@ -4610,7 +4610,7 @@ spec:
46104610
- configMapRef:
46114611
name: kubernetes-services-endpoint
46124612
optional: true
4613-
image: docker.io/calico/cni:v3.25.0
4613+
image: docker.io/calico/cni:v3.25.1
46144614
imagePullPolicy: IfNotPresent
46154615
name: install-cni
46164616
securityContext:
@@ -4624,7 +4624,7 @@ spec:
46244624
- calico-node
46254625
- -init
46264626
- -best-effort
4627-
image: docker.io/calico/node:v3.25.0
4627+
image: docker.io/calico/node:v3.25.1
46284628
imagePullPolicy: IfNotPresent
46294629
name: mount-bpffs
46304630
securityContext:

templates/addons/calico-ipv6/calico-policy-only.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4441,7 +4441,7 @@ spec:
44414441
# This container installs the CNI binaries
44424442
# and CNI network config file on each node.
44434443
- name: install-cni
4444-
image: docker.io/calico/cni:v3.25.0
4444+
image: docker.io/calico/cni:v3.25.1
44454445
imagePullPolicy: IfNotPresent
44464446
command: ["/opt/cni/bin/install"]
44474447
envFrom:
@@ -4478,7 +4478,7 @@ spec:
44784478
# i.e. bpf at /sys/fs/bpf and cgroup2 at /run/calico/cgroup. Calico-node initialisation is executed
44794479
# in best effort fashion, i.e. no failure for errors, to not disrupt pod creation in iptable mode.
44804480
- name: "mount-bpffs"
4481-
image: docker.io/calico/node:v3.25.0
4481+
image: docker.io/calico/node:v3.25.1
44824482
imagePullPolicy: IfNotPresent
44834483
command: ["calico-node", "-init", "-best-effort"]
44844484
volumeMounts:
@@ -4504,7 +4504,7 @@ spec:
45044504
# container programs network policy and routes on each
45054505
# host.
45064506
- name: calico-node
4507-
image: docker.io/calico/node:v3.25.0
4507+
image: docker.io/calico/node:v3.25.1
45084508
imagePullPolicy: IfNotPresent
45094509
envFrom:
45104510
- configMapRef:
@@ -4692,7 +4692,7 @@ spec:
46924692
priorityClassName: system-cluster-critical
46934693
containers:
46944694
- name: calico-kube-controllers
4695-
image: docker.io/calico/kube-controllers:v3.25.0
4695+
image: docker.io/calico/kube-controllers:v3.25.1
46964696
imagePullPolicy: IfNotPresent
46974697
env:
46984698
# Choose which controllers to run.
@@ -4776,7 +4776,7 @@ spec:
47764776
securityContext:
47774777
fsGroup: 65534
47784778
containers:
4779-
- image: docker.io/calico/typha:v3.25.0
4779+
- image: docker.io/calico/typha:v3.25.1
47804780
imagePullPolicy: IfNotPresent
47814781
name: calico-typha
47824782
ports:

templates/addons/calico.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4355,7 +4355,7 @@ spec:
43554355
value: node
43564356
- name: DATASTORE_TYPE
43574357
value: kubernetes
4358-
image: docker.io/calico/kube-controllers:v3.25.0
4358+
image: docker.io/calico/kube-controllers:v3.25.1
43594359
imagePullPolicy: IfNotPresent
43604360
livenessProbe:
43614361
exec:
@@ -4468,7 +4468,7 @@ spec:
44684468
- configMapRef:
44694469
name: kubernetes-services-endpoint
44704470
optional: true
4471-
image: docker.io/calico/node:v3.25.0
4471+
image: docker.io/calico/node:v3.25.1
44724472
imagePullPolicy: IfNotPresent
44734473
lifecycle:
44744474
preStop:
@@ -4540,7 +4540,7 @@ spec:
45404540
- configMapRef:
45414541
name: kubernetes-services-endpoint
45424542
optional: true
4543-
image: docker.io/calico/cni:v3.25.0
4543+
image: docker.io/calico/cni:v3.25.1
45444544
imagePullPolicy: IfNotPresent
45454545
name: upgrade-ipam
45464546
securityContext:
@@ -4575,7 +4575,7 @@ spec:
45754575
- configMapRef:
45764576
name: kubernetes-services-endpoint
45774577
optional: true
4578-
image: docker.io/calico/cni:v3.25.0
4578+
image: docker.io/calico/cni:v3.25.1
45794579
imagePullPolicy: IfNotPresent
45804580
name: install-cni
45814581
securityContext:
@@ -4589,7 +4589,7 @@ spec:
45894589
- calico-node
45904590
- -init
45914591
- -best-effort
4592-
image: docker.io/calico/node:v3.25.0
4592+
image: docker.io/calico/node:v3.25.1
45934593
imagePullPolicy: IfNotPresent
45944594
name: mount-bpffs
45954595
securityContext:

templates/addons/calico/calico-vxlan.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4440,7 +4440,7 @@ spec:
44404440
# It can be deleted if this is a fresh installation, or if you have already
44414441
# upgraded to use calico-ipam.
44424442
- name: upgrade-ipam
4443-
image: docker.io/calico/cni:v3.25.0
4443+
image: docker.io/calico/cni:v3.25.1
44444444
imagePullPolicy: IfNotPresent
44454445
command: ["/opt/cni/bin/calico-ipam", "-upgrade"]
44464446
envFrom:
@@ -4468,7 +4468,7 @@ spec:
44684468
# This container installs the CNI binaries
44694469
# and CNI network config file on each node.
44704470
- name: install-cni
4471-
image: docker.io/calico/cni:v3.25.0
4471+
image: docker.io/calico/cni:v3.25.1
44724472
imagePullPolicy: IfNotPresent
44734473
command: ["/opt/cni/bin/install"]
44744474
envFrom:
@@ -4511,7 +4511,7 @@ spec:
45114511
# i.e. bpf at /sys/fs/bpf and cgroup2 at /run/calico/cgroup. Calico-node initialisation is executed
45124512
# in best effort fashion, i.e. no failure for errors, to not disrupt pod creation in iptable mode.
45134513
- name: "mount-bpffs"
4514-
image: docker.io/calico/node:v3.25.0
4514+
image: docker.io/calico/node:v3.25.1
45154515
imagePullPolicy: IfNotPresent
45164516
command: ["calico-node", "-init", "-best-effort"]
45174517
volumeMounts:
@@ -4537,7 +4537,7 @@ spec:
45374537
# container programs network policy and routes on each
45384538
# host.
45394539
- name: calico-node
4540-
image: docker.io/calico/node:v3.25.0
4540+
image: docker.io/calico/node:v3.25.1
45414541
imagePullPolicy: IfNotPresent
45424542
envFrom:
45434543
- configMapRef:
@@ -4752,7 +4752,7 @@ spec:
47524752
priorityClassName: system-cluster-critical
47534753
containers:
47544754
- name: calico-kube-controllers
4755-
image: docker.io/calico/kube-controllers:v3.25.0
4755+
image: docker.io/calico/kube-controllers:v3.25.1
47564756
imagePullPolicy: IfNotPresent
47574757
env:
47584758
# Choose which controllers to run.

0 commit comments

Comments
 (0)