-
Notifications
You must be signed in to change notification settings - Fork 7
/
cluster.go
41 lines (39 loc) · 1.19 KB
/
cluster.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
package v1payload
//ListClustersOutput contains a list of projects
type ListClustersOutput struct {
Clusters []*GetClusterOutput
}
//GetClusterOutput get some details of a specific cluster. Useful to setup kube config.
type GetClusterOutput struct {
URL string `json:"url"`
ShortName string `json:"short_name"`
Name string `json:"name"`
Namespaces []struct {
Name string `json:"name"`
} `json:"namespaces"`
ServiceType string `json:"service_type"`
ServiceURL string `json:"service_url"`
CaCertificate string `json:"ca_certificate"`
Capacity struct {
CPU float64 `json:"cpu"`
Memory float64 `json:"memory"`
Pods int `json:"pods"`
} `json:"capacity"`
Usage struct {
CPU float64 `json:"cpu"`
Memory float64 `json:"memory"`
Pods int `json:"pods"`
} `json:"usage"`
KubeConfigUser struct {
Token string `json:"token"`
AuthProvider struct {
Config struct {
IdpIssuerURL string `json:"idp-issuer-url"`
ClientID string `json:"client-id"`
RefreshToken string `json:"refresh-token"`
IDToken string `json:"id-token"`
} `json:"config"`
Name string `json:"name"`
} `json:"auth-provider"`
} `json:"kubeconfig_user"`
}