eksawshelper

package
v0.6.16 Latest Latest
Warning

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

Go to latest
Published: May 13, 2021 License: Apache-2.0 Imports: 8 Imported by: 3

Documentation

Overview

eksawshelper contains helper functions for accessing the AWS EKS API directly. This package exists to break cyclic dependencies between eks and kubectl.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClusterArnByNameAndRegion added in v0.6.5

func GetClusterArnByNameAndRegion(eksClusterName string, region string) (string, error)

GetClusterArnByNameAndRegion looks up the EKS Cluster ARN using the region and EKS Cluster Name. For instances where we don't have the EKS Cluster ARN, such as within the Fargate Profile resource.

func GetClusterByArn

func GetClusterByArn(eksClusterArn string) (*eks.Cluster, error)

GetClusterByArn returns the EKS Cluster object that corresponds to the given ARN.

func GetClusterNameFromArn

func GetClusterNameFromArn(eksClusterArnString string) (string, error)

GetClusterNameFromArn extracts the EKS cluster name given the ARN for the cluster.

func GetKubernetesTokenForCluster

func GetKubernetesTokenForCluster(clusterID string) (*token.Token, string, error)

func GetRegionFromArn

func GetRegionFromArn(eksClusterArnString string) (string, error)

GetRegionFromArn extracts the AWS region that the EKS cluster is in from the ARN of the EKS cluster.

func NewAuthenticatedSession

func NewAuthenticatedSession(region string) (*session.Session, error)

NewAuthenticatedSession gets an AWS Session, checking that the user has credentials properly configured in their environment.

func NewEksClient

func NewEksClient(region string) (*eks.EKS, error)

NewEksClient creates an EKS client.

Types

type CredentialsError

type CredentialsError struct {
	UnderlyingErr error
}

CredentialsError is an error that occurs because AWS credentials can't be found.

func (CredentialsError) Error

func (err CredentialsError) Error() string

Jump to

Keyboard shortcuts

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