Skip to content

Commit 853c6a6

Browse files
committed
Temporarily move CNI deployment to postKubeadmCommands
Addons (CNI) currently fail to deploy, likely due to a timeout with API server availability. Without a pre-built image, capz takes longer for the control plane to come up. To work around this, we'll use a `postKubeadmCommands` in controlplane-0 (examples/controlplane/controlplane.yaml). This should be removed once we confirm the create-cluster target can successfully deploy CNI. Signed-off-by: Stephen Augustus <[email protected]>
1 parent 9272174 commit 853c6a6

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
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/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)