fix(namespace): update portainer-config when delete a namespace (#5330)

This commit is contained in:
Dmitry Salakhov
2021-07-20 14:05:31 +12:00
committed by GitHub
parent 308f828446
commit 8aa3bfc59c
6 changed files with 102 additions and 4 deletions

View File

@@ -5,6 +5,7 @@ import (
"fmt"
"net/http"
"strconv"
"sync"
"time"
cmap "github.com/orcaman/concurrent-map"
@@ -27,8 +28,9 @@ type (
// KubeClient represent a service used to execute Kubernetes operations
KubeClient struct {
cli *kubernetes.Clientset
cli kubernetes.Interface
instanceID string
lock *sync.Mutex
}
)
@@ -75,6 +77,7 @@ func (factory *ClientFactory) createKubeClient(endpoint *portainer.Endpoint) (po
kubecli := &KubeClient{
cli: cli,
instanceID: factory.instanceID,
lock: &sync.Mutex{},
}
return kubecli, nil