session

package
v2.1.104 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultRegion = "us-west-2"

Variables

This section is empty.

Functions

func GetClusterNameAndRegionFromAWS

func GetClusterNameAndRegionFromAWS(profileOption string, regionOption string, kubeEndpoint string) (string, string, error)

GetClusterNameAndRegionFromAWS uses the AWS SDK to parse through each EKS cluster until it finds one that matches the endpoint in the kubeconfig. From there it will retrieve the cluster name

func GetCurrentlyConnectedRegionAndClusterName

func GetCurrentlyConnectedRegionAndClusterName() (string, string, error)

GetCurrentlyConnectedRegionAndClusterName gets the current context for the connected cluster and parses it to extract both the Region and the ClusterName

func NewAwsSession

func NewAwsSession(profileOption string, regionOption string) (*session.Session, error)

func NewAwsSessionWithoutOptions

func NewAwsSessionWithoutOptions() (*session.Session, error)

func ParseContext

func ParseContext(context string) (string, string, error)

ParseContext parses the EKS cluster context to extract the cluster name and the region

func ResolveRegion

func ResolveRegion(profileOption string, regionOption string) (string, error)

func ResolveRegionWithoutOptions

func ResolveRegionWithoutOptions() (string, error)

func UserHomeDir

func UserHomeDir() string

UserHomeDir returns the home directory for the user the process is running under. This is a copy of shareddefaults.UserHomeDir in the internal AWS package. We can't user user.Current().HomeDir as we want to override this during testing. :-|

Types

This section is empty.

Jump to

Keyboard shortcuts

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