eks

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2020 License: Apache-2.0 Imports: 77 Imported by: 1

Documentation

Overview

Package eks implements EKS cluster operations. It implements "k8s.io/test-infra/kubetest2/pkg/types.Deployer" and "k8s.io/test-infra/kubetest2/pkg/types.Options". ref. https://pkg.go.dev/k8s.io/test-infra/kubetest2/pkg/types?tab=doc#Deployer ref. https://pkg.go.dev/k8s.io/test-infra/kubetest2/pkg/types?tab=doc#Options

Index

Constants

View Source
const TemplateClusterRole = `` /* 6258-byte string literal not displayed */

TemplateClusterRole is the CloudFormation template for EKS cluster role.

e.g.

Error creating load balancer (will retry): failed to ensure load balancer for service eks-*/hello-world-service: Error creating load balancer: "AccessDenied: User: arn:aws:sts::404174646922:assumed-role/eks-*-cluster-role/* is not authorized to perform: ec2:DescribeAccountAttributes\n\tstatus code: 403"

TODO: scope down (e.g. ec2:DescribeAccountAttributes, ec2:DescribeInternetGateways) mng, fargate, etc. may use other roles

View Source
const TemplateEKSCluster = `` /* 1594-byte string literal not displayed */

TemplateEKSCluster is the CloudFormation template for EKS cluster.

View Source
const TemplateVPCPublicPrivate = `` /* 10555-byte string literal not displayed */

TemplateVPCPublicPrivate is the CloudFormation template for EKS VPC.

e.g. An error occurred (InvalidParameterException) when calling the CreateFargateProfile operation: Subnet subnet-123 provided in Fargate Profile is not a private subnet

Variables

This section is empty.

Functions

func ClusterDeleted added in v0.5.0

func ClusterDeleted(err error) bool

ClusterDeleted returns true if error from EKS API indicates that the EKS cluster has already been deleted.

func Poll added in v0.5.5

func Poll(
	ctx context.Context,
	stopc chan struct{},
	lg *zap.Logger,
	eksAPI eksiface.EKSAPI,
	clusterName string,
	desiredClusterStatus string,
	initialWait time.Duration,
	wait time.Duration,
) <-chan ClusterStatus

Poll periodically fetches the cluster status until the cluster becomes the desired state.

Types

type ClusterStatus added in v0.5.0

type ClusterStatus struct {
	Cluster *awseks.Cluster
	Error   error
}

ClusterStatus represents the CloudFormation status.

type Tester added in v0.5.0

type Tester struct {
	// contains filtered or unexported fields
}

Tester implements "kubetest2" Deployer. ref. https://pkg.go.dev/k8s.io/test-infra/kubetest2/pkg/types?tab=doc

func (*Tester) ArtifactsDir added in v0.8.7

func (ts *Tester) ArtifactsDir() string

ArtifactsDir returns the path to the directory where artifacts should be written (including metadata files like junit_runner.xml). ref. https://pkg.go.dev/k8s.io/test-infra/kubetest2/pkg/types?tab=doc#Options

func (*Tester) Build added in v0.5.0

func (ts *Tester) Build() error

Build should build kubernetes and package it in whatever format the deployer consumes. ref. https://pkg.go.dev/k8s.io/test-infra/kubetest2/pkg/types?tab=doc#Deployer ref. https://pkg.go.dev/k8s.io/test-infra/kubetest2/pkg/types?tab=doc#Options

func (*Tester) Down added in v0.5.0

func (ts *Tester) Down() error

Down cancels the cluster creation and destroy the test cluster if any. ref. https://pkg.go.dev/k8s.io/test-infra/kubetest2/pkg/types?tab=doc#Deployer ref. https://pkg.go.dev/k8s.io/test-infra/kubetest2/pkg/types?tab=doc#Options

func (*Tester) DownloadClusterLogs added in v0.5.0

func (ts *Tester) DownloadClusterLogs(artifactDir, _ string) error

DownloadClusterLogs dumps all logs to artifact directory. Let default kubetest log dumper handle all artifact uploads. See https://github.com/kubernetes/test-infra/pull/9811/files#r225776067. ref. https://pkg.go.dev/k8s.io/test-infra/kubetest2/pkg/types?tab=doc#Deployer ref. https://pkg.go.dev/k8s.io/test-infra/kubetest2/pkg/types?tab=doc#Options

func (*Tester) DumpClusterLogs added in v0.5.0

func (ts *Tester) DumpClusterLogs() error

DumpClusterLogs should export logs from the cluster. It may be called multiple times. Options for this should come from New(...) ref. https://pkg.go.dev/k8s.io/test-infra/kubetest2/pkg/types?tab=doc#Deployer ref. https://pkg.go.dev/k8s.io/test-infra/kubetest2/pkg/types?tab=doc#Options

func (*Tester) HelpRequested added in v0.8.7

func (ts *Tester) HelpRequested() bool

HelpRequested true, help text will be shown to the user after instancing the deployer and tester. ref. https://pkg.go.dev/k8s.io/test-infra/kubetest2/pkg/types?tab=doc#Options

func (*Tester) IsUp added in v0.5.0

func (ts *Tester) IsUp() (up bool, err error)

IsUp should return true if a test cluster is successfully provisioned. ref. https://pkg.go.dev/k8s.io/test-infra/kubetest2/pkg/types?tab=doc#Deployer ref. https://pkg.go.dev/k8s.io/test-infra/kubetest2/pkg/types?tab=doc#Options

func (*Tester) Kubeconfig added in v0.5.0

func (ts *Tester) Kubeconfig() (string, error)

Kubeconfig returns a path to a kubeconfig file for the cluster. ref. https://pkg.go.dev/k8s.io/test-infra/kubetest2/pkg/types?tab=doc#Deployer ref. https://pkg.go.dev/k8s.io/test-infra/kubetest2/pkg/types?tab=doc#Options

func (*Tester) KubernetesClientSet added in v0.5.0

func (ts *Tester) KubernetesClientSet() *kubernetes.Clientset

KubernetesClientSet returns Kubernetes Go client. ref. https://pkg.go.dev/k8s.io/test-infra/kubetest2/pkg/types?tab=doc#Deployer ref. https://pkg.go.dev/k8s.io/test-infra/kubetest2/pkg/types?tab=doc#Options

func (*Tester) LoadConfig added in v0.5.0

func (ts *Tester) LoadConfig() (eksconfig.Config, error)

LoadConfig reloads configuration from disk to read the latest cluster configuration and its states. It's either reloaded from disk or returned from embedded EKS deployer. ref. https://pkg.go.dev/k8s.io/test-infra/kubetest2/pkg/types?tab=doc#Deployer ref. https://pkg.go.dev/k8s.io/test-infra/kubetest2/pkg/types?tab=doc#Options

func (*Tester) Provider added in v0.5.0

func (ts *Tester) Provider() string

Provider returns the kubernetes provider for legacy deployers. ref. https://pkg.go.dev/k8s.io/test-infra/kubetest2/pkg/types?tab=doc#Deployer ref. https://pkg.go.dev/k8s.io/test-infra/kubetest2/pkg/types?tab=doc#Options

func (*Tester) ShouldBuild added in v0.8.7

func (ts *Tester) ShouldBuild() bool

ShouldBuild true, kubetest2 will be calling deployer.Build. ref. https://pkg.go.dev/k8s.io/test-infra/kubetest2/pkg/types?tab=doc#Options

func (*Tester) ShouldDown added in v0.8.7

func (ts *Tester) ShouldDown() bool

ShouldDown true, kubetest2 will be calling deployer.Down. ref. https://pkg.go.dev/k8s.io/test-infra/kubetest2/pkg/types?tab=doc#Options

func (*Tester) ShouldTest added in v0.8.7

func (ts *Tester) ShouldTest() bool

ShouldTest true, kubetest2 will be calling tester.Test. ref. https://pkg.go.dev/k8s.io/test-infra/kubetest2/pkg/types?tab=doc#Options

func (*Tester) ShouldUp added in v0.8.7

func (ts *Tester) ShouldUp() bool

ShouldUp true, kubetest2 will be calling deployer.Up. ref. https://pkg.go.dev/k8s.io/test-infra/kubetest2/pkg/types?tab=doc#Options

func (*Tester) Up added in v0.5.0

func (ts *Tester) Up() (err error)

Up should provision a new cluster for testing. ref. https://pkg.go.dev/k8s.io/test-infra/kubetest2/pkg/types?tab=doc#Deployer ref. https://pkg.go.dev/k8s.io/test-infra/kubetest2/pkg/types?tab=doc#Options

Directories

Path Synopsis
Package alb implements ALB plugin that installs 2048.
Package alb implements ALB plugin that installs 2048.
Package appmesh implements App Mesh add-on.
Package appmesh implements App Mesh add-on.
Package cronjobs creates CronJob objects in Kubernetes.
Package cronjobs creates CronJob objects in Kubernetes.
Package fargate implements tester for Fargate.
Package fargate implements tester for Fargate.
Package gpu implements GPU plugin.
Package gpu implements GPU plugin.
Package irsa implements tester for IAM Roles for Service Accounts (IRSA).
Package irsa implements tester for IAM Roles for Service Accounts (IRSA).
Package jobsecho creates Job objects in Kubernetes.
Package jobsecho creates Job objects in Kubernetes.
Package jobspi creates example Job objects in Kubernetes.
Package jobspi creates example Job objects in Kubernetes.
Package mng defines AWS EKS Managed Node Group configuration.
Package mng defines AWS EKS Managed Node Group configuration.
Package ng implements EKS worker nodes with a custom AMI.
Package ng implements EKS worker nodes with a custom AMI.
Package nlb implements NLB plugin.
Package nlb implements NLB plugin.
Package secrets implements Secrets plugin.
Package secrets implements Secrets plugin.

Jump to

Keyboard shortcuts

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