File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -81,11 +81,13 @@ type configmap struct {
81
81
}
82
82
83
83
func AddConfigMapController (ctx context.Context , log logr.Logger , opts Options ) error {
84
- noCacheClient , err := client .NewDelegatingClient (client.NewDelegatingClientInput {
85
- CacheReader : opts .Manager .GetCache (),
86
- Client : opts .Manager .GetClient (),
87
- UncachedObjects : []client.Object {new (corev1.ConfigMap )},
88
- CacheUnstructured : false ,
84
+ // noCacheClient is used to retrieve objects that we don't want to cache.
85
+ noCacheClient , err := client .New (opts .Manager .GetConfig (), client.Options {
86
+ Cache : & client.CacheOptions {
87
+ Reader : opts .Manager .GetCache (),
88
+ DisableFor : []client.Object {& corev1.ConfigMap {}},
89
+ Unstructured : false ,
90
+ },
89
91
})
90
92
if err != nil {
91
93
return fmt .Errorf ("failed to build non-cached client for ConfigMaps: %w" , err )
You can’t perform that action at this time.
0 commit comments