Skip to content

Commit c04dd48

Browse files
authored
Merge pull request #279 from justaugustus/a2-data
[v1alpha2] Update Calico and temporarily move CNI deployment
2 parents 9272174 + b5c9e4e commit c04dd48

File tree

3 files changed

+19
-11
lines changed

3 files changed

+19
-11
lines changed

Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,13 @@ create-cluster: $(CLUSTERCTL) ## Create a development Kubernetes cluster on Azur
280280
--namespace=default \
281281
--cluster-name=$(CLUSTER_NAME)
282282
# Apply addons on the target cluster, waiting for the control-plane to become available.
283-
$(CLUSTERCTL) \
284-
alpha phases apply-addons -v=3 \
283+
# TODO: Uncomment this once we've enabled image building: https://github.com/kubernetes-sigs/image-builder/pull/49
284+
# Addons (CNI) currently fail to deploy, likely due to a timeout with API server availability.
285+
# Without a pre-built image, capz takes longer for the control plane to come up.
286+
# In the meantime, we'll use a `postKubeadmCommands` in controlplane-0 (examples/controlplane/controlplane.yaml).
287+
# Please also remove that command once we confirm the create-cluster target works again.
288+
# $(CLUSTERCTL) \
289+
alpha phases apply-addons -v=10 \
285290
--kubeconfig=./kubeconfig \
286291
-a examples/addons.yaml
287292
# Create a worker node with MachineDeployment.

examples/addons.yaml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,7 @@ rules:
388388
- networksets
389389
- clusterinformations
390390
- hostendpoints
391+
- blockaffinities
391392
verbs:
392393
- get
393394
- list
@@ -515,7 +516,7 @@ spec:
515516
# It can be deleted if this is a fresh installation, or if you have already
516517
# upgraded to use calico-ipam.
517518
- name: upgrade-ipam
518-
image: calico/cni:v3.8.2
519+
image: calico/cni:v3.9.1
519520
command: ["/opt/cni/bin/calico-ipam", "-upgrade"]
520521
env:
521522
- name: KUBERNETES_NODE_NAME
@@ -535,7 +536,7 @@ spec:
535536
# This container installs the CNI binaries
536537
# and CNI network config file on each node.
537538
- name: install-cni
538-
image: calico/cni:v3.8.2
539+
image: calico/cni:v3.9.1
539540
command: ["/install-cni.sh"]
540541
env:
541542
# Name of the CNI config file to create.
@@ -569,7 +570,7 @@ spec:
569570
# Adds a Flex Volume Driver that creates a per-pod Unix Domain Socket to allow Dikastes
570571
# to communicate with Felix over the Policy Sync API.
571572
- name: flexvol-driver
572-
image: calico/pod2daemon-flexvol:v3.8.2
573+
image: calico/pod2daemon-flexvol:v3.9.1
573574
volumeMounts:
574575
- name: flexvol-driver-host
575576
mountPath: /host/driver
@@ -578,7 +579,7 @@ spec:
578579
# container programs network policy and routes on each
579580
# host.
580581
- name: calico-node
581-
image: calico/node:v3.8.2
582+
image: calico/node:v3.9.1
582583
env:
583584
# Use Kubernetes API as the backing datastore.
584585
- name: DATASTORE_TYPE
@@ -631,10 +632,10 @@ spec:
631632
requests:
632633
cpu: 250m
633634
livenessProbe:
634-
httpGet:
635-
path: /liveness
636-
port: 9099
637-
host: localhost
635+
exec:
636+
command:
637+
- /bin/calico-node
638+
- -felix-live
638639
periodSeconds: 10
639640
initialDelaySeconds: 10
640641
failureThreshold: 6
@@ -745,7 +746,7 @@ spec:
745746
priorityClassName: system-cluster-critical
746747
containers:
747748
- name: calico-kube-controllers
748-
image: calico/kube-controllers:v3.8.2
749+
image: calico/kube-controllers:v3.9.1
749750
env:
750751
# Choose which controllers to run.
751752
- name: ENABLED_CONTROLLERS

examples/controlplane/controlplane.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ spec:
7070
readOnly: true
7171
preKubeadmCommands:
7272
- bash -c /tmp/kubeadm-bootstrap.sh
73+
postKubeadmCommands:
74+
- kubectl --kubeconfig /etc/kubernetes/admin.conf apply -f https://raw.githubusercontent.com/kubernetes-sigs/cluster-api-provider-azure/v1alpha2/examples/addons.yaml
7375
files:
7476
- path: /tmp/kubeadm-bootstrap.sh
7577
owner: "root:root"

0 commit comments

Comments
 (0)