apis

package
v1.9.5 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// K3sTokenPath is the path to k3s token
	K3sTokenPath = "/var/lib/rancher/k3s/server/token"
	// K3sKubeConfigLocation is default path of k3s kubeconfig
	K3sKubeConfigLocation = "/etc/rancher/k3s/k3s.yaml"
	// K3sExternalKubeConfigLocation is where to generate kubeconfig for external access
	K3sExternalKubeConfigLocation = "/etc/rancher/k3s/k3s-external.yaml"
	// VelaLinkPos is path to save vela symlink in linux/macos
	VelaLinkPos = "/usr/local/bin/vela"
	// VelaDDockerNetwork is docker network for k3d cluster when `velad install`
	// all cluster will be created in this network, so they can communicate with each other
	VelaDDockerNetwork = "k3d-velad"

	// K3dImageK3s is k3s image tag
	K3dImageK3s = "rancher/k3s:v1.27.2-k3s1"
	// K3dImageTools is k3d tools image tag
	K3dImageTools = "ghcr.io/k3d-io/k3d-tools:latest"
	// K3dImageProxy is k3d proxy image tag
	K3dImageProxy = "ghcr.io/k3d-io/k3d-proxy:5.5.1"

	// KubeVelaHelmRelease is helm release name for vela
	KubeVelaHelmRelease = "kubevela"
	// StatusVelaNotInstalled is status for kubevela helm chart not installed
	StatusVelaNotInstalled = "not installed"
	// StatusVelaDeployed is success status for kubevela helm chart deployed
	StatusVelaDeployed = "deployed"

	// DefaultVelaDClusterName is default cluster name for velad install/token/kubeconfig/uninstall
	DefaultVelaDClusterName = "default"

	// GoosLinux is os.GOOS linux string
	GoosLinux = "linux"
	// GoosDarwin is os.GOOS darwin string
	GoosDarwin = "darwin"
	// GoosWindows is os.GOOS windows string
	GoosWindows = "windows"
)

Functions

This section is empty.

Types

type ClusterStatus

type ClusterStatus struct {
	// K3dImages only works for non-linux
	K3dImages
	K3s K3sStatus
	K3d K3dStatus
}

ClusterStatus defines the status of cluster, including k3s/k3d

type Context added in v1.3.6

type Context struct {
	DryRun        bool
	IOStreams     cmdutil.IOStreams
	CommonArgs    common.Args
	VelaChartPath string
}

Context keep some context for install progress

type ControlPlaneStatus

type ControlPlaneStatus struct {
	Clusters []ClusterStatus
	Vela     VelaStatus
}

ControlPlaneStatus defines the status of control plane

type InstallArgs

type InstallArgs struct {
	BindIP       string
	NodePublicIP string
	MasterIP     string
	DBEndpoint   string
	ClusterOnly  bool
	Token        string
	Controllers  string
	// InstallArgs is parameters passed to vela install command
	InstallArgs cli.InstallArgs
	Name        string
	DryRun      bool
	Worker      bool
}

InstallArgs defines arguments for velad install command

func (*InstallArgs) Validate

func (a *InstallArgs) Validate() error

Validate validates the `install` argument

type JoinArgs added in v1.7.5

type JoinArgs struct {
	Token    string
	Name     string
	MasterIP string
	DryRun   bool
}

JoinArgs defines arguments for velad join command

func (JoinArgs) Validate added in v1.7.5

func (a JoinArgs) Validate() error

Validate validates the join arguments

type K3dContainer

type K3dContainer struct {
	Name       string
	Running    bool
	VelaStatus string
	Reason     string
}

K3dContainer defines the status of one k3d cluster

type K3dImages

type K3dImages struct {
	K3s      bool
	K3dTools bool
	K3dProxy bool
	Reason   string
}

K3dImages defines the status of k3d images

type K3dStatus

type K3dStatus struct {
	Reason       string
	K3dContainer []K3dContainer
}

K3dStatus defines the status of k3d

type K3sStatus

type K3sStatus struct {
	K3sBinary        bool
	K3sServiceStatus string
	VelaStatus       string
	Reason           string
}

K3sStatus defines the status of k3s

type KubeconfigArgs

type KubeconfigArgs struct {
	Internal bool
	External bool
	Host     bool
	Name     string
}

KubeconfigArgs defines arguments for velad kubeconfig command

func (KubeconfigArgs) Validate

func (a KubeconfigArgs) Validate() error

Validate validates the `kubeconfig` argument

type LoadBalancerArgs

type LoadBalancerArgs struct {
	Hosts         []string
	Configuration string
	PortHTTP      int
	PortHTTPS     int
}

LoadBalancerArgs defines arguments for load balancer command

type TokenArgs

type TokenArgs struct {
	Name string
}

TokenArgs defines arguments for velad token command

func (TokenArgs) Validate

func (a TokenArgs) Validate() error

Validate validates the token arguments

type UninstallArgs

type UninstallArgs struct {
	Name string
}

UninstallArgs defines arguments for velad uninstall command

func (UninstallArgs) Validate

func (a UninstallArgs) Validate() error

Validate validates the uninstall arguments

type VelaStatus

type VelaStatus struct {
	VelaUXAddonDirPresent bool
	VelaUXAddonDirPath    string
	VelaCLIInstalled      bool
	VelaCLIPath           string
	Reason                string
}

VelaStatus is the status of vela in host machine

Jump to

Keyboard shortcuts

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