Skip to content

Commit 8d2dd05

Browse files
author
Cezar Guimaraes
committed
enable unstructured cache
1 parent 3ce4645 commit 8d2dd05

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

main.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ package main
1919
import (
2020
"flag"
2121
"os"
22+
23+
"sigs.k8s.io/controller-runtime/pkg/cache"
24+
"sigs.k8s.io/controller-runtime/pkg/client"
2225
"sigs.k8s.io/controller-runtime/pkg/metrics/server"
2326
"sigs.k8s.io/controller-runtime/pkg/webhook"
2427

@@ -69,8 +72,13 @@ func main() {
6972
ctrl.SetLogger(zap.New(zap.UseFlagOptions(&opts)))
7073

7174
mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
72-
Scheme: scheme,
73-
Metrics: server.Options{BindAddress: metricsAddr},
75+
Scheme: scheme,
76+
Metrics: server.Options{BindAddress: metricsAddr},
77+
Client: client.Options{
78+
Cache: &client.CacheOptions{
79+
Unstructured: true,
80+
},
81+
},
7482
WebhookServer: webhook.NewServer(webhook.Options{Port: 9443}),
7583
HealthProbeBindAddress: probeAddr,
7684
LeaderElection: enableLeaderElection,

0 commit comments

Comments
 (0)