-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathagent.go
54 lines (45 loc) · 1.4 KB
/
agent.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package api
import (
"github.com/glasskube/distr/internal/types"
"github.com/google/uuid"
)
type AgentResource struct {
Version types.AgentVersion `json:"version"`
}
type AgentRegistryAuth struct {
Username string `json:"username"`
Password string `json:"password"`
}
type AgentDeployment struct {
ID uuid.UUID `json:"id"`
RevisionID uuid.UUID `json:"revisionId"`
RegistryAuth map[string]AgentRegistryAuth `json:"registryAuth"`
}
type DockerAgentResource struct {
AgentResource
Deployment *DockerAgentDeployment `json:"deployment"`
}
type DockerAgentDeployment struct {
AgentDeployment
ComposeFile []byte `json:"composeFile"`
EnvFile []byte `json:"envFile"`
types.DockerType
}
type KubernetesAgentResource struct {
AgentResource
Namespace string `json:"namespace"`
Deployment *KubernetesAgentDeployment `json:"deployment"`
}
type KubernetesAgentDeployment struct {
AgentDeployment
ReleaseName string `json:"releaseName"`
ChartUrl string `json:"chartUrl"`
ChartName string `json:"chartName"`
ChartVersion string `json:"chartVersion"`
Values map[string]any `json:"values"`
}
type AgentDeploymentStatus struct {
RevisionID uuid.UUID `json:"revisionId"`
Type types.DeploymentStatusType `json:"type"`
Message string `json:"message"`
}