remove background sync
@@ -42,8 +42,6 @@ type ConfigData struct {
// hasynced
cmSycned cache.InformerSynced
- // background sync for policy report
- backgroundSync int
log logr.Logger
}
@@ -80,12 +78,6 @@ func (cd *ConfigData) GetExcludeUsername() []string {
return cd.excludeUsername
}
-// GetBackgroundSync return exclude username
-func (cd *ConfigData) GetBackgroundSync() int {
- cd.mux.RLock()
- defer cd.mux.RUnlock()
- return cd.backgroundSync
-}
// Interface to be used by consumer to check filters
type Interface interface {
@@ -93,11 +85,10 @@ type Interface interface {
GetExcludeGroupRole() []string
GetExcludeUsername() []string
RestrictDevelopmentUsername() []string
- GetBackgroundSync() int
}
// NewConfigData ...
-func NewConfigData(rclient kubernetes.Interface, cmInformer informers.ConfigMapInformer, filterK8Resources, excludeGroupRole, excludeUsername string, backgroundSync int, log logr.Logger) *ConfigData {
+func NewConfigData(rclient kubernetes.Interface, cmInformer informers.ConfigMapInformer, filterK8Resources, excludeGroupRole, excludeUsername string, log logr.Logger) *ConfigData {
// environment var is read at start only
if cmNameEnv == "" {
log.Info("ConfigMap name not defined in env:INIT_CONFIG: loading no default configuration")
@@ -106,7 +97,6 @@ func NewConfigData(rclient kubernetes.Interface, cmInformer informers.ConfigMapI
client: rclient,
cmName: os.Getenv(cmNameEnv),
cmSycned: cmInformer.Informer().HasSynced,
- backgroundSync: backgroundSync,
log: log,
}
cd.restrictDevelopmentUsername = []string{"minikube-user", "kubernetes-admin"}
