Watch cm creation and sync scripts (#1637)

* Fix graceful shutdown

* add helpers

* Watch for configmap changes

---------

Co-authored-by: Alon Girmonsky <1990761+alongir@users.noreply.github.com>
This commit is contained in:
Volodymyr Stoiko
2024-11-05 23:35:17 +02:00
committed by GitHub
parent 4a6628a3e8
commit bba1bbd1fb
4 changed files with 171 additions and 99 deletions

View File

@@ -247,6 +247,10 @@ func (provider *Provider) GetNamespaces() (namespaces []string) {
return
}
func (provider *Provider) GetClientSet() *kubernetes.Clientset {
return provider.clientSet
}
func getClientSet(config *rest.Config) (*kubernetes.Clientset, error) {
clientSet, err := kubernetes.NewForConfig(config)
if err != nil {