mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
feature(kubeconfig): Do not invalidate kubeconfig upon Portainer restarting [EE-1854] (#5905)
This commit is contained in:
parent
22b72fb6e3
commit
048613a0c5
7 changed files with 106 additions and 24 deletions
|
@ -12,6 +12,7 @@ import (
|
|||
func hideFields(settings *portainer.Settings) {
|
||||
settings.LDAPSettings.Password = ""
|
||||
settings.OAuthSettings.ClientSecret = ""
|
||||
settings.OAuthSettings.KubeSecretKey = nil
|
||||
}
|
||||
|
||||
// Handler is the HTTP handler used to handle settings operations.
|
||||
|
|
|
@ -148,8 +148,13 @@ func (handler *Handler) settingsUpdate(w http.ResponseWriter, r *http.Request) *
|
|||
if clientSecret == "" {
|
||||
clientSecret = settings.OAuthSettings.ClientSecret
|
||||
}
|
||||
kubeSecret := payload.OAuthSettings.KubeSecretKey
|
||||
if kubeSecret == nil {
|
||||
kubeSecret = settings.OAuthSettings.KubeSecretKey
|
||||
}
|
||||
settings.OAuthSettings = *payload.OAuthSettings
|
||||
settings.OAuthSettings.ClientSecret = clientSecret
|
||||
settings.OAuthSettings.KubeSecretKey = kubeSecret
|
||||
}
|
||||
|
||||
if payload.EnableEdgeComputeFeatures != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue