From 3bed5749b58c24f33ebbfb958d759fcabefd41d3 Mon Sep 17 00:00:00 2001 From: Johannes Scheerer Date: Wed, 23 Feb 2022 14:17:48 +0100 Subject: [PATCH] Allow typha deployment updates even on single node clusters. As calico-typha is crucial to calico-node's operation, we want it to be available all the time. However, setting maxUnavailable=0 in the rollingUpdate strategy of the deployment will block updates on single node clusters. This is due to the fact that calico-typha runs in the host network and uses a static port. Hence, a new container cannot run on the single node until the old instance is stopped. Therefore, we bite the bullet and allow unavailability of one instance. --- .../calico/templates/typha/deployment-calico-typha.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/charts/internal/calico/templates/typha/deployment-calico-typha.yaml b/charts/internal/calico/templates/typha/deployment-calico-typha.yaml index 6f77e54f2..4e278c674 100644 --- a/charts/internal/calico/templates/typha/deployment-calico-typha.yaml +++ b/charts/internal/calico/templates/typha/deployment-calico-typha.yaml @@ -26,7 +26,9 @@ spec: # Ensure that typha always stays available type: RollingUpdate rollingUpdate: - maxUnavailable: 0 + # We would want maxUnavailable=0, but for one node cluster this would block updates + # as the port would already be occupied due to usage of host network + maxUnavailable: 1 maxSurge: 25% selector: matchLabels: