From ffcc638afe0e269bb2b9d44ecc87ba1b6165a744 Mon Sep 17 00:00:00 2001 From: David Eads Date: Thu, 29 Oct 2020 13:55:56 +0100 Subject: [PATCH] UPSTREAM: : kube-controller-manager: exclude some origin resources from quota OpenShift-Rebase-Source: 7d2a074a652 --- .../v1/install/patch_ignoredresources.go | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 pkg/quota/v1/install/patch_ignoredresources.go diff --git a/pkg/quota/v1/install/patch_ignoredresources.go b/pkg/quota/v1/install/patch_ignoredresources.go new file mode 100644 index 0000000000000..bf246aaccb1c7 --- /dev/null +++ b/pkg/quota/v1/install/patch_ignoredresources.go @@ -0,0 +1,33 @@ +package install + +import "k8s.io/apimachinery/pkg/runtime/schema" + +func init() { + newIgnoredResources := map[schema.GroupResource]struct{}{ + {Group: "extensions", Resource: "networkpolicies"}: {}, + {Group: "", Resource: "bindings"}: {}, + {Group: "", Resource: "componentstatuses"}: {}, + {Group: "", Resource: "events"}: {}, + {Group: "authentication.k8s.io", Resource: "tokenreviews"}: {}, + {Group: "authorization.k8s.io", Resource: "subjectaccessreviews"}: {}, + {Group: "authorization.k8s.io", Resource: "selfsubjectaccessreviews"}: {}, + {Group: "authorization.k8s.io", Resource: "localsubjectaccessreviews"}: {}, + {Group: "authorization.k8s.io", Resource: "selfsubjectrulesreviews"}: {}, + {Group: "authorization.openshift.io", Resource: "selfsubjectaccessreviews"}: {}, + {Group: "authorization.openshift.io", Resource: "subjectaccessreviews"}: {}, + {Group: "authorization.openshift.io", Resource: "localsubjectaccessreviews"}: {}, + {Group: "authorization.openshift.io", Resource: "resourceaccessreviews"}: {}, + {Group: "authorization.openshift.io", Resource: "localresourceaccessreviews"}: {}, + {Group: "authorization.openshift.io", Resource: "selfsubjectrulesreviews"}: {}, + {Group: "authorization.openshift.io", Resource: "subjectrulesreviews"}: {}, + {Group: "authorization.openshift.io", Resource: "roles"}: {}, + {Group: "authorization.openshift.io", Resource: "rolebindings"}: {}, + {Group: "authorization.openshift.io", Resource: "clusterroles"}: {}, + {Group: "authorization.openshift.io", Resource: "clusterrolebindings"}: {}, + {Group: "apiregistration.k8s.io", Resource: "apiservices"}: {}, + {Group: "apiextensions.k8s.io", Resource: "customresourcedefinitions"}: {}, + } + for k, v := range newIgnoredResources { + ignoredResources[k] = v + } +}