Files
tailscale/cmd/k8s-operator/deploy/chart
BeckyPauleyandTom Meadows 1ef2948369 cmd/k8s-operator,k8s-operator: give ProxyGroups the chart imagePullSecrets (#22785) (#22816)
* cmd/k8s-operator,k8s-operator: give ProxyGroups the chart imagePullSecrets

The operator copies the Helm chart imagePullSecrets value from the proxies
ServiceAccount onto the ServiceAccount of each Service, Ingress, Connector
and PeerRelay proxy, but not onto the one it creates for each ProxyGroup,
so with a private registry ProxyGroup Pods cannot pull the proxy image.
Its update of that ServiceAccount also removed all annotations, while
OpenShift adds an annotation and a pull secret to every ServiceAccount,
adds them again when they are removed, and the operator watches this one.
This fixes this by adding the imagePullSecrets of the proxies
ServiceAccount to the ProxyGroup ServiceAccount and keeping the
annotations and pull secrets that others add. Entries removed from the
chart value stay on existing ProxyGroup ServiceAccounts.

Fixes #22783
Fixes #22784

Change-Id: Ided67a2972b81c1a95281cf8ef85eae34fee4a3c


* cmd/k8s-operator: test ProxyGroup ServiceAccount pull secrets and annotations

Adds a test that egress, ingress and kube-apiserver ProxyGroups get the
imagePullSecrets of the proxies ServiceAccount without losing entries or
annotations that others add, and that kube-apiserver ProxyGroups in auth
mode leave the static ServiceAccount alone. It also checks that reconcile
fails without creating the ServiceAccount when the proxies ServiceAccount
cannot be read.

Updates #22783
Updates #22784

Change-Id: Ibf73086cdf0f622cc7761cc5f0a6cee482a3b5c8


---------

Change-Id: I3cf0d31a0159a3cda70e870e93e9e1d1a8c92ed4

(cherry picked from commit 7edc089a07)

Signed-off-by: chaosinthecrd <[email protected]>
Co-authored-by: Tom Meadows <[email protected]>
2026-12-02 14:28:38 +00:00
..