mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
feat(agent): add auto agent platform detection (#4132)
* feat(endpoint): check endpoint type on creation * feat(edge): check edge endpoint type * feat(endpoint): send endpoint creation type * feat(endpoint): pass tls config * feat(endpoint): show connect errors * fix(endpoint): set correct endpoint type * feat(endpoint): support endpoint creation * style(endpoint): remove todo comment * feat(endpoint): set protocol for endpoint url * feat(endpoint): change scheme of url * fix(endpoint): toggle code block * feat(edge): report missing agent platform header * fix(api/endpoints): fix an issue with agent on kubernetes endpoint * feat(core/endpoints): minor UI update Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com>
This commit is contained in:
parent
490b7ad26f
commit
bd7d7dcef5
11 changed files with 226 additions and 76 deletions
|
@ -11,6 +11,9 @@ type (
|
|||
RoleID RoleID `json:"RoleId"`
|
||||
}
|
||||
|
||||
// AgentPlatform represents a platform type for an Agent
|
||||
AgentPlatform int
|
||||
|
||||
// APIOperationAuthorizationRequest represent an request for the authorization to execute an API operation
|
||||
APIOperationAuthorizationRequest struct {
|
||||
Path string
|
||||
|
@ -1141,6 +1144,8 @@ const (
|
|||
PortainerAgentHeader = "Portainer-Agent"
|
||||
// PortainerAgentEdgeIDHeader represent the name of the header containing the Edge ID associated to an agent/agent cluster
|
||||
PortainerAgentEdgeIDHeader = "X-PortainerAgent-EdgeID"
|
||||
// HTTPResponseAgentPlatform represents the name of the header containing the Agent platform
|
||||
HTTPResponseAgentPlatform = "Portainer-Agent-Platform"
|
||||
// PortainerAgentTargetHeader represent the name of the header containing the target node name
|
||||
PortainerAgentTargetHeader = "X-PortainerAgent-Target"
|
||||
// PortainerAgentSignatureHeader represent the name of the header containing the digital signature
|
||||
|
@ -1174,6 +1179,14 @@ const (
|
|||
AuthenticationOAuth
|
||||
)
|
||||
|
||||
const (
|
||||
_ AgentPlatform = iota
|
||||
// AgentPlatformDocker represent the Docker platform (Standalone/Swarm)
|
||||
AgentPlatformDocker
|
||||
// AgentPlatformKubernetes represent the Kubernetes platform
|
||||
AgentPlatformKubernetes
|
||||
)
|
||||
|
||||
const (
|
||||
_ EdgeJobLogsStatus = iota
|
||||
// EdgeJobLogsStatusIdle represents an idle log collection job
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue