Merge pull request #2324 from duanmengkk/feature_retain
Put Lease to default SkippedResourceConfig
This commit is contained in:
commit
54752ed626
|
@ -4,6 +4,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
coordinationv1 "k8s.io/api/coordination/v1"
|
||||||
eventsv1 "k8s.io/api/events/v1"
|
eventsv1 "k8s.io/api/events/v1"
|
||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
|
||||||
|
@ -46,6 +47,9 @@ func NewSkippedResourceConfig() *SkippedResourceConfig {
|
||||||
// disable event by default
|
// disable event by default
|
||||||
r.DisableGroup(eventsv1.GroupName)
|
r.DisableGroup(eventsv1.GroupName)
|
||||||
r.DisableGroupVersionKind(corev1EventGVK)
|
r.DisableGroupVersionKind(corev1EventGVK)
|
||||||
|
|
||||||
|
// disable Lease by default
|
||||||
|
r.DisableGroupVersion(coordinationv1.SchemeGroupVersion)
|
||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,6 +166,11 @@ func (r *SkippedResourceConfig) DisableGroup(g string) {
|
||||||
r.Groups[g] = struct{}{}
|
r.Groups[g] = struct{}{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DisableGroupVersion to disable GroupVersion.
|
||||||
|
func (r *SkippedResourceConfig) DisableGroupVersion(gv schema.GroupVersion) {
|
||||||
|
r.GroupVersions[gv] = struct{}{}
|
||||||
|
}
|
||||||
|
|
||||||
// DisableGroupVersionKind to disable GroupVersionKind.
|
// DisableGroupVersionKind to disable GroupVersionKind.
|
||||||
func (r *SkippedResourceConfig) DisableGroupVersionKind(gvk schema.GroupVersionKind) {
|
func (r *SkippedResourceConfig) DisableGroupVersionKind(gvk schema.GroupVersionKind) {
|
||||||
r.GroupVersionKinds[gvk] = struct{}{}
|
r.GroupVersionKinds[gvk] = struct{}{}
|
||||||
|
|
Loading…
Reference in New Issue