feat(helm): reuse existing git sources in Kubernetes Helm-from-git install [BE-13046] (#2900)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Chaim Lev-Ari
2026-06-15 22:01:31 +03:00
committed by GitHub
parent 491df61fbf
commit d9673e33ec
18 changed files with 348 additions and 151 deletions
@@ -8,6 +8,7 @@ import (
portainer "github.com/portainer/portainer/api"
"github.com/portainer/portainer/api/filesystem"
"github.com/portainer/portainer/api/git/update"
"github.com/portainer/portainer/api/gitops/sources"
"github.com/portainer/portainer/api/http/security"
"github.com/portainer/portainer/api/stacks/deployments"
"github.com/portainer/portainer/api/stacks/stackbuilders"
@@ -279,7 +280,7 @@ func (handler *Handler) createComposeStackFromGitRepository(w http.ResponseWrite
}
if payload.SourceID != 0 {
if _, httpErr := validateSourceForStack(handler.DataStore, payload.SourceID); httpErr != nil {
if _, httpErr := sources.ValidateGitSourceAccess(handler.DataStore, payload.SourceID); httpErr != nil {
return httpErr
}
}