amazon

package
v2.1.155 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2020 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PoliciesTemplateName is the name of the custom policies CloudFormation stack that will be executed before
	// calling the eksctl commands
	PoliciesTemplateName = "jenkinsx-policies.yml"
	// ConfigTemplatesFolder is part of the path to the configuration templates
	ConfigTemplatesFolder = "templates"
	// IRSATemplateName is the name of the eksctl configuration file that will be processed after creating the policies
	IRSATemplateName = "irsa.tmpl.yaml"
)

Variables

This section is empty.

Functions

func AvailabilityZones

func AvailabilityZones() ([]string, error)

func CreateIRSAManagedServiceAccounts

func CreateIRSAManagedServiceAccounts(requirements *config.RequirementsConfig, kubeProvidersDir string) error

CreateIRSAManagedServiceAccounts takes the KubeProviders directory and the requirements configuration and creates new ServiceAccounts annotated with a role ARN that is generated by eksctl. The policies attached to these roles are defined in the jenkinsx-policies.yml file within kubeProviders/eks/templates Note: this can't yet be executed in the master pipeline of the Dev Environment because in order to recreate the ServiceAccounts, we need to delete them and the roles first, which causes the next commands to fail

func CreateS3Bucket

func CreateS3Bucket(bucketName string, profile string, region string) (string, error)

CreateS3Bucket creates a new S3 bucket in the default region with the given bucket name returning the location string

func EnableIRSASupportInCluster

func EnableIRSASupportInCluster(requirements *config.RequirementsConfig) error

EnableIRSASupportInCluster Associates IAM as an OIDC provider so it can sign requests and assume roles

func GetAccountIDAndRegion

func GetAccountIDAndRegion(profile string, region string) (string, string, error)

GetAccountIDAndRegion returns the current account ID and region

func GetContainerRegistryHost

func GetContainerRegistryHost() (string, error)

GetContainerRegistryHost

func GetRegionFromContainerRegistryHost

func GetRegionFromContainerRegistryHost(kubeClient kubernetes.Interface, namespace string, dockerRegistry string) string

Deprecated!

This function is kept for backwards compatibility. AWS region should not be resolved from ECR address, but read from ConfigMap (see RememberRegion function). To keep backwards compatibility with existing installations this function will be kept for a while and it will perform migration to config map. Eventually it will be removed from a codebase.

nolint

func InstallAwsIamAuthenticator

func InstallAwsIamAuthenticator(skipPathScan bool) error

InstallAwsIamAuthenticator install iam authenticator for AWS

func InstallAwsIamAuthenticatorWithVersion

func InstallAwsIamAuthenticatorWithVersion(version string, skipPathScan bool) error

InstallAwsIamAuthenticatorWithVersion install a specific version of iam authenticator for AWS

func InstallEksCtl

func InstallEksCtl(skipPathScan bool) error

InstallEksCtl installs eks cli

func InstallEksCtlWithVersion

func InstallEksCtlWithVersion(version string, skipPathScan bool) error

InstallEksCtlWithVersion install a specific version of eks cli

func LazyCreateRegistry

func LazyCreateRegistry(kube kubernetes.Interface, namespace string, region string, dockerRegistry string, orgName string, appName string) error

LazyCreateRegistry lazily creates the ECR registry if it does not already exist

func NewProvider

func NewProvider(region string, profile string) (*clusterProvider, error)

NewProvider returns a Provider implementation configured with a session and implementations for AWS services

func RegisterAwsCustomDomain

func RegisterAwsCustomDomain(customDomain string, elbAddress string) error

RegisterAwsCustomDomain registers a wildcard ALIAS for the custom domain to point at the given ELB host name

Types

type Provider

type Provider interface {
	EKS() eks.EKSer
	EC2() ec2.EC2er
	EKSCtl() eksctl.EKSCtl
	AWSCli() awscli.AWS
}

Provider provides an interface to access AWS services with supported actions

Directories

Path Synopsis
ec2
eks

Jump to

Keyboard shortcuts

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