From 66d73b09f2f0f093da4a463bc93b1e971f2b79a8 Mon Sep 17 00:00:00 2001 From: Andrew Seigner Date: Fri, 22 Dec 2023 01:51:26 +0000 Subject: [PATCH] Remove shortnames from Tap API resources The Tap API resource shortnames were colliding with existing Kubernetes resources (e.g. `po`, `deploy`, etc), causing warnings from kubectl v1.29.0+. Remove the shortnames from the Tap APIService handlers. Fixes linkerd/linkerd2#11784 Signed-off-by: Andrew Seigner --- viz/tap/api/handlers.go | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/viz/tap/api/handlers.go b/viz/tap/api/handlers.go index d740dca27192b..5869eb7bb1b30 100644 --- a/viz/tap/api/handlers.go +++ b/viz/tap/api/handlers.go @@ -55,19 +55,18 @@ var ( resources = []struct { name string - shortname string namespaced bool }{ - {"namespaces", "ns", false}, - {"pods", "po", true}, - {"replicationcontrollers", "rc", true}, - {"services", "svc", true}, - {"daemonsets", "ds", true}, - {"deployments", "deploy", true}, - {"replicasets", "rs", true}, - {"statefulsets", "sts", true}, - {"jobs", "", true}, - {"cronjobs", "cj", true}, + {"namespaces", false}, + {"pods", true}, + {"replicationcontrollers", true}, + {"services", true}, + {"daemonsets", true}, + {"deployments", true}, + {"replicasets", true}, + {"statefulsets", true}, + {"jobs", true}, + {"cronjobs", true}, } ) @@ -257,7 +256,6 @@ func handleAPIResourceList(w http.ResponseWriter, _ *http.Request, _ httprouter. resList.APIResources = append(resList.APIResources, metav1.APIResource{ Name: res.name, - ShortNames: []string{res.shortname}, Namespaced: res.namespaced, Kind: gvk.Kind, Verbs: metav1.Verbs{"watch"},