mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 15:29:42 +02:00
feat(kubeshell) allow overriding default kubeshell image EE-1756 (#5755)
* feat(kubeshell) allow overriding default kubeshell * Add missing error check and struct tag * Add migrator for kube shell image and add it as a default in the db * Fix file name to match migrator pattern * remove default as it's now coming from the db * remove blank line * - conflict resolution code update - logging migration error on migration failures * - migrateDBVersionTo34 -> migrateDBVersionToDB34 (naming consistency) Co-authored-by: zees-dev <dev.786zshan@gmail.com>
This commit is contained in:
parent
7611cc415a
commit
7b72130433
9 changed files with 53 additions and 9 deletions
|
@ -45,7 +45,12 @@ func (handler *Handler) websocketShellPodExec(w http.ResponseWriter, r *http.Req
|
|||
return &httperror.HandlerError{http.StatusInternalServerError, "Unable to find serviceaccount associated with user", err}
|
||||
}
|
||||
|
||||
shellPod, err := cli.CreateUserShellPod(r.Context(), serviceAccount.Name)
|
||||
settings, err := handler.DataStore.Settings().Settings()
|
||||
if err != nil {
|
||||
return &httperror.HandlerError{http.StatusInternalServerError, "Unable read settings", err}
|
||||
}
|
||||
|
||||
shellPod, err := cli.CreateUserShellPod(r.Context(), serviceAccount.Name, settings.KubectlShellImage)
|
||||
if err != nil {
|
||||
return &httperror.HandlerError{http.StatusInternalServerError, "Unable to create user shell", err}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue