tools

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Vik8sApiServer = iota + 1
	Vik8sCalicoETCD
)

Variables

This section is empty.

Functions

func AddNodeLabel

func AddNodeLabel(master *ssh.Node, labels map[string]string, nodes ...string)

func AddressRange

func AddressRange(cidr string) (net.IP, net.IP)

func Assert added in v0.5.0

func Assert(name string, data interface{}, funcs ...template.FuncMap) ([]byte, error)

Assert Search assert file. First, it will search user local home path $HOME/.vik8s/$cloud/$name. if not found, then the default name file will return

func AutoLabelNodes

func AutoLabelNodes(master *ssh.Node, labels map[string]string, nodeNames ...string)

func GetVip

func GetVip(cidr string, vipFor VipFor) string

func RemoveNodeLabel

func RemoveNodeLabel(master *ssh.Node, label string, nodes ...string)

func ScpAndApplyAssert added in v0.5.2

func ScpAndApplyAssert(node *ssh.Node, name string, data interface{}, funcs ...template.FuncMap) error

func SearchLabelNode

func SearchLabelNode(master *ssh.Node, labels map[string]string) []string

func SelectNodeNames

func SelectNodeNames(nodes []*ssh.Node, selectNodes []string) []string

根据提供的IP或者hostname选择节点的hostname

func Template

func Template(content string, data interface{}, funcs ...template.FuncMap) ([]byte, error)

Types

type VipFor

type VipFor int

Jump to

Keyboard shortcuts

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