Documentation
¶
Index ¶
- Variables
- func Cleanup() error
- func CloseQuietly(d io.Closer)
- func GenKubeconfig(bindIP string) error
- func HaveController(controllers string, c string) bool
- func IfDeployByPod(controllers string) bool
- func LinkToVela()
- func LoadVelaImages() error
- func NewInstallCmd(c common.Args, ioStreams cmdutil.IOStreams) *cobra.Command
- func NewKubeConfigCmd() *cobra.Command
- func NewTokenCmd() *cobra.Command
- func NewUninstallCmd() *cobra.Command
- func NewVelaCmd() *cobra.Command
- func NewVeladCommand() *cobra.Command
- func NewVersionCmd() *cobra.Command
- func PrepareK3sBin() error
- func PrepareK3sImages() error
- func PrepareK3sScript() (string, error)
- func PrepareVelaChart() (string, error)
- func SaveToTemp(file fs.File, format string) (string, error)
- func SetupK3s(cArgs CtrlPlaneArgs) error
- func TransArgsToString(args cli.InstallArgs) []string
- func WarnSaveToken(token string)
- type App
- type CtrlPlaneArgs
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 )
View Source
var (
VelaLinkPos = "/usr/local/bin/vela"
)
Functions ¶
func CloseQuietly ¶
CloseQuietly closes `io.Closer` quietly. Very handy and helpful for code quality too.
func GenKubeconfig ¶
GenKubeconfig will generate kubeconfig for remote access. This won't modify the origin kubeconfig generated by k3s
func HaveController ¶
func IfDeployByPod ¶
func LoadVelaImages ¶
func LoadVelaImages() error
func NewInstallCmd ¶
NewInstallCmd create install cmd
func NewKubeConfigCmd ¶
NewKubeConfigCmd create kubeconfig command for ctrl-plane
func NewTokenCmd ¶
func NewUninstallCmd ¶
NewUninstallCmd create uninstall command
func NewVelaCmd ¶
func NewVersionCmd ¶
func PrepareK3sScript ¶
PrepareK3sScript Write k3s install script to local
func PrepareVelaChart ¶
func SaveToTemp ¶
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 App ¶
type App struct {
// contains filtered or unexported fields
}
App is entry of all CLI, created by NewApp
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
Click to show internal directories.
Click to hide internal directories.