common

package
v0.4.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	BindPrefix         = "autok3s.providers.%s.%s"
	ConfigFile         = "config.yaml"
	StateFile          = ".state"
	KubeCfgFile        = ".kube/config"
	KubeCfgTempName    = "autok3s-temp"
	K3sManifestsDir    = "/var/lib/rancher/k3s/server/manifests"
	MasterInstanceName = "autok3s.%s.master"
	WorkerInstanceName = "autok3s.%s.worker"
	TagClusterPrefix   = "autok3s-"
	StatusRunning      = "Running"
	StatusStopped      = "Stopped"
	StatusCreating     = "Creating"
	StatusJoin         = "Join"
	StatusFailed       = "Failed"
	UsageInfoTitle     = "=========================== Prompt Info ==========================="
	UsageContext       = "Use 'autok3s kubectl config use-context %s'"
	UsagePods          = "Use 'autok3s kubectl get pods -A' get POD status`"
)

Variables

View Source
var (
	Debug   = false
	CfgPath = utils.UserHome() + "/.autok3s"
	Backoff = wait.Backoff{
		Duration: 30 * time.Second,
		Factor:   1,
		Steps:    5,
	} // retry 5 times, total 120 seconds.
)

Functions

func GetClusterPath added in v0.3.0

func GetClusterPath(clusterName, providerName string) string

func GetClusterStatePath

func GetClusterStatePath() string

func GetDefaultSSHKeyPath added in v0.3.0

func GetDefaultSSHKeyPath(clusterName, providerName string) string

func GetLogFile added in v0.4.0

func GetLogFile(name string) (logFile *os.File, err error)

func GetLogPath added in v0.4.0

func GetLogPath() string

func NewLogger

func NewLogger(debug bool, w *os.File) *logrus.Logger

Types

This section is empty.

Jump to

Keyboard shortcuts

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