Skip to content

Commit

Permalink
Merge pull request kubernetes#110939 from Abirdcfly/deleteutil
Browse files Browse the repository at this point in the history
don't quota events.k8s.io events by default
  • Loading branch information
k8s-ci-robot committed Aug 4, 2022
2 parents d4795e4 + 9680e3f commit b661944
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions pkg/quota/v1/install/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@ limitations under the License.
package install

import (
eventv1 "k8s.io/api/events/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
quota "k8s.io/apiserver/pkg/quota/v1"
"k8s.io/apiserver/pkg/quota/v1/generic"
"k8s.io/kubernetes/pkg/apis/authentication"
"k8s.io/kubernetes/pkg/apis/authorization"
"k8s.io/kubernetes/pkg/quota/v1/evaluator/core"
)

Expand All @@ -38,16 +41,17 @@ func NewQuotaConfigurationForControllers(f quota.ListerForResourceFunc) quota.Co
// ignoredResources are ignored by quota by default
var ignoredResources = map[schema.GroupResource]struct{}{
// virtual resources that aren't stored and shouldn't be quota-ed
{Group: "", Resource: "bindings"}: {},
{Group: "", Resource: "componentstatuses"}: {},
{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: "", Resource: "bindings"}: {},
{Group: "", Resource: "componentstatuses"}: {},
{Group: authentication.GroupName, Resource: "tokenreviews"}: {},
{Group: authorization.GroupName, Resource: "subjectaccessreviews"}: {},
{Group: authorization.GroupName, Resource: "selfsubjectaccessreviews"}: {},
{Group: authorization.GroupName, Resource: "localsubjectaccessreviews"}: {},
{Group: authorization.GroupName, Resource: "selfsubjectrulesreviews"}: {},

// events haven't been quota-ed before
{Group: "", Resource: "events"}: {},
{Group: "", Resource: "events"}: {},
{Group: eventv1.GroupName, Resource: "events"}: {},
}

// DefaultIgnoredResources returns the default set of resources that quota system
Expand Down

0 comments on commit b661944

Please sign in to comment.