1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 05:19:39 +02:00

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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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