Skip to content

Commit

Permalink
Merge pull request #150 from vlvasilev/fix-of-the-fix
Browse files Browse the repository at this point in the history
Fix the fix
  • Loading branch information
vlvasilev authored Aug 19, 2022
2 parents e972894 + 389e747 commit 84e2ec7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cmd/event-logger/app/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (o *Options) config(seedKubeAPIServerConfig *rest.Config, seedKubeClient *k

for _, namespace := range o.SeedEventWatcher.Namespaces {
config.SeedKubeInformerFactories = append(config.SeedKubeInformerFactories,
kubeinformers.NewFilteredSharedInformerFactory(shootKubeClient, shootKubeAPIServerConfig.Timeout, namespace, nil),
kubeinformers.NewFilteredSharedInformerFactory(seedKubeClient, shootKubeAPIServerConfig.Timeout, namespace, nil),
)
}

Expand Down
4 changes: 0 additions & 4 deletions pkg/events/gardener_event_watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
package events

import (
"fmt"

v1 "k8s.io/api/core/v1"
kubeinformers "k8s.io/client-go/informers"
)
Expand All @@ -35,7 +33,6 @@ type GardenerEventWatcher struct {

func (e *GardenerEventWatcherConfig) New() *GardenerEventWatcher {
for indx, namespace := range e.SeedEventWatcherConfig.Namespaces {
fmt.Println("**********MAKE SEED EVENT WATCHER FOR NAMESPACE: ", namespace, "*****************")
_ = e.SeedKubeInformerFactories[indx].InformerFor(&v1.Event{},
NewEventInformerFuncForNamespace(
"seed",
Expand All @@ -45,7 +42,6 @@ func (e *GardenerEventWatcherConfig) New() *GardenerEventWatcher {
}

for indx, namespace := range e.ShootEventWatcherConfig.Namespaces {
fmt.Println("**********MAKE SHOOT EVENT WATCHER FOR NAMESPACE: ", namespace, "*****************")
_ = e.ShootKubeInformerFactories[indx].InformerFor(&v1.Event{},
NewEventInformerFuncForNamespace(
"shoot",
Expand Down
2 changes: 1 addition & 1 deletion pkg/events/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (

func (o *Options) Validate() []error {
allErrors := []error{}
if o.Kubeconfig != "inClusterConfig" {
if o.Kubeconfig != "inClusterConfig" && o.Kubeconfig != "" {
if _, err := os.Stat(o.Kubeconfig); err != nil {
allErrors = append(allErrors, err)
}
Expand Down

0 comments on commit 84e2ec7

Please sign in to comment.