Skip to content

Commit

Permalink
fix(gitops): change the condition that checks if the environment is o…
Browse files Browse the repository at this point in the history
…nline EE-6321 (#10664)
  • Loading branch information
andres-portainer committed Nov 21, 2023
1 parent 6730883 commit cd9ad97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/stacks/deployments/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit cd9ad97

Please sign in to comment.