awsbotanist

package
v0.0.0-...-b43e092 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2018 License: Apache-2.0, MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AccessKeyID is a constant for the key in a cloud provider secret and backup secret that holds the AWS access key id.
	AccessKeyID = "accessKeyID"
	// SecretAccessKey is a constant for the key in a cloud provider secret and backup secret that holds the AWS secret access key.
	SecretAccessKey = "secretAccessKey"
	// Region is a constant for the key in a backup secret that holds the AWS region.
	Region = "region"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSBotanist

type AWSBotanist struct {
	*operation.Operation
	CloudProviderName string
	AWSClient         aws.ClientInterface
	AMI               string
}

AWSBotanist is a struct which has methods that perform AWS cloud-specific operations for a Shoot cluster.

func New

func New(o *operation.Operation, purpose string) (*AWSBotanist, error)

New takes an operation object <o> and creates a new AWSBotanist object.

func (*AWSBotanist) ApplyCreateHook

func (b *AWSBotanist) ApplyCreateHook() error

ApplyCreateHook updates the AWS ELB health check to SSL and deploys the aws-lb-readvertiser. https://github.com/gardener/aws-lb-readvertiser

func (*AWSBotanist) DeployBackupInfrastructure

func (b *AWSBotanist) DeployBackupInfrastructure() error

DeployBackupInfrastructure kicks off a Terraform job which deploys the infrastructure resources for backup. It sets up the User and the Bucket to store the backups. Allocate permission to the User to access the bucket.

func (*AWSBotanist) DeployInfrastructure

func (b *AWSBotanist) DeployInfrastructure() error

DeployInfrastructure kicks off a Terraform job which deploys the infrastructure.

func (*AWSBotanist) DeployKube2IAMResources

func (b *AWSBotanist) DeployKube2IAMResources() error

DeployKube2IAMResources creates the respective IAM roles which have been specified in the Shoot manifest addon section. Moreover, some default IAM roles will be created.

func (*AWSBotanist) DestroyBackupInfrastructure

func (b *AWSBotanist) DestroyBackupInfrastructure() error

DestroyBackupInfrastructure kicks off a Terraform job which destroys the infrastructure for etcd backup.

func (*AWSBotanist) DestroyInfrastructure

func (b *AWSBotanist) DestroyInfrastructure() error

DestroyInfrastructure kicks off a Terraform job which destroys the infrastructure.

func (*AWSBotanist) DestroyKube2IAMResources

func (b *AWSBotanist) DestroyKube2IAMResources() error

DestroyKube2IAMResources destroy the kube2iam resources created by Terraform. This comprises IAM roles and policies.

func (*AWSBotanist) GenerateAdmissionControlConfig

func (b *AWSBotanist) GenerateAdmissionControlConfig() (map[string]interface{}, error)

GenerateAdmissionControlConfig generates values which are required to render the chart admissions-controls properly.

func (*AWSBotanist) GenerateCloudConfigUserDataConfig

func (b *AWSBotanist) GenerateCloudConfigUserDataConfig() *common.CloudConfigUserDataConfig

GenerateCloudConfigUserDataConfig generates values which are required to render the chart shoot-cloud-config properly.

func (*AWSBotanist) GenerateCloudProviderConfig

func (b *AWSBotanist) GenerateCloudProviderConfig() (string, error)

GenerateCloudProviderConfig generates the AWS cloud provider config. See this for more details: https://github.com/kubernetes/kubernetes/blob/master/pkg/cloudprovider/providers/aws/aws.go

func (*AWSBotanist) GenerateEtcdBackupConfig

func (b *AWSBotanist) GenerateEtcdBackupConfig() (map[string][]byte, map[string]interface{}, error)

GenerateEtcdBackupConfig returns the etcd backup configuration for the etcd Helm chart.

func (*AWSBotanist) GenerateKube2IAMConfig

func (b *AWSBotanist) GenerateKube2IAMConfig() (map[string]interface{}, error)

GenerateKube2IAMConfig generates the values which are required to render the chart of kube2iam properly.

func (*AWSBotanist) GenerateKubeAPIServerConfig

func (b *AWSBotanist) GenerateKubeAPIServerConfig() (map[string]interface{}, error)

GenerateKubeAPIServerConfig generates the cloud provider specific values which are required to render the Deployment manifest of the kube-apiserver properly.

func (*AWSBotanist) GenerateKubeControllerManagerConfig

func (b *AWSBotanist) GenerateKubeControllerManagerConfig() (map[string]interface{}, error)

GenerateKubeControllerManagerConfig generates the cloud provider specific values which are required to render the Deployment manifest of the kube-controller-manager properly.

func (*AWSBotanist) GenerateKubeSchedulerConfig

func (b *AWSBotanist) GenerateKubeSchedulerConfig() (map[string]interface{}, error)

GenerateKubeSchedulerConfig generates the cloud provider specific values which are required to render the Deployment manifest of the kube-scheduler properly.

func (*AWSBotanist) GenerateMachineClassSecretData

func (b *AWSBotanist) GenerateMachineClassSecretData() map[string][]byte

GenerateMachineClassSecretData generates the secret data for the machine class secret (except the userData field which is computed elsewhere).

func (*AWSBotanist) GenerateMachineConfig

func (b *AWSBotanist) GenerateMachineConfig() ([]map[string]interface{}, []operation.MachineDeployment, error)

GenerateMachineConfig generates the configuration values for the cloud-specific machine class Helm chart. It also generates a list of corresponding MachineDeployments. The provided worker groups will be distributed over the desired availability zones. It returns the computed list of MachineClasses and MachineDeployments.

func (*AWSBotanist) GenerateNginxIngressConfig

func (b *AWSBotanist) GenerateNginxIngressConfig() (map[string]interface{}, error)

GenerateNginxIngressConfig generates values which are required to render the chart nginx-ingress properly.

func (*AWSBotanist) GetCloudProviderName

func (b *AWSBotanist) GetCloudProviderName() string

GetCloudProviderName returns the Kubernetes cloud provider name for this cloud.

func (*AWSBotanist) GetMachineClassInfo

func (b *AWSBotanist) GetMachineClassInfo() (classKind, classPlural, classChartName string)

GetMachineClassInfo returns the name of the class kind, the plural of it and the name of the Helm chart which contains the machine class template.

func (*AWSBotanist) RefreshCloudProviderConfig

func (b *AWSBotanist) RefreshCloudProviderConfig(currentConfig map[string]string) map[string]string

RefreshCloudProviderConfig refreshes the cloud provider credentials in the existing cloud provider config. Not needed on AWS (cloud provider config does not contain the credentials), hence, the original is returned back.

Jump to

Keyboard shortcuts

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