Skip to content

Strip apiserver endpoint env vars on non-cluster-host Typha by default#4846

Merged
caseydavenport merged 2 commits into
tigera:masterfrom
caseydavenport:casey-nch-typha-strip
May 21, 2026
Merged

Strip apiserver endpoint env vars on non-cluster-host Typha by default#4846
caseydavenport merged 2 commits into
tigera:masterfrom
caseydavenport:casey-nch-typha-strip

Conversation

@caseydavenport
Copy link
Copy Markdown
Member

Follow-up to #4840.

The previous fix only overrode KUBERNETES_SERVICE_HOST/PORT on the non-cluster-host Typha when an explicit pod-network endpoint was configured. If it wasn't, the NCH Typha still inherited the host-network endpoint (e.g. proxy.local:6444 on MKE) and crashlooped just like before.

Since the NCH Typha runs pod-networked, it should default to the in-cluster kubernetes Service that kubelet injects into every pod. Always strip the inherited env vars in typhaEnvVarsNonClusterHost, and only re-add them if K8sServiceEpPodNetwork is set explicitly.

Related: https://tigera.atlassian.net/browse/CI-1987

None

The non-cluster-host Typha is pod-networked, so it should use the
default in-cluster kubernetes Service that kubelet injects into every
pod. Always strip the inherited KUBERNETES_SERVICE_HOST/PORT (which
come from the host-network endpoint, e.g. proxy.local on MKE) and only
override when a pod-network endpoint is explicitly configured.
@caseydavenport caseydavenport merged commit e7f4d18 into tigera:master May 21, 2026
6 checks passed
@caseydavenport caseydavenport deleted the casey-nch-typha-strip branch May 21, 2026 23:59
caseydavenport added a commit that referenced this pull request May 22, 2026
#4846) (#4847)

* Strip apiserver endpoint env vars on non-cluster-host Typha by default

The non-cluster-host Typha is pod-networked, so it should use the
default in-cluster kubernetes Service that kubelet injects into every
pod. Always strip the inherited KUBERNETES_SERVICE_HOST/PORT (which
come from the host-network endpoint, e.g. proxy.local on MKE) and only
override when a pod-network endpoint is explicitly configured.

* Use slices.DeleteFunc instead of bespoke env-var filter helper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants