utils

package
v0.0.0-...-b3ee267 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAllCommands

func CheckAllCommands(kubeconfigPath string, isContextSet bool, contextName string, env []string) error

CheckAllCommands check version of kubectl, and if it can be used with either of the authenticator commands; most importantly it validates if kubeclt can use kubeconfig we've created for it

func CheckKubectlVersion

func CheckKubectlVersion(env []string) error

CheckKubectlVersion checks version of kubectl

func ClusterName

func ClusterName(a, b string) string

ClusterName generates a name string when a and b are empty strings. If either a or b are non-empty, it returns whichever is non-empty. If neither a nor b are empty, it returns empty name, to indicate ambiguous usage.

func DetectAuthenticator

func DetectAuthenticator() string

DetectAuthenticator finds the authenticator command, it defaults to legacy command when neither are found

func ExpandPath

func ExpandPath(p string) string

ExpandPath expands path with ~ notation

func FileExists

func FileExists(path string) (bool, error)

FileExists checks to see if a file exists.

func IsGPUInstanceType

func IsGPUInstanceType(instanceType string) bool

IsGPUInstanceType returns tru of the instance type is GPU optimized.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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