Documentation ¶
Index ¶
- func Generate(c *config.Config) error
- func ParseCloudConfig(cloudConfig []byte, region string) (*clientcmdapi.Config, error)
- func ParseShellScript(userData string, region string) (*clientcmdapi.Config, error)
- func ParseUserData(userData, region string) (*clientcmdapi.Config, error)
- type CloudConfig
- type EC2MetadataClient
- type File
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseCloudConfig ¶ added in v0.11.0
func ParseCloudConfig(cloudConfig []byte, region string) (*clientcmdapi.Config, error)
ParseCloudConfig parses gzipped cloud-config formatted YAML from cloud-init As a kubelet kubeconfig file is provided we basically pull this out as-is from cloud-config but merge in our CA data as `certificate-authority-data` to save us having to write out a cert file.
func ParseShellScript ¶ added in v0.11.0
func ParseShellScript(userData string, region string) (*clientcmdapi.Config, error)
ParseShellScript parses shell-script format user-data seen on managed nodegroups
func ParseUserData ¶ added in v0.13.0
func ParseUserData(userData, region string) (*clientcmdapi.Config, error)
ParseUserData takes a string input metadata, works out its type and returns a *clientcmdapi.Config ready for marshalling to disk.
Types ¶
type CloudConfig ¶ added in v0.11.0
type CloudConfig struct {
WriteFiles []File `json:"write_files"`
}
CloudConfig contains the parsed cloud-config data
type EC2MetadataClient ¶ added in v0.11.0
type EC2MetadataClient struct {
// contains filtered or unexported fields
}
EC2MetadataClient interface
func NewEC2MetadataClient ¶ added in v0.11.0
func NewEC2MetadataClient() (*EC2MetadataClient, error)
NewEC2MetadataClient instantiates an EC2 Metadata client
func (*EC2MetadataClient) GetUserData ¶ added in v0.11.0
func (c *EC2MetadataClient) GetUserData() (string, error)
GetUserData wraps the the AWS EC2 Metadata call This is all so we can mock it. There has to be a better way but the AWS Go SDK seems...a bit rubbish.
func (*EC2MetadataClient) Region ¶ added in v1.1.1
func (c *EC2MetadataClient) Region() (string, error)
Region wraps the the AWS EC2 Region call This is all so we can mock it. There has to be a better way but the AWS Go SDK seems...a bit rubbish.