fix(gitops): change the condition that checks if the environment is online EE-6321 (#10664)

pull/10703/head 2.19.3
andres-portainer 1 year ago committed by GitHub
parent 67308838fd
commit cd9ad97235
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -11,7 +11,6 @@ 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"
@ -172,7 +171,8 @@ func getUserRegistries(datastore dataservices.DataStore, user *portainer.User, e
}
func isEnvironmentOnline(endpoint *portainer.Endpoint) bool {
if endpointutils.IsLocalEndpoint(endpoint) {
if endpoint.Type != portainer.AgentOnDockerEnvironment &&
endpoint.Type != portainer.AgentOnKubernetesEnvironment {
return true
}

Loading…
Cancel
Save