fix(gitops): handle the local environment in isEnvironmentOnline() EE-6321 (#10632)

pull/10645/head
andres-portainer 2023-11-16 09:40:24 -03:00 committed by GitHub
parent c5a51a9fb7
commit 3360576e07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -11,6 +11,7 @@ import (
"github.com/portainer/portainer/api/dataservices"
"github.com/portainer/portainer/api/git/update"
"github.com/portainer/portainer/api/http/security"
"github.com/portainer/portainer/api/internal/endpointutils"
"github.com/portainer/portainer/api/scheduler"
"github.com/portainer/portainer/api/stacks/stackutils"
@ -171,6 +172,10 @@ func getUserRegistries(datastore dataservices.DataStore, user *portainer.User, e
}
func isEnvironmentOnline(endpoint *portainer.Endpoint) bool {
if endpointutils.IsLocalEndpoint(endpoint) {
return true
}
var err error
var tlsConfig *tls.Config
if endpoint.TLSConfig.TLS {