mirror of https://github.com/k3s-io/k3s
All REST that set DeleteCollectionWorkers should set EnableGC
parent
acb4c00b39
commit
716bac3bbb
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -75,6 +75,7 @@ func NewREST(opts generic.RESTOptions) *REST {
|
|||
|
||||
QualifiedResource: api.Resource("configmaps"),
|
||||
|
||||
EnableGarbageCollection: opts.EnableGarbageCollection,
|
||||
DeleteCollectionWorkers: opts.DeleteCollectionWorkers,
|
||||
|
||||
CreateStrategy: configmap.Strategy,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue