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 8d2dd05
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ package main
import (
"flag"
"os"

"sigs.k8s.io/controller-runtime/pkg/cache"

Check failure on line 23 in main.go

View workflow job for this annotation

GitHub Actions / publish-ecr

"sigs.k8s.io/controller-runtime/pkg/cache" imported and not used
"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 +72,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 8d2dd05

Please sign in to comment.