config

package
v0.9.6-rc.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2017 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

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
	AuthTokensConfig *cfg.CompactAuthTokens
}

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

TODO make this less smelly by e.g. moving this to core/nodepool/config

type MainClusterSettings

type MainClusterSettings struct {
	EtcdNodes             []derived.EtcdNode
	KubeResourcesAutosave cfg.KubeResourcesAutosave
}

type ProvidedConfig

type ProvidedConfig struct {
	MainClusterSettings
	// APIEndpoint is the k8s api endpoint to which worker nodes in this node pool communicate
	APIEndpoint             derived.APIEndpoint
	cfg.KubeClusterSettings `yaml:",inline"`
	WorkerNodePoolConfig    `yaml:",inline"`
	DeploymentSettings      `yaml:",inline"`
	cfg.Experimental        `yaml:",inline"`
	Private                 bool   `yaml:"private,omitempty"`
	NodePoolName            string `yaml:"name,omitempty"`
	ProvidedEncryptService  cfg.EncryptService
}

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) APIEndpointURL added in v0.9.6

func (c ProvidedConfig) APIEndpointURL() string

APIEndpointURL is the url of the API endpoint which is written in cloud-config-worker and used by kubelets in worker nodes to access the apiserver

func (ProvidedConfig) Config

func (c ProvidedConfig) Config() (*ComputedConfig, error)

func (*ProvidedConfig) ExternalDNSName added in v0.9.6

func (c *ProvidedConfig) ExternalDNSName() string

func (*ProvidedConfig) Load

func (c *ProvidedConfig) Load(main *cfg.Config) 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) UnmarshalYAML added in v0.9.6

func (c *ProvidedConfig) UnmarshalYAML(unmarshal func(interface{}) error) error

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 Ref

type Ref struct {
	PoolName string
}

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 StackTemplateOptions struct {
	WorkerTmplFile        string
	StackTemplateTmplFile string
	AssetsDir             string
	PrettyPrint           bool
	S3URI                 string
	SkipWait              bool
}

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 {
	APIEndpointName      string `yaml:"apiEndpointName,omitempty"`
	model.NodePoolConfig `yaml:",inline"`
}

func (WorkerNodePoolConfig) Validate

func (c WorkerNodePoolConfig) Validate() error

func (WorkerNodePoolConfig) ValidateInputs

func (c WorkerNodePoolConfig) ValidateInputs() error

func (WorkerNodePoolConfig) WithDefaultsFrom

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL