Documentation
¶
Index ¶
- Constants
- Variables
- func AddHostResolve(doman, ip string) error
- func ApplyYaml(data string, name string) error
- func ApplyYamlCommon(data, authf, tmp string) error
- func DefaultImage(id string) string
- func FileExist(file string) (bool, error)
- func GetDNSIP(subnet string, index int) (net.IP, error)
- func Kubectl(args ...string) ([]string, error)
- func NewConfig(cid, ip string, ca, crt, key []byte) clientcmdapi.Config
- func NodeArray(ns map[string]*corev1.Node) []string
- func NodeIsMaster(node *corev1.Node) bool
- func PrettyJson(obj interface{}) string
- func PrettyYaml(obj interface{}) string
- func RandomID(strlen int) string
- func RenderConfig(tplName string, tpl string, data interface{}) (string, error)
- func UnknownCondition(condition []corev1.NodeCondition) bool
- func Write(config clientcmdapi.Config) ([]byte, error)
- type Errors
- type RenderParam
Constants ¶
View Source
const ( BootTypeLocal = "local" BootTypeRecover = "recover" BootTypeCoord = "coordinator" BootTypeJoin = "manager" )
View Source
const NODE_MASTER_LABEL = "host-role.kubernetes.io/master"
Variables ¶
View Source
var ( CA = "ca" ETCD_PEER = "etcd.peer" ETCD_CLIENT = "etcd.client" )
View Source
var AUTH_FILE = "/etc/kubernetes/admin.conf"
View Source
var KubeConfigTpl = `` /* 473-byte string literal not displayed */
Functions ¶
func AddHostResolve ¶
func ApplyYaml ¶
ApplyYaml run kubectl --kubeconfig /etc/kubernetes/admin.local apply -f /tmp/cfg.yaml NOT concurrentable
func ApplyYamlCommon ¶
func DefaultImage ¶
func NodeIsMaster ¶
func PrettyJson ¶
func PrettyJson(obj interface{}) string
func PrettyYaml ¶
func PrettyYaml(obj interface{}) string
func RenderConfig ¶
func UnknownCondition ¶
func UnknownCondition(condition []corev1.NodeCondition) bool
Types ¶
Click to show internal directories.
Click to hide internal directories.