pkg

package
v1.3.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//go:embed static/k3s
	K3sDirectory embed.FS

	//go:embed static/vela/images
	VelaImages embed.FS
	//go:embed static/vela/charts
	VelaChart embed.FS
)

Functions

func Cleanup

func Cleanup() error

func CloseQuietly

func CloseQuietly(d io.Closer)

CloseQuietly closes `io.Closer` quietly. Very handy and helpful for code quality too.

func GenKubeconfig

func GenKubeconfig(bindIP string) error

GenKubeconfig will generate kubeconfig for remote access. This won't modify the origin kubeconfig generated by k3s

func HaveController

func HaveController(controllers string, c string) bool

func IfDeployByPod

func IfDeployByPod(controllers string) bool

func LoadVelaImages

func LoadVelaImages() error

func NewInstallCmd

func NewInstallCmd(c common.Args, ioStreams cmdutil.IOStreams) *cobra.Command

NewInstallCmd create install cmd

func NewKubeConfigCmd

func NewKubeConfigCmd() *cobra.Command

NewKubeConfigCmd create kubeconfig command for ctrl-plane

func NewTokenCmd

func NewTokenCmd() *cobra.Command

func NewUninstallCmd

func NewUninstallCmd() *cobra.Command

NewUninstallCmd create uninstall command

func NewVeladCommand

func NewVeladCommand(c common.Args, ioStreams cmdutil.IOStreams) *cobra.Command

NewVeladCommand create velad command

func NewVersionCmd

func NewVersionCmd() *cobra.Command

func PrepareK3sBin

func PrepareK3sBin() error

PrepareK3sBin prepare k3s bin

func PrepareK3sImages

func PrepareK3sImages() error

PrepareK3sImages Write embed images

func PrepareK3sScript

func PrepareK3sScript() (string, error)

PrepareK3sScript Write k3s install script to local

func PrepareVelaChart

func PrepareVelaChart() (string, error)

func SaveToTemp

func SaveToTemp(file fs.File, format string) (string, error)

SaveToTemp helps save an embedded file into a temporary file

func SetupK3s

func SetupK3s(cArgs CtrlPlaneArgs) error

func TransArgsToString

func TransArgsToString(args cli.InstallArgs) []string

func WarnSaveToken

func WarnSaveToken(token string)

Types

type CtrlPlaneArgs

type CtrlPlaneArgs struct {
	BindIP      string
	DBEndpoint  string
	IsStart     bool
	Token       string
	Controllers string
	// InstallArgs is parameters passed to vela install command
	InstallArgs cli.InstallArgs
}

CtrlPlaneArgs defines arguments for ctrl-plane command

Jump to

Keyboard shortcuts

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