mirror of
https://github.com/portainer/portainer.git
synced 2025-07-21 14:29:40 +02:00
* refactor(http/kube): convert compose format * feat(kube/deploy): deploy to agent * feat(kube/deploy): show more details about error * refactor(kube): return string from deploy * feat(kube/deploy): revert to use local kubectl * Revert "feat(kube/deploy): revert to use local kubectl" This reverts commit 7c4a1c70 * feat(kube/deploy): GH#4321 use the v2 version of agent api instead of v3 Co-authored-by: Chaim Lev-Ari <chiptus@gmail.com> Co-authored-by: Simon Meng <simon.meng@portainer.io>
17 lines
691 B
Go
17 lines
691 B
Go
package endpoint
|
|
|
|
import portainer "github.com/portainer/portainer/api"
|
|
|
|
// IsKubernetesEndpoint returns true if this is a kubernetes endpoint
|
|
func IsKubernetesEndpoint(endpoint *portainer.Endpoint) bool {
|
|
return endpoint.Type == portainer.KubernetesLocalEnvironment ||
|
|
endpoint.Type == portainer.AgentOnKubernetesEnvironment ||
|
|
endpoint.Type == portainer.EdgeAgentOnKubernetesEnvironment
|
|
}
|
|
|
|
// IsDocketEndpoint returns true if this is a docker endpoint
|
|
func IsDocketEndpoint(endpoint *portainer.Endpoint) bool {
|
|
return endpoint.Type == portainer.DockerEnvironment ||
|
|
endpoint.Type == portainer.AgentOnDockerEnvironment ||
|
|
endpoint.Type == portainer.EdgeAgentOnDockerEnvironment
|
|
}
|