Documentation ¶
Index ¶
- Constants
- func GetClusterNameAndRegionFromAWS(profileOption string, regionOption string, kubeEndpoint string) (string, string, error)
- func GetCurrentlyConnectedRegionAndClusterName() (string, string, error)
- func NewAwsSession(profileOption string, regionOption string) (*session.Session, error)
- func NewAwsSessionWithoutOptions() (*session.Session, error)
- func ParseContext(context string) (string, string, error)
- func ResolveRegion(profileOption string, regionOption string) (string, error)
- func ResolveRegionWithoutOptions() (string, error)
- func UserHomeDir() string
Constants ¶
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 ¶
GetCurrentlyConnectedRegionAndClusterName gets the current context for the connected cluster and parses it to extract both the Region and the ClusterName
func NewAwsSession ¶
func ParseContext ¶
ParseContext parses the EKS cluster context to extract the cluster name and the region
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.