Documentation ¶
Overview ¶
Package eks implements EKS cluster operations.
Index ¶
- Constants
- func ClusterDeleted(err error) bool
- func Poll(ctx context.Context, stopc chan struct{}, lg *zap.Logger, ...) <-chan ClusterStatus
- type ClusterStatus
- type Tester
- func (ts *Tester) Build() error
- func (ts *Tester) CreateMNG() error
- func (ts *Tester) Down() error
- func (ts *Tester) DownloadClusterLogs(artifactDir, _ string) error
- func (ts *Tester) DumpClusterLogs() error
- func (ts *Tester) IsUp() (up bool, err error)
- func (ts *Tester) Kubeconfig() (string, error)
- func (ts *Tester) KubernetesClientSet() *kubernetes.Clientset
- func (ts *Tester) LoadConfig() (eksconfig.Config, error)
- func (ts *Tester) Provider() string
- func (ts *Tester) Up() (err error)
Constants ¶
const ClusterStatusDELETEDORNOTEXIST = "DELETED/NOT-EXIST"
ClusterStatusDELETEDORNOTEXIST defines the cluster status when the cluster is not found.
ref. https://docs.aws.amazon.com/eks/latest/APIReference/API_Cluster.html#AmazonEKS-Type-Cluster-status
CREATING ACTIVE UPDATING DELETING FAILED
const TemplateCluster = `` /* 1152-byte string literal not displayed */
TemplateCluster is the CloudFormation template for EKS cluster.
const TemplateClusterRoleBasic = `` /* 1082-byte string literal not displayed */
TemplateClusterRoleBasic is the CloudFormation template for EKS cluster role.
const TemplateClusterRoleNLB = `` /* 1337-byte string literal not displayed */
TemplateClusterRoleNLB is the CloudFormation template for EKS cluster role with policies required for NLB service operation.
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)
const TemplateVPC = `` /* 5892-byte string literal not displayed */
TemplateVPC is the CloudFormation template for EKS VPC.
Variables ¶
This section is empty.
Functions ¶
func ClusterDeleted ¶ added in v0.5.0
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
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://github.com/kubernetes/test-infra/blob/master/kubetest2/pkg/types/types.go
func (*Tester) Build ¶ added in v0.5.0
Build should build kubernetes and package it in whatever format the deployer consumes
func (*Tester) CreateMNG ¶ added in v0.5.5
CreateMNG creates/adds EKS "Managed Node Group"s. The existing node groups won't be recreated.
func (*Tester) Down ¶ added in v0.5.0
Down cancels the cluster creation and destroy the test cluster if any.
func (*Tester) DownloadClusterLogs ¶ added in v0.5.0
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.
func (*Tester) DumpClusterLogs ¶ added in v0.5.0
DumpClusterLogs should export logs from the cluster. It may be called multiple times. Options for this should come from New(...)
func (*Tester) IsUp ¶ added in v0.5.0
IsUp should return true if a test cluster is successfully provisioned
func (*Tester) Kubeconfig ¶ added in v0.5.0
Kubeconfig returns a path to a kubeconfig file for the cluster.
func (*Tester) KubernetesClientSet ¶ added in v0.5.0
func (ts *Tester) KubernetesClientSet() *kubernetes.Clientset
KubernetesClientSet returns Kubernetes Go client.
func (*Tester) LoadConfig ¶ added in v0.5.0
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.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package alb implements ALB plugin that installs 2048.
|
Package alb implements ALB plugin that installs 2048. |
Package elb implements ELB utilities.
|
Package elb implements ELB utilities. |
example shows how to use "eks" package.
|
example shows how to use "eks" package. |
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 jobs creates example Job objects in Kubernetes.
|
Package jobs 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 nlb implements NLB plugin.
|
Package nlb implements NLB plugin. |
Package secrets implements Secrets plugin.
|
Package secrets implements Secrets plugin. |