Agent Mesh
Go a2aa2a-protocolagent-meshagentic-aiinferencemcpmeshmesh-networknetwork-securitynetworking-aip2p-network
charts: disable surge when controlPlane.hostPort is set
Tomas Tormo678ea5f854d2
diff --git a/charts/sam-mesh/templates/control-plane-deployment.yaml b/charts/sam-mesh/templates/control-plane-deployment.yamlindex 2f371037..96d76d8d 100644--- a/charts/sam-mesh/templates/control-plane-deployment.yaml+++ b/charts/sam-mesh/templates/control-plane-deployment.yaml@@ -6,6 +6,14 @@ metadata:{{- include "sam-mesh.labels" . | nindent 4 }}spec:replicas: {{ .Values.controlPlane.replicaCount }}+ {{- if .Values.controlPlane.hostPort }}+ # hostPort: a surged pod can't bind a port the old pod still holds, so the+ # default maxSurge=1 deadlocks the rollout on port-saturated nodes.+ strategy:+ rollingUpdate:+ maxSurge: 0+ maxUnavailable: 1+ {{- end }}selector:matchLabels:app: {{ include "sam-mesh.fullname" . }}-control-planediff --git a/charts/sam-mesh/tests/control-plane-deployment_test.yaml b/charts/sam-mesh/tests/control-plane-deployment_test.yamlindex 7b9f34d4..238f010b 100644--- a/charts/sam-mesh/tests/control-plane-deployment_test.yaml+++ b/charts/sam-mesh/tests/control-plane-deployment_test.yaml@@ -26,6 +26,24 @@ tests:path: spec.template.metadata.annotations["checksum/secrets"]pattern: ^[0-9a-f]{64}$+ - it: hostPort disables surge so rollouts can rebind the node port+ template: templates/control-plane-deployment.yaml+ set:+ controlPlane.hostPort: 8080+ asserts:+ - equal:+ path: spec.strategy.rollingUpdate.maxSurge+ value: 0+ - equal:+ path: spec.strategy.rollingUpdate.maxUnavailable+ value: 1++ - it: no strategy override without hostPort+ template: templates/control-plane-deployment.yaml+ asserts:+ - notExists:+ path: spec.strategy+- it: uses the default image tag when none is pinnedtemplate: templates/control-plane-deployment.yamlasserts: