Merge pull request #98806 from rikatz/remove-extension-prune

Remove extensions v1beta1 from addon manager and kubectl prune
This commit is contained in:
Kubernetes Prow Robot
2021-03-04 14:40:47 -08:00
committed by GitHub
2 changed files with 3 additions and 4 deletions

View File

@@ -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}"

View File

@@ -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},