Repository navigation
squid rolls when squid.conf or its reload wrapper changes (fix for #2216) - #2287
Draft
massimo-sandboxaq wants to merge 1 commit into
Draft
massimo-sandboxaq wants to merge 1 commit into
massimo-sandboxaq wants to merge 1 commit into
Conversation
squid reads both only when its pod starts, and the wrapper watches neither, so applying a change to either left the running pods on the old ones until someone restarted them. And since the ConfigMaps and the Deployment are applied together, a pod starting mid-apply could take the old wrapper (seen on a dev slot). fill-placeholders.py now writes a hash of the two filled ConfigMaps on squid's pod template (switch.dev/squid-config), so a change to either rolls the pods, and nothing else does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A fix for #2216's squid deployment, found while testing on a dev slot.
The problem
squid.conf(squid-conf) and its reload wrapper (squid-reload) only when its pod starts. The wrapper watches box files and logins, not those two.kubectl rollout restart.The fix:
fill-placeholders.pywrites a hash of the two filled ConfigMaps on squid's pod template, asswitch.dev/squid-config(the__SQUID_CONFIG_HASH__placeholder). A change to either changes the pod template and rolls the pods, and nothing else does. Because it's computed from the filled text, values such as the agents' subnet count too.The cluster contract gains a placeholder fill for the new token.
Tested
squid.confdoes. The contract was regenerated.50-egress-proxy.yamlpasses a server-side dry run on a dev slot's box cluster.🤖 Generated with Claude Code