mirror of
https://github.com/stakater/Reloader.git
synced 2026-08-27 14:37:17 +00:00
Added support for CSI secret provider
Signed-off-by: Zanis <22601571+ZanisO@users.noreply.github.com>
This commit is contained in:
@@ -79,7 +79,16 @@ func NewController(
|
||||
}
|
||||
}
|
||||
|
||||
listWatcher := cache.NewFilteredListWatchFromClient(client.CoreV1().RESTClient(), resource, namespace, optionsModifier)
|
||||
getterRESTClient := client.CoreV1().RESTClient()
|
||||
if resource == "secretproviderclasspodstatuses" {
|
||||
csiClient, err := kube.GetCSIClient()
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
getterRESTClient = csiClient.SecretsstoreV1().RESTClient()
|
||||
}
|
||||
|
||||
listWatcher := cache.NewFilteredListWatchFromClient(getterRESTClient, resource, namespace, optionsModifier)
|
||||
|
||||
_, informer := cache.NewInformerWithOptions(cache.InformerOptions{
|
||||
ListerWatcher: listWatcher,
|
||||
|
||||
Reference in New Issue
Block a user