Restart the router when its routing config changes (2.0.0+up1.46.4)
The deployment now carries a checksum/config annotation over the rendered ConfigMap, so a changed routing table produces a new pod template and a controlled rollout. Without it a mapping change was inert but looked successful: the file is mounted with subPath (kubelet never refreshes those in a running container) and mc-router reads ROUTES_CONFIG only at startup. That combination caused the minecraft-server stage-3 outage - the ConfigMap pointed at the renamed services, the running router kept proxying to the old ones, and the pod stayed Ready throughout. Major bump: runtime behaviour changes. A mapping change now costs a router restart (~4.5 s in k3d, so roughly 17-19 s in the real cluster) during which clients cannot connect. That restart is what makes the change take effect at all. Refs #82.
This commit is contained in:
3 files changed
+13
-1
No files matched your search
@@ -14,6 +14,13 @@ spec:
|
||||
name: {{ .Release.Name }}-{{ .Chart.Name }}-deployment
|
||||
labels:
|
||||
app: {{ .Release.Name }}-{{ .Chart.Name }}-deployment
|
||||
annotations:
|
||||
# Rolls the pod whenever the rendered routing ConfigMap changes.
|
||||
# Without it a changed routing table stays inert: the file is mounted
|
||||
# with subPath (kubelet never refreshes those in a running container)
|
||||
# and mc-router reads ROUTES_CONFIG only at startup, so the router
|
||||
# would keep serving the old routes while everything looks healthy.
|
||||
checksum/config: {{ include (print $.Template.BasePath "/minecraft-router.configmap.yaml") . | sha256sum }}
|
||||
spec:
|
||||
automountServiceAccountToken: false
|
||||
securityContext:
|
||||
|
||||
Reference in new issue
Block a user