Documentation ¶
Index ¶
- Constants
- Variables
- type Config
- type ElasticFileshare
- type ElasticFileshareData
- type NodePool
- type Platform
- func (p *Platform) Address() string
- func (p *Platform) Apply(destroy bool) error
- func (p *Platform) BeProvisioner(state *terraformer.State) error
- func (p *Platform) Code() []byte
- func (p *Platform) Config() interface{}
- func (p *Platform) Credentials(params ...string)
- func (p *Platform) GetPrivateKey() (string, []byte, bool)
- func (p *Platform) GetPublicKey() (string, []byte, bool)
- func (p *Platform) LoadState(stateBuffer *bytes.Buffer) error
- func (p *Platform) MergeWithEnv(envConfig map[string]string) error
- func (p *Platform) Name() string
- func (p *Platform) Nodes() []*state.Node
- func (p *Platform) Output(name string) string
- func (p *Platform) Plan(destroy bool) (plan *terraformer.Plan, err error)
- func (p *Platform) Port() int
- func (p *Platform) PrivateKey(file string, encKey, key []byte)
- func (p *Platform) Provision() error
- func (p *Platform) PublicKey(file string, key []byte)
- func (p *Platform) State() *terraformer.State
- func (p *Platform) Terminate() error
- func (p *Platform) Variables() map[string]interface{}
Constants ¶
const EKSAmi = "" // empty string will get the latest
EKSAmi is the latest or stable EKS AMI ID on us-west-2 region
const EKSGPUAmi = "ami-038a987c6425a84ad" //amazon-eks-node-1.14-v20190906
EKSGPUAmi is the latest or stable EKS AMI ID that supports GPU on us-west-2 region
Variables ¶
var ResourceTemplates map[string]string
ResourceTemplates maps resource names to content of resources implementation specified in code.go
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ClusterName string `json:"-" yaml:"-" mapstructure:"clustername"` Username string `json:"username" yaml:"username" mapstructure:"username"` AwsAccessKey string `json:"-" yaml:"-" mapstructure:"-"` AwsSecretKey string `json:"-" yaml:"-" mapstructure:"-"` AwsSessionToken string `json:"-" yaml:"-" mapstructure:"-"` AwsRegion string `json:"aws_region,omitempty" yaml:"aws_region,omitempty" mapstructure:"aws_region"` AwsVpcID string `json:"aws_vpc_id" yaml:"aws_vpc_id" mapstructure:"aws_vpc_id"` IngressSubnets []string `json:"ingress_subnets" yaml:"ingress_subnets,omitempty" mapstructure:"ingress_subnets"` ClusterSecurityGroups []string `json:"cluster_security_groups" yaml:"cluster_security_groups" mapstructure:"cluster_security_groups"` PrivateKey string `json:"private_key,omitempty" yaml:"private_key,omitempty" mapstructure:"private_key"` PrivateKeyFile string `json:"private_key_file" yaml:"private_key_file" mapstructure:"private_key_file"` PublicKey string `json:"public_key,omitempty" yaml:"public_key,omitempty" mapstructure:"public_key"` PublicKeyFile string `json:"public_key_file" yaml:"public_key_file" mapstructure:"public_key_file"` KubernetesVersion string `json:"kubernetes_version" yaml:"kubernetes_version" mapstructure:"kubernetes_version"` EndpointPublicAccess bool `json:"endpoint_public_access" yaml:"endpoint_public_access" mapstructure:"endpoint_public_access"` EndpointPrivateAccess bool `json:"endpoint_private_access" yaml:"endpoint_private_access" mapstructure:"endpoint_private_access"` Route53Name []string `json:"route_53_name" yaml:"route_53_name" mapstructure:"route_53_name"` ClusterLogsTypes []string `json:"cluster_logs_types" yaml:"cluster_logs_types" mapstructure:"cluster_logs_types"` S3Buckets []string `json:"s3_buckets" yaml:"s3_buckets" mapstructure:"s3_buckets"` MaxPods int `json:"max_pods,omitempty" yaml:"max_pods,omitempty" mapstructure:"max_pods"` MaxMapCount int `json:"max_map_count,omitempty" yaml:"max_map_count,omitempty" mapstructure:"max_map_count"` DefaultNodePool NodePool `json:"default_node_pool" yaml:"default_node_pool" mapstructure:"default_node_pool"` NodePools map[string]NodePool `json:"node_pools" yaml:"node_pools" mapstructure:"node_pools"` }
Config defines the AWS configuration parameters in the Cluster config file
func NewConfigFrom ¶
func NewConfigFrom(m map[interface{}]interface{}) *Config
NewConfigFrom returns a new AWS configuration from a map, usually from a cluster config file
func (*Config) MergeElasticFileshares ¶
MergeElasticFileshares merges the elastic fileshares in this configuration with the given environment configuration for elastic fileshares
func (*Config) MergeNodePools ¶
MergeNodePools merges the node pools in this configuration with the given environment configuration for node pools
func (*Config) MergeWithEnv ¶
MergeWithEnv merges this configuration with the given configuration in a map[string]string, usually from environment variables
func (*Config) MergeWithMapConfig ¶
func (c *Config) MergeWithMapConfig(m map[interface{}]interface{})
MergeWithMapConfig merges this configuration with the given configuration in a map[string], usually from a cluster config file
type ElasticFileshare ¶
type ElasticFileshare struct { // contains filtered or unexported fields }
ElasticFileshare defines the settings for an ElasticFileshare on AWS
type ElasticFileshareData ¶
type ElasticFileshareData struct {}
ElasticFileshareData contains the attributes for an instantiated ElasticFileshare in AWS
type NodePool ¶
type NodePool struct { Name string `json:"-" yaml:"-" mapstructure:"name"` Count int `json:"count" yaml:"count" mapstructure:"count"` AwsAmi string `json:"aws_ami,omitempty" yaml:"aws_ami,omitempty" mapstructure:"aws_ami"` AwsInstanceType string `json:"aws_instance_type,omitempty" yaml:"aws_instance_type,omitempty" mapstructure:"aws_instance_type"` KubeletNodeLabels []string `json:"kubelet_node_labels,omitempty" yaml:"kubelet_node_labels,omitempty" mapstructure:"kubelet_node_labels"` KubeletNodeTaints []string `json:"kubelet_node_taints,omitempty" yaml:"kubelet_node_taints,omitempty" mapstructure:"kubelet_node_taints"` RootVolumeSize int `json:"root_volume_size,omitempty" yaml:"root_volume_size,omitempty" mapstructure:"root_volume_size"` PGStrategy string `json:"placementgroup_strategy,omitempty" yaml:"placementgroup_strategy,omitempty" mapstructure:"placementgroup_strategy"` Subnets []string `json:"worker_pool_subnets,omitempty" yaml:"worker_pool_subnets,omitempty" mapstructure:"worker_pool_subnets"` SecurityGroups []string `json:"security_groups,omitempty" yaml:"security_groups,omitempty" mapstructure:"security_groups"` }
NodePool defines the settings for group of instances on AWS
type Platform ¶
type Platform struct {
// contains filtered or unexported fields
}
Platform implements the Provisioner interface for AWS EKS
func CreateFrom ¶
func CreateFrom(clusterName string, config map[interface{}]interface{}, credentials []string, ui *ui.UI, version string) *Platform
CreateFrom creates a new Platform with the given configuration for AWS EKS
func New ¶
func New(clusterName string, envConfig map[string]string, ui *ui.UI, version string) (*Platform, error)
New creates a new Plaform with the given environment configuration
func (*Platform) Apply ¶
Apply apply the changes either to create or destroy the cluster on this platform
func (*Platform) BeProvisioner ¶
func (p *Platform) BeProvisioner(state *terraformer.State) error
BeProvisioner setup the Plaftorm to be a Provisioner
func (*Platform) Config ¶
func (p *Platform) Config() interface{}
Config returns the default configuration for AWS
func (*Platform) Credentials ¶
Credentials is to assign the credentials to the configuration
func (*Platform) GetPrivateKey ¶
GetPrivateKey returns the private key and file from the configuration, also if this platform requires a private key for provisioning
func (*Platform) GetPublicKey ¶
GetPublicKey return the public key and file from the configuration, also if this platform requires a public key for provisioning
func (*Platform) LoadState ¶
LoadState loads the given Terraform state in a buffer into the terraformer state
func (*Platform) MergeWithEnv ¶
MergeWithEnv implements the MergeWithEnv method from the interfase Provisioner. It merges the environment variables with the existing configuration
func (*Platform) Plan ¶
func (p *Platform) Plan(destroy bool) (plan *terraformer.Plan, err error)
Plan do the planning of the changes either to create or destroy the cluster on this platform.
func (*Platform) PrivateKey ¶
PrivateKey sets the private key and file in the configuration
func (*Platform) PublicKey ¶
PublicKey sets the public key and file in the configuration and variables
func (*Platform) State ¶
func (p *Platform) State() *terraformer.State
State returns the current Terraform state of the cluster