mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 13:29:41 +02:00
fix(docker): add docker desktop extension flag in settings and add migration EE-5277 (#8948)
This commit is contained in:
parent
e156243e43
commit
83551201fb
7 changed files with 55 additions and 3 deletions
|
@ -1,6 +1,8 @@
|
|||
package datastore
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
portainer "github.com/portainer/portainer/api"
|
||||
)
|
||||
|
||||
|
@ -20,6 +22,12 @@ func (store *Store) Init() error {
|
|||
}
|
||||
|
||||
func (store *Store) checkOrCreateDefaultSettings() error {
|
||||
|
||||
isDDExtention := false
|
||||
if _, ok := os.LookupEnv("DOCKER_EXTENSION"); ok {
|
||||
isDDExtention = true
|
||||
}
|
||||
|
||||
// TODO: these need to also be applied when importing
|
||||
settings, err := store.SettingsService.Settings()
|
||||
if store.IsErrObjectNotFound(err) {
|
||||
|
@ -51,6 +59,8 @@ func (store *Store) checkOrCreateDefaultSettings() error {
|
|||
UserSessionTimeout: portainer.DefaultUserSessionTimeout,
|
||||
KubeconfigExpiry: portainer.DefaultKubeconfigExpiry,
|
||||
KubectlShellImage: portainer.DefaultKubectlShellImage,
|
||||
|
||||
IsDockerDesktopExtention: isDDExtention,
|
||||
}
|
||||
|
||||
return store.SettingsService.UpdateSettings(defaultSettings)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue