Skip to content

Commit

Permalink
fix: update controller-runtime cache handling from deprecated method
Browse files Browse the repository at this point in the history
  • Loading branch information
redhatrises committed Jan 11, 2024
1 parent 5c8e724 commit 4b852e3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/cache"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/healthz"
"sigs.k8s.io/controller-runtime/pkg/log/zap"

Expand Down Expand Up @@ -105,9 +106,8 @@ func main() {
HealthProbeBindAddress: probeAddr,
LeaderElection: enableLeaderElection,
LeaderElectionID: "70435a7a.crowdstrike.com",

NewCache: cache.BuilderWithOptions(cache.Options{
SelectorsByObject: cache.SelectorsByObject{
Cache: cache.Options{
ByObject: map[client.Object]cache.ByObject{
&falconv1alpha1.FalconAdmission{}: {},
&falconv1alpha1.FalconNodeSensor{}: {},
&falconv1alpha1.FalconContainer{}: {},
Expand Down Expand Up @@ -144,7 +144,6 @@ func main() {
},
},
},
),
}

if configFile != "" {
Expand Down

0 comments on commit 4b852e3

Please sign in to comment.