mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +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/Deployment
|
||||||
apps/v1/ReplicaSet
|
apps/v1/ReplicaSet
|
||||||
apps/v1/StatefulSet
|
apps/v1/StatefulSet
|
||||||
extensions/v1beta1/Ingress
|
networking.k8s.io/v1/Ingress
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
read -ra KUBECTL_PRUNE_WHITELIST <<< "${KUBECTL_PRUNE_WHITELIST_OVERRIDE}"
|
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) {
|
func getRESTMappings(mapper meta.RESTMapper, pruneResources *[]pruneResource) (namespaced, nonNamespaced []*meta.RESTMapping, err error) {
|
||||||
if len(*pruneResources) == 0 {
|
if len(*pruneResources) == 0 {
|
||||||
// default whitelist
|
// default allowlist
|
||||||
// TODO: need to handle the older api versions - e.g. v1beta1 jobs. Github issue: #35991
|
|
||||||
*pruneResources = []pruneResource{
|
*pruneResources = []pruneResource{
|
||||||
{"", "v1", "ConfigMap", true},
|
{"", "v1", "ConfigMap", true},
|
||||||
{"", "v1", "Endpoints", true},
|
{"", "v1", "Endpoints", true},
|
||||||
@ -186,7 +185,7 @@ func getRESTMappings(mapper meta.RESTMapper, pruneResources *[]pruneResource) (n
|
|||||||
{"", "v1", "Service", true},
|
{"", "v1", "Service", true},
|
||||||
{"batch", "v1", "Job", true},
|
{"batch", "v1", "Job", true},
|
||||||
{"batch", "v1beta1", "CronJob", true},
|
{"batch", "v1beta1", "CronJob", true},
|
||||||
{"extensions", "v1beta1", "Ingress", true},
|
{"networking.k8s.io", "v1", "Ingress", true},
|
||||||
{"apps", "v1", "DaemonSet", true},
|
{"apps", "v1", "DaemonSet", true},
|
||||||
{"apps", "v1", "Deployment", true},
|
{"apps", "v1", "Deployment", true},
|
||||||
{"apps", "v1", "ReplicaSet", true},
|
{"apps", "v1", "ReplicaSet", true},
|
||||||
|
Loading…
Reference in New Issue
Block a user