Repository navigation
[release-v1.42] Keep typhaDeployment overrides on the non-cluster-host Typha - #5368
Merged
caseydavenport merged 3 commits intoOct 29, 2026
Conversation
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.
Description
This PR fixes the non-cluster-host Typha deployment (
calico-typha-noncluster-host) dropping thecalico-typhacontainer overrides set in the Installation'sspec.typhaDeployment, and having its pods rejected when certificate management is enabled. The operator copiescalico-typhaafter applying the overrides, but then replaced the copy's container with a freshly built one, so resource requests and limits never reached it and it rendered with no resources at all.calico-typhacontainer and swaps only what has to differ: the env vars, the non-cluster-host certificate mounts, and the probes (which drop the host). Affinity is still cleared and host networking still off on the copy, as before, since those overrides don't apply to a pod-networked Typha.TYPHA_SHUTDOWNTIMEOUTSECSto the 300 second default while the pod kept the overridden termination grace period, so Typha paced client disconnects for a different grace period than kubelet enforced. The existing post-override fix-up now runs on the copy too, so the timeout and progress deadline follow the overridden grace period.typha-certs-key-cert-provisionerinit container, which mounts a volume the copy doesn't have. The API server rejected its pods, so non-cluster hosts had no Typha. The copy now gets its own provisioner for the non-cluster-host certificate.calico-typharesources and grace period overrides reach the non-cluster-host deployment while affinity is still cleared. Another, with certificate management on, checks that every volume mount in both Typha pods names a volume the pod defines. Both failed before their fixes, and the fullpkg/rendersuite passes. Not tried on a real cluster.PR 14150 (overrides after variant modifiers) fixed this class of bug in newer operator versions. On this branch every other component applies its overrides as the last render step, so the non-cluster-host Typha is the one place it shows up here.
AI assistance: Claude Code traced the bugs and wrote the fixes and the tests; I reviewed the change.
By opening this PR you take responsibility for every line in it, and you agree to explain the change yourself during review rather than routing review comments back through an agent. See AI_POLICY.md.
Release Note
For PR author
make gen-filesmake gen-versionsFor PR reviewers
A note for code reviewers - all pull requests must have the following:
kind/bugif this is a bugfix.kind/enhancementif this is a a new feature.enterpriseif this PR applies to Calico Enterprise only.Agent context
Decisions
typha-certs-noncluster-host-key-cert-provisioner(SECRET_NAMEtypha-certs-noncluster-host, mounting thetypha-certs-noncluster-hostvolume). Other init containers are left alone. The replacement keeps the replaced init container's security context and resources, so atypha-certs-key-cert-provisionerresources override in spec.typhaDeployment still applies.Constraints and gotchas
typha-certs-noncluster-host, so the cluster provisioner'stypha-certsmount pointed at a missing volume. Even if the pod were accepted, nothing would request the non-cluster-host certificate into its volume. Newer operator versions already render the non-cluster-host provisioner this way.Verification
{Limits: nil, Requests: nil}for the container resources.calico-typha-noncluster-host container typha-certs-key-cert-provisioner mounts a volume the pod does not define(the pod's volumes were tigera-ca-bundle and typha-certs-noncluster-host). Disabling the resources carry-over also makes it fail.make ut UT_DIR=./pkg/renderpasses, with the top-level render suite at 554 of 554 specs. Not run on a real cluster.Code map