Skip to content

Commit

Permalink
enable unstructured cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Cezar Guimaraes committed Sep 18, 2024
1 parent 3ce4645 commit af1aeaa
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ package main
import (
"flag"
"os"

"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/metrics/server"
"sigs.k8s.io/controller-runtime/pkg/webhook"

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

mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
Scheme: scheme,
Metrics: server.Options{BindAddress: metricsAddr},
Scheme: scheme,
Metrics: server.Options{BindAddress: metricsAddr},
Client: client.Options{
Cache: &client.CacheOptions{
Unstructured: true,
},
},
WebhookServer: webhook.NewServer(webhook.Options{Port: 9443}),
HealthProbeBindAddress: probeAddr,
LeaderElection: enableLeaderElection,
Expand Down

0 comments on commit af1aeaa

Please sign in to comment.