eks

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate added in v0.14.0

func Generate(c *config.Config) error

Generate creates the kubeconfig for EKS

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.

type File added in v0.11.0

type File struct {
	Encoding    string `json:"encoding"`
	Content     string `json:"content"`
	Owner       string `json:"owner"`
	Path        string `json:"path"`
	Permissions string `json:"permissions"`
}

File contains details of files to write through cloud-config

Jump to

Keyboard shortcuts

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