Skip to content

Commit

Permalink
migrate cache
Browse files Browse the repository at this point in the history
  • Loading branch information
dbadura committed Feb 7, 2024
1 parent 510f42e commit dd4a0a6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmd/operator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ import (
"fmt"
"github.com/go-logr/zapr"
"github.com/kyma-project/warden/internal/logging"
corev1 "k8s.io/api/core/v1"
"os"
"sigs.k8s.io/controller-runtime/pkg/cache"
ctrlclient "sigs.k8s.io/controller-runtime/pkg/client"

"github.com/kyma-project/warden/internal/config"
"github.com/kyma-project/warden/internal/controllers"
Expand Down Expand Up @@ -97,6 +100,12 @@ func main() {
LeaderElection: appConfig.Operator.LeaderElect,
LeaderElectionID: "c3790980.warden.kyma-project.io",
Logger: logrZap,
Cache: cache.Options{
ByObject: map[ctrlclient.Object]cache.ByObject{
&corev1.Secret{}: {},
&corev1.ConfigMap{}: {},
},
},
})
if err != nil {
logger.Error(err, "unable to start manager")
Expand Down

0 comments on commit dd4a0a6

Please sign in to comment.