-
Notifications
You must be signed in to change notification settings - Fork 7
/
options.go
81 lines (71 loc) · 2.8 KB
/
options.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// Copyright (c) 2021 Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
package utils
type TestOptionsContainer struct {
Options TestOptions `yaml:"options"`
}
// Define options available for Tests to consume
type TestOptions struct {
HubCluster Cluster `yaml:"hub"`
ManagedClusters []Cluster `yaml:"clusters"`
ImageRegistry Registry `yaml:"imageRegistry,omitempty"`
KubeConfig string `yaml:"kubeconfig,omitempty"`
Connection CloudConnection `yaml:"cloudConnection,omitempty"`
Headless string `yaml:"headless,omitempty"`
OwnerPrefix string `yaml:"ownerPrefix,omitempty"`
}
// Define the shape of clusters that may be added under management
type Cluster struct {
Name string `yaml:"name,omitempty"`
Namespace string `yaml:"namespace,omitempty"`
Tags map[string]bool `yaml:"tags,omitempty"`
BaseDomain string `yaml:"baseDomain"`
User string `yaml:"user,omitempty"`
Password string `yaml:"password,omitempty"`
KubeContext string `yaml:"kubecontext,omitempty"`
MasterURL string `yaml:"masterURL,omitempty"`
GrafanaURL string `yaml:"grafanaURL,omitempty"`
GrafanaHost string `yaml:"grafanaHost,omitempty"`
KubeConfig string `yaml:"kubeconfig,omitempty"`
}
// Define the image registry
type Registry struct {
// example: quay.io/stolostron
Server string `yaml:"server"`
User string `yaml:"user"`
Password string `yaml:"password"`
}
// CloudConnection struct for bits having to do with Connections
type CloudConnection struct {
PullSecret string `yaml:"pullSecret"`
SSHPrivateKey string `yaml:"sshPrivatekey"`
SSHPublicKey string `yaml:"sshPublickey"`
Keys APIKeys `yaml:"apiKeys,omitempty"`
OCPRelease string `yaml:"ocpRelease,omitempty"`
}
type APIKeys struct {
AWS AWSAPIKey `yaml:"aws,omitempty"`
GCP GCPAPIKey `yaml:"gcp,omitempty"`
Azure AzureAPIKey `yaml:"azure,omitempty"`
}
type AWSAPIKey struct {
AWSAccessID string `yaml:"awsAccessKeyID"`
AWSAccessSecret string `yaml:"awsSecretAccessKeyID"`
BaseDnsDomain string `yaml:"baseDnsDomain"`
Region string `yaml:"region"`
}
type GCPAPIKey struct {
ProjectID string `yaml:"gcpProjectID"`
ServiceAccountJsonKey string `yaml:"gcpServiceAccountJsonKey"`
BaseDnsDomain string `yaml:"baseDnsDomain"`
Region string `yaml:"region"`
}
type AzureAPIKey struct {
BaseDnsDomain string `yaml:"baseDnsDomain"`
BaseDomainRGN string `yaml:"azureBaseDomainRGN"`
Region string `yaml:"region"`
SubscriptionID string `yaml:"subscriptionID"`
TenantID string `yaml:"tenantID"`
ClientID string `yaml:"clientID"`
ClientSecret string `yaml:"clientSecret"`
}