Documentation ¶
Index ¶
- type CompressedStackConfig
- type ComputedConfig
- type DeploymentSettings
- type MainClusterSettings
- type ProvidedConfig
- func (c ProvidedConfig) Config() (*ComputedConfig, error)
- func (c *ProvidedConfig) Load(main *cfg.Config) error
- func (c ProvidedConfig) NestedStackName() string
- func (c ProvidedConfig) SecurityGroupRefs() []string
- func (c ProvidedConfig) StackConfig(opts StackTemplateOptions) (*StackConfig, error)
- func (c ProvidedConfig) StackName() string
- func (c ProvidedConfig) StackNameEnvFileName() string
- func (c ProvidedConfig) StackNameEnvVarName() string
- func (c ProvidedConfig) VPCRef() string
- func (c ProvidedConfig) ValidateInputs() error
- func (c ProvidedConfig) WorkerDeploymentSettings() WorkerDeploymentSettings
- type Ref
- type StackConfig
- type StackTemplateOptions
- type WorkerDeploymentSettings
- type WorkerNodePoolConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompressedStackConfig ¶
type CompressedStackConfig struct {
*StackConfig
}
func (*CompressedStackConfig) RenderStackTemplateAsBytes ¶
func (c *CompressedStackConfig) RenderStackTemplateAsBytes() ([]byte, error)
func (*CompressedStackConfig) RenderStackTemplateAsString ¶
func (c *CompressedStackConfig) RenderStackTemplateAsString() (string, error)
type ComputedConfig ¶
type ComputedConfig struct { ProvidedConfig // Fields computed from Cluster AMI string TLSConfig *cfg.CompactTLSAssets }
type DeploymentSettings ¶
type DeploymentSettings struct {
cfg.DeploymentSettings `yaml:",inline"`
}
func (DeploymentSettings) Valid ¶
func (s DeploymentSettings) Valid() error
func (DeploymentSettings) ValidateInputs ¶
func (c DeploymentSettings) ValidateInputs() error
func (DeploymentSettings) WithDefaultsFrom ¶
func (c DeploymentSettings) WithDefaultsFrom(main cfg.DeploymentSettings) DeploymentSettings
TODO make this less smelly by e.g. moving this to core/nodepool/config
type MainClusterSettings ¶
type ProvidedConfig ¶
type ProvidedConfig struct { MainClusterSettings cfg.KubeClusterSettings `yaml:",inline"` WorkerNodePoolConfig `yaml:",inline"` DeploymentSettings `yaml:",inline"` cfg.Experimental `yaml:",inline"` Private bool `yaml:"private,omitempty"` NodePoolName string `yaml:"name,omitempty"` // contains filtered or unexported fields }
func ClusterFromBytes ¶
func ClusterFromBytes(data []byte, main *cfg.Config) (*ProvidedConfig, error)
ClusterFromBytes Necessary for unit tests, which store configs as hardcoded strings
func ClusterFromBytesWithEncryptService ¶
func ClusterFromBytesWithEncryptService(data []byte, main *cfg.Config, encryptService cfg.EncryptService) (*ProvidedConfig, error)
func (ProvidedConfig) Config ¶
func (c ProvidedConfig) Config() (*ComputedConfig, error)
func (ProvidedConfig) NestedStackName ¶
func (c ProvidedConfig) NestedStackName() string
NestedStackName returns a sanitized name of this node pool which is usable as a valid cloudformation nested stack name
func (ProvidedConfig) SecurityGroupRefs ¶
func (c ProvidedConfig) SecurityGroupRefs() []string
func (ProvidedConfig) StackConfig ¶
func (c ProvidedConfig) StackConfig(opts StackTemplateOptions) (*StackConfig, error)
func (ProvidedConfig) StackName ¶
func (c ProvidedConfig) StackName() string
StackName returns the logical name of a CloudFormation stack resource in a root stack template This is not needed to be unique in an AWS account because the actual name of a nested stack is generated randomly by CloudFormation by including the logical name. This is NOT intended to be used to reference stack name from cloud-config as the target of awscli or cfn-bootstrap-tools commands e.g. `cfn-init` and `cfn-signal`
func (ProvidedConfig) StackNameEnvFileName ¶
func (c ProvidedConfig) StackNameEnvFileName() string
func (ProvidedConfig) StackNameEnvVarName ¶
func (c ProvidedConfig) StackNameEnvVarName() string
func (ProvidedConfig) VPCRef ¶
func (c ProvidedConfig) VPCRef() string
func (ProvidedConfig) ValidateInputs ¶
func (c ProvidedConfig) ValidateInputs() error
func (ProvidedConfig) WorkerDeploymentSettings ¶
func (c ProvidedConfig) WorkerDeploymentSettings() WorkerDeploymentSettings
type StackConfig ¶
type StackConfig struct { *ComputedConfig UserDataWorker string StackTemplateOptions }
func (*StackConfig) Compress ¶
func (c *StackConfig) Compress() (*CompressedStackConfig, error)
func (*StackConfig) UserDataWorkerFileName ¶
func (c *StackConfig) UserDataWorkerFileName() string
UserDataWorkerFileName is used to upload and download userdata-worker-<fingerprint> files
func (*StackConfig) UserDataWorkerS3Prefix ¶
func (c *StackConfig) UserDataWorkerS3Prefix() (string, error)
UserDataWorkerS3Prefix is the prefix prepended to all user-data-worker-<fingerprint> files uploaded to S3 Use this to author the IAM policy to provide worker nodes least required permissions for getting the files from S3
func (*StackConfig) UserDataWorkerS3URI ¶
func (c *StackConfig) UserDataWorkerS3URI() (string, error)
UserDataWorkerS3URI is the URI to an userdata-worker-<fingerprint> file used to provision worker nodes Use this to run download the file by running e.g. `aws cp *return value of UserDataWorkerS3URI* ./`
func (*StackConfig) ValidateUserData ¶
func (c *StackConfig) ValidateUserData() error
type StackTemplateOptions ¶
type WorkerDeploymentSettings ¶
type WorkerDeploymentSettings struct { WorkerNodePoolConfig cfg.Experimental DeploymentSettings }
func (WorkerDeploymentSettings) StackTags ¶
func (c WorkerDeploymentSettings) StackTags() map[string]string
func (WorkerDeploymentSettings) Valid ¶
func (c WorkerDeploymentSettings) Valid() error
func (WorkerDeploymentSettings) WorkerSecurityGroupRefs ¶
func (c WorkerDeploymentSettings) WorkerSecurityGroupRefs() []string
type WorkerNodePoolConfig ¶
type WorkerNodePoolConfig struct {
model.NodePoolConfig `yaml:",inline"`
}
func NewWorkerNodePoolConfig ¶
func NewWorkerNodePoolConfig() WorkerNodePoolConfig
func (WorkerNodePoolConfig) Validate ¶
func (c WorkerNodePoolConfig) Validate() error
func (WorkerNodePoolConfig) ValidateInputs ¶
func (c WorkerNodePoolConfig) ValidateInputs() error
func (WorkerNodePoolConfig) WithDefaultsFrom ¶
func (c WorkerNodePoolConfig) WithDefaultsFrom(main cfg.DefaultWorkerSettings) WorkerNodePoolConfig