File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import (
2828 "github.com/go-logr/logr"
2929 "go.uber.org/zap/zapcore"
3030
31+ corev1 "k8s.io/api/core/v1"
3132 pkgruntime "k8s.io/apimachinery/pkg/runtime"
3233 utilruntime "k8s.io/apimachinery/pkg/util/runtime"
3334 clientgoscheme "k8s.io/client-go/kubernetes/scheme"
@@ -36,6 +37,7 @@ import (
3637 // to ensure that exec-entrypoint and run can make use of them.
3738 _ "k8s.io/client-go/plugin/pkg/client/auth"
3839 ctrl "sigs.k8s.io/controller-runtime"
40+ "sigs.k8s.io/controller-runtime/pkg/client"
3941 "sigs.k8s.io/controller-runtime/pkg/event"
4042 "sigs.k8s.io/controller-runtime/pkg/healthz"
4143 "sigs.k8s.io/controller-runtime/pkg/log/zap"
@@ -117,6 +119,11 @@ func main() {
117119
118120 mgr , err := ctrl .NewManager (ctrl .GetConfigOrDie (), ctrl.Options {
119121 Scheme : scheme ,
122+ Client : client.Options {
123+ Cache : & client.CacheOptions {
124+ DisableFor : []client.Object {& corev1.Namespace {}},
125+ },
126+ },
120127 Metrics : server.Options {
121128 BindAddress : metricsAddr ,
122129 TLSOpts : tlsOpts ,
You can’t perform that action at this time.
0 commit comments