mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
Remove extensions v1beta1 from addon manager and kubectl prune
This commit is contained in:
parent
81d8ccfa8e
commit
25f3cf5550
@ -51,7 +51,7 @@ if [ -z "${KUBECTL_PRUNE_WHITELIST_OVERRIDE:-}" ]; then
|
||||
apps/v1/Deployment
|
||||
apps/v1/ReplicaSet
|
||||
apps/v1/StatefulSet
|
||||
extensions/v1beta1/Ingress
|
||||
networking.k8s.io/v1/Ingress
|
||||
)
|
||||
else
|
||||
read -ra KUBECTL_PRUNE_WHITELIST <<< "${KUBECTL_PRUNE_WHITELIST_OVERRIDE}"
|
||||
|
@ -172,8 +172,7 @@ func (pr pruneResource) String() string {
|
||||
|
||||
func getRESTMappings(mapper meta.RESTMapper, pruneResources *[]pruneResource) (namespaced, nonNamespaced []*meta.RESTMapping, err error) {
|
||||
if len(*pruneResources) == 0 {
|
||||
// default whitelist
|
||||
// TODO: need to handle the older api versions - e.g. v1beta1 jobs. Github issue: #35991
|
||||
// default allowlist
|
||||
*pruneResources = []pruneResource{
|
||||
{"", "v1", "ConfigMap", true},
|
||||
{"", "v1", "Endpoints", true},
|
||||
@ -186,7 +185,7 @@ func getRESTMappings(mapper meta.RESTMapper, pruneResources *[]pruneResource) (n
|
||||
{"", "v1", "Service", true},
|
||||
{"batch", "v1", "Job", true},
|
||||
{"batch", "v1beta1", "CronJob", true},
|
||||
{"extensions", "v1beta1", "Ingress", true},
|
||||
{"networking.k8s.io", "v1", "Ingress", true},
|
||||
{"apps", "v1", "DaemonSet", true},
|
||||
{"apps", "v1", "Deployment", true},
|
||||
{"apps", "v1", "ReplicaSet", true},
|
||||
|
Loading…
Reference in New Issue
Block a user