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 ¶
- func GetClusterArnByNameAndRegion(eksClusterName string, region string) (string, error)
- func GetClusterByArn(eksClusterArn string) (*eks.Cluster, error)
- func GetClusterNameFromArn(eksClusterArnString string) (string, error)
- func GetKubernetesTokenForCluster(clusterID string) (*token.Token, string, error)
- func GetRegionFromArn(eksClusterArnString string) (string, error)
- func NewAuthenticatedSession(region string) (*session.Session, error)
- func NewEksClient(region string) (*eks.EKS, error)
- type CredentialsError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetClusterArnByNameAndRegion ¶ added in v0.6.5
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 ¶
GetClusterByArn returns the EKS Cluster object that corresponds to the given ARN.
func GetClusterNameFromArn ¶
GetClusterNameFromArn extracts the EKS cluster name given the ARN for the cluster.
func GetRegionFromArn ¶
GetRegionFromArn extracts the AWS region that the EKS cluster is in from the ARN of the EKS cluster.
func NewAuthenticatedSession ¶
NewAuthenticatedSession gets an AWS Session, checking that the user has credentials properly configured in their environment.
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