1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-22 23:09:41 +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

@ -3,10 +3,15 @@ package kubernetes
import (
"net/http"
"github.com/pkg/errors"
portainer "github.com/portainer/portainer/api"
)
func (transport *baseTransport) proxyNamespaceDeleteOperation(request *http.Request, namespace string) (*http.Response, error) {
if err := transport.tokenManager.kubecli.NamespaceAccessPoliciesDeleteNamespace(namespace); err != nil {
return nil, errors.WithMessagef(err, "failed to delete a namespace [%s] from portainer config", namespace)
}
registries, err := transport.dataStore.Registry().Registries()
if err != nil {
return nil, err