1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-28 17:59:45 +02:00

fix(kubernetes): Namespace access permission changes role bindings not created [R8S-366] (#807)

Co-authored-by: andres-portainer <andres-portainer@users.noreply.github.com>
Co-authored-by: Malcolm Lockyer <segfault88@users.noreply.github.com>
This commit is contained in:
Cara Ryan 2025-06-25 09:24:18 +12:00 committed by GitHub
parent ee6d33365e
commit 7fd5b96130
2 changed files with 17 additions and 9 deletions

View file

@ -87,6 +87,14 @@ func (factory *ClientFactory) ClearClientCache() {
// Remove the cached kube client so a new one can be created
func (factory *ClientFactory) RemoveKubeClient(endpointID portainer.EndpointID) {
factory.endpointProxyClients.Delete(strconv.Itoa(int(endpointID)))
endpointPrefix := strconv.Itoa(int(endpointID)) + "."
for key := range factory.endpointProxyClients.Items() {
if strings.HasPrefix(key, endpointPrefix) {
factory.endpointProxyClients.Delete(key)
}
}
}
// GetPrivilegedKubeClient checks if an existing client is already registered for the environment(endpoint) and returns it if one is found.