mirror of
https://github.com/tailscale/tailscale.git
synced 2026-12-01 14:12:32 -08:00
* cmd/k8s-operator,k8s-operator,ipn/store/kubestore: add per-proxy RBAC Proxies for Services, Ingresses, Connectors and PeerRelays run as the shared proxies ServiceAccount, whose Role allows every verb on every Secret in the operator namespace, so each proxy can read and change the Secrets of the operator and of other proxies. This fixes this by giving each of those proxies its own ServiceAccount, Role and RoleBinding, where the Role names only that proxy's state Secrets, and the chart no longer installs the proxies Role. It also removes the list and watch on every Secret from ProxyGroup Roles, and the Secret rule with no resourceNames that ProxyGroup and Recorder Roles got at zero replicas, so kubestore read replicas now get cert Secrets by name. Existing proxy Pods restart once on upgrade. Updates tailscale/corp#51011 Signed-off-by: chaosinthecrd <[email protected]> * cmd/k8s-operator,k8s-operator,ipn/store/kubestore: test per-proxy RBAC Adds tests for the ServiceAccount, Role and RoleBinding that each Service proxy and PeerRelay gets, including copied imagePullSecrets, and for the ProxyGroup Role rules, including zero replicas. Adds an e2e test that uses SubjectAccessReviews to check that a Service proxy and a ProxyGroup can get their own state Secret, but cannot get the operator's OAuth Secret or each other's state Secret, and cannot list Secrets. Also adds tests for reloading shared TLS certs by name on read replicas, including a cert Secret that is deleted and then recreated, and removes the test for the Secret list that read replicas no longer do. Updates tailscale/corp#51011 Signed-off-by: chaosinthecrd <[email protected]> * kubestore: fix test lint failure Change-Id: Ia988256dfe611a64b46cdb81d4e1d68bd7873ca4 Signed-off-by: Mike Jensen <[email protected]> --------- Signed-off-by: chaosinthecrd <[email protected]> Signed-off-by: Mike Jensen <[email protected]> Co-authored-by: Mike Jensen <[email protected]>