Skip to content

Commit af1aeaa

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

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

main.go

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

@@ -69,8 +71,13 @@ func main() {
6971
ctrl.SetLogger(zap.New(zap.UseFlagOptions(&opts)))
7072

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

0 commit comments

Comments
 (0)