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 GetDockerLoginToken(region 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 NewECRClient(region string) (*ecr.ECR, error)
- func NewEksClient(region string) (*eks.EKS, error)
- func TagExistsInRepo(token, repoDomain, repoPath, tag string) (bool, error)
- type CredentialsError
- type ECRManifestFetchError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetClusterArnByNameAndRegion ¶
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 GetDockerLoginToken ¶ added in v0.7.7
GetDockerLoginToken retrieves an authorization token that can be used to access ECR via the docker APIs. The return token can directly be used as a HTTP authorization header for basic auth.
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.
func NewECRClient ¶ added in v0.7.7
NewECRClient creates an AWS SDK client to access ECR API.
func NewEksClient ¶
NewEksClient creates an EKS client.
func TagExistsInRepo ¶ added in v0.7.7
TagExistsInRepo queries the ECR repository docker API to see if the given tag exists for the given ECR repository.
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
type ECRManifestFetchError ¶ added in v0.7.7
type ECRManifestFetchError struct {
// contains filtered or unexported fields
}
ECRManifestFetchError is an error that occurs when retrieving information about a given tag in an ECR repository.
func (ECRManifestFetchError) Error ¶ added in v0.7.7
func (err ECRManifestFetchError) Error() string