Skip to content

Commit 6cfd95c

Browse files
committed
Upgrade to calico 3.29 and use windows support
Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
1 parent d9da21b commit 6cfd95c

File tree

52 files changed

+7365
-12074
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+7365
-12074
lines changed

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -536,8 +536,7 @@ generate-e2e-templates: $(KUSTOMIZE) ## Generate Azure infrastructure templates
536536
generate-addons: fetch-calico-manifests ## Generate metric-server, calico, calico-ipv6, azure cni v1 addons.
537537
$(KUSTOMIZE) build $(ADDONS_DIR)/metrics-server > $(ADDONS_DIR)/metrics-server/metrics-server.yaml
538538
$(KUSTOMIZE) build $(ADDONS_DIR)/calico > $(ADDONS_DIR)/calico.yaml
539-
$(KUSTOMIZE) build $(ADDONS_DIR)/calico-ipv6 > $(ADDONS_DIR)/calico-ipv6.yaml
540-
$(KUSTOMIZE) build $(ADDONS_DIR)/calico-dual-stack > $(ADDONS_DIR)/calico-dual-stack.yaml
539+
$(KUSTOMIZE) build $(ADDONS_DIR)/metrics-server > $(ADDONS_DIR)/metrics-server/metrics-server.yaml
541540
$(KUSTOMIZE) build $(ADDONS_DIR)/azure-cni-v1 > $(ADDONS_DIR)/azure-cni-v1.yaml
542541

543542
.PHONY: generate-aso-crds
@@ -552,7 +551,7 @@ generate-aso-crds: $(YQ)
552551
> $(ASO_CRDS_PATH)
553552

554553
# When updating this, make sure to also update the Windows image version in templates/addons/windows/calico.
555-
export CALICO_VERSION := v3.26.1
554+
export CALICO_VERSION := v3.29.4
556555
# Where all downloaded Calico manifests are unpacked and stored.
557556
CALICO_RELEASES := $(ARTIFACTS)/calico
558557
# Path to manifests directory in a Calico release archive.

Tiltfile

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -469,15 +469,6 @@ def deploy_worker_templates(template, substitutions):
469469
echo "API Server of ${CLUSTER_NAME} is accessible";
470470
'''
471471

472-
# copy the kubeadm configmap to the calico-system namespace.
473-
# This is a workaround needed for the calico-node-windows daemonset to be able to run in the calico-system namespace.
474-
if "windows" in flavor_name:
475-
flavor_cmd += """
476-
until """ + kubectl_cmd + """ --kubeconfig ./${CLUSTER_NAME}.kubeconfig get configmap kubeadm-config --namespace=kube-system > /dev/null 2>&1; do sleep 5; done;
477-
""" + kubectl_cmd + """ --kubeconfig ./${CLUSTER_NAME}.kubeconfig create namespace calico-system --dry-run=client -o yaml | """ + kubectl_cmd + """ --kubeconfig ./${CLUSTER_NAME}.kubeconfig apply -f -;
478-
""" + kubectl_cmd + """ --kubeconfig ./${CLUSTER_NAME}.kubeconfig get configmap kubeadm-config --namespace=kube-system -o yaml | sed 's/namespace: kube-system/namespace: calico-system/' | """ + kubectl_cmd + """ --kubeconfig ./${CLUSTER_NAME}.kubeconfig apply -f -;
479-
"""
480-
481472
if "aks_as_mgmt_settings" in settings and needs_vnet_peering(flavor_name):
482473
flavor_cmd += create_private_dns_zone()
483474

docs/book/src/self-managed/addons.md

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -63,21 +63,6 @@ helm repo add projectcalico https://docs.tigera.io/calico/charts && \
6363
helm install calico projectcalico/tigera-operator --version v3.26.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

66-
<aside class="note">
67-
68-
<h1> Note </h1>
69-
70-
For Windows nodes, you also need to copy the kubeadm-config configmap to the calico-system namespace so the calico-node-windows Daemonset can find it:
71-
72-
```bash
73-
kubectl create ns calico-system
74-
kubectl get configmap kubeadm-config --namespace=kube-system -o yaml \
75-
| sed 's/namespace: kube-system/namespace: calico-system/' \
76-
| kubectl create -f -
77-
```
78-
79-
</aside>
80-
8166
For more information, see the [official Calico documentation](https://projectcalico.docs.tigera.io/getting-started/kubernetes/helm).
8267

8368
## Flannel

scripts/ci-configmap.sh

Lines changed: 0 additions & 29 deletions
This file was deleted.

scripts/ci-entrypoint.sh

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -146,29 +146,6 @@ create_cluster() {
146146
export KUBE_SSH_USER
147147
}
148148

149-
# copy_kubeadm_config_map copies the kubeadm configmap into the calico-system namespace.
150-
# any retryable operation in this function must return a non-zero exit code on failure so that we can
151-
# retry it using a `until copy_kubeadm_config_map; do sleep 5; done` pattern;
152-
# and any statement must be idempotent so that subsequent retry attempts can make forward progress.
153-
copy_kubeadm_config_map() {
154-
# Copy the kubeadm configmap to the calico-system namespace.
155-
# This is a workaround needed for the calico-node-windows daemonset
156-
# to be able to run in the calico-system namespace.
157-
# First, validate that the kubeadm-config configmap has been created.
158-
"${KUBECTL}" get configmap kubeadm-config --namespace=kube-system -o yaml || return 1
159-
"${KUBECTL}" create namespace calico-system --dry-run=client -o yaml | kubectl apply -f - || return 1
160-
if ! "${KUBECTL}" get configmap kubeadm-config --namespace=calico-system; then
161-
"${KUBECTL}" get configmap kubeadm-config --namespace=kube-system -o yaml | sed 's/namespace: kube-system/namespace: calico-system/' | "${KUBECTL}" apply -f - || return 1
162-
fi
163-
}
164-
165-
wait_for_copy_kubeadm_config_map() {
166-
echo "Copying kubeadm ConfigMap into calico-system namespace"
167-
until copy_kubeadm_config_map; do
168-
sleep 5
169-
done
170-
}
171-
172149
# wait_for_nodes returns when all nodes in the workload cluster are Ready.
173150
wait_for_nodes() {
174151
echo "Waiting for ${CONTROL_PLANE_MACHINE_COUNT} control plane machine(s), ${WORKER_MACHINE_COUNT} worker machine(s), and ${WINDOWS_WORKER_MACHINE_COUNT:-0} windows machine(s) to become Ready"
@@ -206,8 +183,6 @@ wait_for_pods() {
206183
}
207184

208185
install_addons() {
209-
export -f copy_kubeadm_config_map wait_for_copy_kubeadm_config_map
210-
timeout --foreground 600 bash -c wait_for_copy_kubeadm_config_map
211186
# In order to determine the successful outcome of CNI and cloud-provider-azure,
212187
# we need to wait a little bit for nodes and pods terminal state,
213188
# so we block successful return upon the cluster being fully operational.

0 commit comments

Comments
 (0)