ipn/store/kubestore,kube: fix cert error in admin UI (#16717)

Also adds a test to kube/kubeclient to defend against the error type
returned by the client changing in future.

Fixes tailscale/corp#30855

Change-Id: Id11d4295003e66ad5c29a687f1239333c21226a4

Signed-off-by: Tom Proctor <tomhjp@users.noreply.github.com>
This commit is contained in:
Tom Proctor
2025-07-30 13:39:59 +01:00
committed by GitHub
parent aa6a2d1e56
commit eed3e5dc61
3 changed files with 101 additions and 0 deletions
+7
View File
@@ -426,6 +426,13 @@ func TestReadTLSCertAndKey(t *testing.T) {
secretGetErr: &kubeapi.Status{Code: 404},
wantErr: ipn.ErrStateNotExist,
},
{
name: "cert_share_ro_mode_forbidden",
certShareMode: "ro",
domain: testDomain,
secretGetErr: &kubeapi.Status{Code: 403},
wantErr: ipn.ErrStateNotExist,
},
{
name: "cert_share_ro_mode_empty_cert_in_secret",
certShareMode: "ro",