feat: limit control to single current only namespace
This commit is contained in:
@@ -3,6 +3,7 @@ package crd
|
||||
import (
|
||||
"context"
|
||||
"flink-kube-operator/internal/crd/v1alpha1"
|
||||
"os"
|
||||
|
||||
"flink-kube-operator/pkg"
|
||||
|
||||
@@ -20,7 +21,7 @@ func (crd Crd) watchFlinkJobs() rxgo.Observable {
|
||||
|
||||
go func() {
|
||||
pkg.Logger.Debug("[crd] starting watch")
|
||||
watcher, err := crd.client.Watch(context.Background(), metaV1.ListOptions{})
|
||||
watcher, err := crd.client.Namespace(os.Getenv("NAMESPACE")).Watch(context.Background(), metaV1.ListOptions{})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user