All REST that set DeleteCollectionWorkers should set EnableGC

pull/6/head
Clayton Coleman 2016-09-12 19:24:03 -04:00
parent acb4c00b39
commit 716bac3bbb
No known key found for this signature in database
GPG Key ID: 3D16906B4F1C5CB3
35 changed files with 37 additions and 1 deletions

View File

@ -73,6 +73,7 @@ func NewREST(opts generic.RESTOptions) (*REST, *StatusREST) {
},
PredicateFunc: cluster.MatchCluster,
QualifiedResource: federation.Resource("clusters"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
CreateStrategy: cluster.Strategy,

View File

@ -66,6 +66,7 @@ func NewREST(opts generic.RESTOptions) (*REST, *StatusREST, *ApprovalREST) {
return csrregistry.Matcher(label, field)
},
QualifiedResource: certificates.Resource("certificatesigningrequests"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
CreateStrategy: csrregistry.Strategy,

View File

@ -61,6 +61,7 @@ func NewREST(opts generic.RESTOptions) *REST {
},
PredicateFunc: clusterrole.Matcher,
QualifiedResource: rbac.Resource("clusterroles"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
CreateStrategy: clusterrole.Strategy,

View File

@ -61,6 +61,7 @@ func NewREST(opts generic.RESTOptions) *REST {
},
PredicateFunc: clusterrolebinding.Matcher,
QualifiedResource: rbac.Resource("clusterrolebindings"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
CreateStrategy: clusterrolebinding.Strategy,

View File

@ -75,6 +75,7 @@ func NewREST(opts generic.RESTOptions) *REST {
QualifiedResource: api.Resource("configmaps"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
CreateStrategy: configmap.Strategy,

View File

@ -95,6 +95,7 @@ func NewREST(opts generic.RESTOptions) (*REST, *StatusREST) {
PredicateFunc: controller.MatchController,
QualifiedResource: api.Resource("replicationcontrollers"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
// Used to validate controller creation

View File

@ -70,6 +70,7 @@ func NewREST(opts generic.RESTOptions) (*REST, *StatusREST) {
// Used to match objects based on labels/fields for list and watch
PredicateFunc: daemonset.MatchDaemonSet,
QualifiedResource: extensions.Resource("daemonsets"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
// Used to validate daemon set creation

View File

@ -93,6 +93,7 @@ func NewREST(opts generic.RESTOptions) (*REST, *StatusREST, *RollbackREST) {
// Used to match objects based on labels/fields for list.
PredicateFunc: deployment.MatchDeployment,
QualifiedResource: extensions.Resource("deployments"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
// Used to validate deployment creation.

View File

@ -59,6 +59,7 @@ func NewREST(opts generic.RESTOptions) *REST {
},
PredicateFunc: endpoint.MatchEndpoints,
QualifiedResource: api.Resource("endpoints"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
CreateStrategy: endpoint.Strategy,

View File

@ -52,7 +52,9 @@ func NewREST(opts generic.RESTOptions, ttl uint64) *REST {
TTLFunc: func(runtime.Object, uint64, bool) (uint64, error) {
return ttl, nil
},
QualifiedResource: api.Resource("events"),
QualifiedResource: api.Resource("events"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
CreateStrategy: event.Strategy,

View File

@ -68,6 +68,7 @@ func NewREST(opts generic.RESTOptions) (*REST, *StatusREST) {
// Used to match objects based on labels/fields for list
PredicateFunc: horizontalpodautoscaler.MatchAutoscaler,
QualifiedResource: autoscaling.Resource("horizontalpodautoscalers"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
// Used to validate autoscaler creation

View File

@ -70,6 +70,7 @@ func NewREST(opts generic.RESTOptions) (*REST, *StatusREST) {
// Used to match objects based on labels/fields for list and watch
PredicateFunc: ingress.MatchIngress,
QualifiedResource: extensions.Resource("ingresses"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
// Used to validate controller creation

View File

@ -70,6 +70,7 @@ func NewREST(opts generic.RESTOptions) (*REST, *StatusREST) {
// Used to match objects based on labels/fields for list and watch
PredicateFunc: job.MatchJob,
QualifiedResource: batch.Resource("jobs"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
// Used to validate job creation

View File

@ -59,6 +59,7 @@ func NewREST(opts generic.RESTOptions) *REST {
},
PredicateFunc: limitrange.MatchLimitRange,
QualifiedResource: api.Resource("limitranges"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
CreateStrategy: limitrange.Strategy,

View File

@ -77,6 +77,7 @@ func NewREST(opts generic.RESTOptions) (*REST, *StatusREST, *FinalizeREST) {
},
PredicateFunc: namespace.MatchNamespace,
QualifiedResource: api.Resource("namespaces"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
CreateStrategy: namespace.Strategy,

View File

@ -69,6 +69,7 @@ func NewREST(opts generic.RESTOptions) *REST {
// Used to match objects based on labels/fields for list and watch
PredicateFunc: networkpolicy.MatchNetworkPolicy,
QualifiedResource: extensionsapi.Resource("networkpolicies"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
// Used to validate controller creation

View File

@ -92,6 +92,7 @@ func NewStorage(opts generic.RESTOptions, connection client.ConnectionInfoGetter
},
PredicateFunc: node.MatchNode,
QualifiedResource: api.Resource("nodes"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
CreateStrategy: node.Strategy,

View File

@ -60,6 +60,7 @@ func NewREST(opts generic.RESTOptions) (*REST, *StatusREST) {
},
PredicateFunc: persistentvolume.MatchPersistentVolumes,
QualifiedResource: api.Resource("persistentvolumes"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
CreateStrategy: persistentvolume.Strategy,

View File

@ -60,6 +60,7 @@ func NewREST(opts generic.RESTOptions) (*REST, *StatusREST) {
},
PredicateFunc: persistentvolumeclaim.MatchPersistentVolumeClaim,
QualifiedResource: api.Resource("persistentvolumeclaims"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
CreateStrategy: persistentvolumeclaim.Strategy,

View File

@ -70,6 +70,7 @@ func NewREST(opts generic.RESTOptions) (*REST, *StatusREST) {
// Used to match objects based on labels/fields for list and watch
PredicateFunc: petset.MatchPetSet,
QualifiedResource: appsapi.Resource("petsets"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
// Used to validate controller creation

View File

@ -87,6 +87,7 @@ func NewStorage(opts generic.RESTOptions, k client.ConnectionInfoGetter, proxyTr
},
PredicateFunc: pod.MatchPod,
QualifiedResource: api.Resource("pods"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
CreateStrategy: pod.Strategy,

View File

@ -70,6 +70,7 @@ func NewREST(opts generic.RESTOptions) (*REST, *StatusREST) {
// Used to match objects based on labels/fields for list and watch
PredicateFunc: poddisruptionbudget.MatchPodDisruptionBudget,
QualifiedResource: policyapi.Resource("poddisruptionbudgets"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
// Used to validate controller creation

View File

@ -61,6 +61,7 @@ func NewREST(opts generic.RESTOptions) *REST {
},
PredicateFunc: podsecuritypolicy.MatchPodSecurityPolicy,
QualifiedResource: extensions.Resource("podsecuritypolicies"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
CreateStrategy: podsecuritypolicy.Strategy,

View File

@ -59,6 +59,7 @@ func NewREST(opts generic.RESTOptions) *REST {
},
PredicateFunc: podtemplate.MatchPodTemplate,
QualifiedResource: api.Resource("podtemplates"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
CreateStrategy: podtemplate.Strategy,

View File

@ -93,6 +93,7 @@ func NewREST(opts generic.RESTOptions) (*REST, *StatusREST) {
// Used to match objects based on labels/fields for list and watch
PredicateFunc: replicaset.MatchReplicaSet,
QualifiedResource: api.Resource("replicasets"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
// Used to validate ReplicaSet creation

View File

@ -60,6 +60,7 @@ func NewREST(opts generic.RESTOptions) (*REST, *StatusREST) {
},
PredicateFunc: resourcequota.MatchResourceQuota,
QualifiedResource: api.Resource("resourcequotas"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
CreateStrategy: resourcequota.Strategy,

View File

@ -61,6 +61,7 @@ func NewREST(opts generic.RESTOptions) *REST {
},
PredicateFunc: role.Matcher,
QualifiedResource: rbac.Resource("roles"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
CreateStrategy: role.Strategy,

View File

@ -61,6 +61,7 @@ func NewREST(opts generic.RESTOptions) *REST {
},
PredicateFunc: rolebinding.Matcher,
QualifiedResource: rbac.Resource("rolebindings"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
CreateStrategy: rolebinding.Strategy,

View File

@ -70,6 +70,7 @@ func NewREST(opts generic.RESTOptions) (*REST, *StatusREST) {
// Used to match objects based on labels/fields for list and watch
PredicateFunc: scheduledjob.MatchScheduledJob,
QualifiedResource: batch.Resource("scheduledjobs"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
// Used to validate scheduled job creation

View File

@ -59,6 +59,7 @@ func NewREST(opts generic.RESTOptions) *REST {
},
PredicateFunc: secret.Matcher,
QualifiedResource: api.Resource("secrets"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
CreateStrategy: secret.Strategy,

View File

@ -60,6 +60,7 @@ func NewREST(opts generic.RESTOptions) (*REST, *StatusREST) {
},
PredicateFunc: service.MatchServices,
QualifiedResource: api.Resource("services"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
CreateStrategy: service.Strategy,

View File

@ -59,6 +59,7 @@ func NewREST(opts generic.RESTOptions) *REST {
},
PredicateFunc: serviceaccount.Matcher,
QualifiedResource: api.Resource("serviceaccounts"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
CreateStrategy: serviceaccount.Strategy,

View File

@ -60,6 +60,7 @@ func NewREST(opts generic.RESTOptions) *REST {
},
PredicateFunc: storageclass.MatchStorageClasses,
QualifiedResource: storageapi.Resource("storageclasses"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
CreateStrategy: storageclass.Strategy,

View File

@ -51,6 +51,7 @@ func NewREST(opts generic.RESTOptions) *REST {
},
PredicateFunc: thirdpartyresource.Matcher,
QualifiedResource: extensions.Resource("thirdpartyresources"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
CreateStrategy: thirdpartyresource.Strategy,
UpdateStrategy: thirdpartyresource.Strategy,

View File

@ -54,6 +54,7 @@ func NewREST(opts generic.RESTOptions, group, kind string) *REST {
},
PredicateFunc: thirdpartyresourcedata.Matcher,
QualifiedResource: extensions.Resource("thirdpartyresourcedatas"),
EnableGarbageCollection: opts.EnableGarbageCollection,
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
CreateStrategy: thirdpartyresourcedata.Strategy,
UpdateStrategy: thirdpartyresourcedata.Strategy,