forked from openshift/installer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
aws.go
74 lines (66 loc) · 4.13 KB
/
aws.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
package aws
// Endpoints is the type of the AWS endpoints.
type Endpoints string
const (
// EndpointsAll represents the configuration for using both private and public endpoints.
EndpointsAll Endpoints = "all"
// EndpointsPrivate represents the configuration for using only private endpoints.
EndpointsPrivate Endpoints = "private"
// EndpointsPublic represents the configuration for using only public endpoints.
EndpointsPublic Endpoints = "public"
// DefaultVPCCIDRBlock is the default CIDR range for an AWS VPC.
DefaultVPCCIDRBlock = "10.0.0.0/16"
// DefaultProfile is the default AWS credentials profile to use.
DefaultProfile = "default"
// DefaultRegion is the default AWS region for the cluster.
DefaultRegion = "us-east-1"
)
// AWS converts AWS related config.
type AWS struct {
EC2AMIOverride string `json:"tectonic_aws_ec2_ami_override,omitempty" yaml:"ec2AMIOverride,omitempty"`
Endpoints Endpoints `json:"tectonic_aws_endpoints,omitempty" yaml:"endpoints,omitempty"`
External `json:",inline" yaml:"external,omitempty"`
ExtraTags map[string]string `json:"tectonic_aws_extra_tags,omitempty" yaml:"extraTags,omitempty"`
InstallerRole string `json:"tectonic_aws_installer_role,omitempty" yaml:"installerRole,omitempty"`
Master `json:",inline" yaml:"master,omitempty"`
Profile string `json:"tectonic_aws_profile,omitempty" yaml:"profile,omitempty"`
Region string `json:"tectonic_aws_region,omitempty" yaml:"region,omitempty"`
VPCCIDRBlock string `json:"tectonic_aws_vpc_cidr_block,omitempty" yaml:"vpcCIDRBlock,omitempty"`
Worker `json:",inline" yaml:"worker,omitempty"`
}
// External converts external related config.
type External struct {
MasterSubnetIDs []string `json:"tectonic_aws_external_master_subnet_ids,omitempty" yaml:"masterSubnetIDs,omitempty"`
PrivateZone string `json:"tectonic_aws_external_private_zone,omitempty" yaml:"privateZone,omitempty"`
VPCID string `json:"tectonic_aws_external_vpc_id,omitempty" yaml:"vpcID,omitempty"`
WorkerSubnetIDs []string `json:"tectonic_aws_external_worker_subnet_ids,omitempty" yaml:"workerSubnetIDs,omitempty"`
}
// Master converts master related config.
type Master struct {
CustomSubnets map[string]string `json:"tectonic_aws_master_custom_subnets,omitempty" yaml:"customSubnets,omitempty"`
EC2Type string `json:"tectonic_aws_master_ec2_type,omitempty" yaml:"ec2Type,omitempty"`
ExtraSGIDs []string `json:"tectonic_aws_master_extra_sg_ids,omitempty" yaml:"extraSGIDs,omitempty"`
IAMRoleName string `json:"tectonic_aws_master_iam_role_name,omitempty" yaml:"iamRoleName,omitempty"`
MasterRootVolume `json:",inline" yaml:"rootVolume,omitempty"`
}
// MasterRootVolume converts master rool volume related config.
type MasterRootVolume struct {
IOPS int `json:"tectonic_aws_master_root_volume_iops,omitempty" yaml:"iops,omitempty"`
Size int `json:"tectonic_aws_master_root_volume_size,omitempty" yaml:"size,omitempty"`
Type string `json:"tectonic_aws_master_root_volume_type,omitempty" yaml:"type,omitempty"`
}
// Worker converts worker related config.
type Worker struct {
CustomSubnets map[string]string `json:"tectonic_aws_worker_custom_subnets,omitempty" yaml:"customSubnets,omitempty"`
EC2Type string `json:"tectonic_aws_worker_ec2_type,omitempty" yaml:"ec2Type,omitempty"`
ExtraSGIDs []string `json:"tectonic_aws_worker_extra_sg_ids,omitempty" yaml:"extraSGIDs,omitempty"`
IAMRoleName string `json:"tectonic_aws_worker_iam_role_name,omitempty" yaml:"iamRoleName,omitempty"`
LoadBalancers []string `json:"tectonic_aws_worker_load_balancers,omitempty" yaml:"loadBalancers,omitempty"`
WorkerRootVolume `json:",inline" yaml:"rootVolume,omitempty"`
}
// WorkerRootVolume converts worker rool volume related config.
type WorkerRootVolume struct {
IOPS int `json:"tectonic_aws_worker_root_volume_iops,omitempty" yaml:"iops,omitempty"`
Size int `json:"tectonic_aws_worker_root_volume_size,omitempty" yaml:"size,omitempty"`
Type string `json:"tectonic_aws_worker_root_volume_type,omitempty" yaml:"type,omitempty"`
}