Documentation ¶
Index ¶
- Variables
- func Cleanup() error
- func CloseQuietly(d io.Closer)
- func EditGatewayDefinition() error
- func Exec(ctx context.Context, cli *client.Client, containerID string, command []string) (types.IDResponse, error)
- func GetCLIInstallPath() string
- func GetClient() (client.Client, error)
- func GetDefaultVelaDKubeconfigPath() string
- func GetKubeconfigDir() string
- func GetTmpDir() (string, error)
- func GetTokenFromCluster(ctx context.Context, clusterName string) (string, error)
- func InfoBytes(b []byte)
- func IsVelaCommand(s string) bool
- func NewActionConfig(config *rest.Config, showDetail bool) (*action.Configuration, error)
- func PrintGuide(ctx *apis.Context, args apis.InstallArgs)
- func RemoveNetworkProxyEnv()
- func SaveToTemp(content io.Reader, format string) (string, error)
- func SetDefaultKubeConfigEnv() error
- func TransArgsToString(args cli.InstallArgs) []string
- func UnsupportedOS(os string)
- func WarnSaveToken(token string, clusterName string)
- type ExecResult
- type VeladWriter
Constants ¶
This section is empty.
Variables ¶
var ( // Info print message Info func(a ...interface{}) // Infof print message with format Infof func(format string, a ...interface{}) // InfoP print message with padding InfoP func(padding int, a ...interface{}) // Errf print error with format Errf func(format string, a ...interface{}) )
Functions ¶
func CloseQuietly ¶
CloseQuietly closes `io.Closer` quietly. Very handy and helpful for code quality too.
func EditGatewayDefinition ¶ added in v1.7.4
func EditGatewayDefinition() error
EditGatewayDefinition edits the gateway trait definition. In VelaD, we use Traefik instead of Nginx.
func Exec ¶
func Exec(ctx context.Context, cli *client.Client, containerID string, command []string) (types.IDResponse, error)
Exec create an exec command and return its ID
func GetCLIInstallPath ¶ added in v1.3.4
func GetCLIInstallPath() string
GetCLIInstallPath get vela CLI install path
func GetDefaultVelaDKubeconfigPath ¶
func GetDefaultVelaDKubeconfigPath() string
GetDefaultVelaDKubeconfigPath returns the default kubeconfig path for VelaD
func GetKubeconfigDir ¶
func GetKubeconfigDir() string
GetKubeconfigDir returns the kubeconfig directory.
func GetTokenFromCluster ¶
GetTokenFromCluster returns the token for k3d cluster
func NewActionConfig ¶
NewActionConfig returns a new helm action config
func PrintGuide ¶
func PrintGuide(ctx *apis.Context, args apis.InstallArgs)
PrintGuide will print guide for user.
func RemoveNetworkProxyEnv ¶ added in v1.5.0
func RemoveNetworkProxyEnv()
RemoveNetworkProxyEnv remove network proxy environment vars in shell
func SaveToTemp ¶
SaveToTemp helps save an embedded file into a temporary file
func SetDefaultKubeConfigEnv ¶
func SetDefaultKubeConfigEnv() error
SetDefaultKubeConfigEnv helps set KUBECONFIG to the default location
func TransArgsToString ¶
func TransArgsToString(args cli.InstallArgs) []string
TransArgsToString converts args to string array, which helps to pass args to vela install command
func UnsupportedOS ¶
func UnsupportedOS(os string)
UnsupportedOS will panic with a message about the unsupported OS
func WarnSaveToken ¶
WarnSaveToken warns user to save token for cluster
Types ¶
type ExecResult ¶
ExecResult is the result of Docker Exec
func InspectExecResp ¶
InspectExecResp helps turns types.IDResponse into a ExecResult
type VeladWriter ¶
VeladWriter will change "vela addon enable" hint and print else as it is.