Fix: [EKS] server could not find the requested resourceevents.events.k8s.io (#565)

This commit is contained in:
Igor Gov
2021-12-28 13:24:51 +02:00
committed by GitHub
parent 1e1b5f0c0f
commit b039c2abad
3 changed files with 52 additions and 9 deletions

View File

@@ -33,8 +33,8 @@ import (
const cleanupTimeout = time.Minute
type tapState struct {
startTime time.Time
targetNamespaces []string
startTime time.Time
targetNamespaces []string
mizuServiceAccountExists bool
}
@@ -420,7 +420,8 @@ func watchApiServerEvents(ctx context.Context, kubernetesProvider *kubernetes.Pr
event, err := wEvent.ToEvent()
if err != nil {
logger.Log.Errorf(fmt.Sprintf("Error parsing Mizu resource event: %+v", err))
logger.Log.Debugf("[ERROR] parsing Mizu resource event: %+v", err)
continue
}
if state.startTime.After(event.CreationTimestamp.Time) {
@@ -448,7 +449,7 @@ func watchApiServerEvents(ctx context.Context, kubernetesProvider *kubernetes.Pr
continue
}
logger.Log.Errorf("Watching API server events loop, error: %+v", err)
logger.Log.Debugf("[Error] Watching API server events loop, error: %+v", err)
case <-ctx.Done():
logger.Log.Debugf("Watching API server events loop, ctx done")
return