Documentation ¶
Index ¶
- Constants
- Variables
- func CheckErr(err error, explain ...string)
- func CreatCR()
- func CreatVarsCM(subStr string)
- func CreatVarsCMFile(subStr string) string
- func CreateClusterByApply(installYamlPath string)
- func DoCmd(cmd exec.Cmd) (bytes.Buffer, bytes.Buffer)
- func DoErrCmd(cmd exec.Cmd) (bytes.Buffer, bytes.Buffer)
- func DoSonoBuoyCheck(masterSSH string)
- func FlagParse()
- func GetKuBeanPath() string
- func NewDoCmd(cmd string, args ...string) (bytes.Buffer, bytes.Buffer)
- func NodePingPod(sshNode, podIP string)
- func PodPingPod(node, podFromNs, podFromName, podToIP string)
- func RemoteSSHCmdArray(subCmd []string) []string
- func SaveKubeConf(kindConfig *restclient.Config, clusterName, configToSavePath string)
- func SvcCurl(ip string, port int32, checkString string, timeTotalSecond time.Duration, ...)
- func UpdateBackoffLimit(content int, filePath string)
- func UpdateOpsYml(content string, filePath string)
- func WaitKubeanJobPodToSuccess(kubeClient *kubernetes.Clientset, podNamespace, podName, expectedStatus string)
- func WaitPodBeRunning(kubeClient *kubernetes.Clientset, namespace, podName string, ...) *v1.Pod
- func WaitPodSInKubeSystemBeRunning(kubeClient *kubernetes.Clientset, timeTotalSecond time.Duration, ...)
- type KubeanOpsYml
Constants ¶
View Source
const ( PodStatusSucceeded = "Succeeded" PodStatusFailed = "Failed" PodStatusRunning = "Running" )
k8s const
View Source
const ( KubeanNamespace = "kubean-system" KubeSystemNamespace = "kube-system" DefaultNamespace = "default" TestClusterName = "cluster1" LocalKubeConfigPath = "cluster1-config" )
kubean_const
Variables ¶
View Source
var ClusterOperationName string
View Source
var Kubeconfig string
View Source
var Vmipaddr string
View Source
var Vmipaddr2 string
Functions ¶
func CreatVarsCM ¶ added in v0.3.0
func CreatVarsCM(subStr string)
func CreatVarsCMFile ¶ added in v0.3.0
func CreateClusterByApply ¶ added in v0.4.0
func CreateClusterByApply(installYamlPath string)
func DoSonoBuoyCheck ¶ added in v0.3.4
func DoSonoBuoyCheck(masterSSH string)
func GetKuBeanPath ¶
func GetKuBeanPath() string
func NodePingPod ¶ added in v0.3.4
func NodePingPod(sshNode, podIP string)
func PodPingPod ¶ added in v0.3.4
func PodPingPod(node, podFromNs, podFromName, podToIP string)
func RemoteSSHCmdArray ¶ added in v0.2.6
func SaveKubeConf ¶ added in v0.3.4
func SaveKubeConf(kindConfig *restclient.Config, clusterName, configToSavePath string)
func UpdateBackoffLimit ¶ added in v0.2.1
func UpdateOpsYml ¶
func WaitKubeanJobPodToSuccess ¶ added in v0.3.4
func WaitKubeanJobPodToSuccess(kubeClient *kubernetes.Clientset, podNamespace, podName, expectedStatus string)
func WaitPodBeRunning ¶ added in v0.3.4
func WaitPodSInKubeSystemBeRunning ¶ added in v0.3.4
Types ¶
type KubeanOpsYml ¶
type KubeanOpsYml struct { ApiVersion string `yaml:"apiVersion"` Kind string `yaml:"kind"` Metadata struct { Name string `yaml:"name"` Labels struct { ClusterName string `yaml:"clusterName"` } } Spec struct { Cluster string `yaml:"cluster"` Image string `yaml:"image"` BackoffLimit int `yaml:"backoffLimit"` ActionType string `yaml:"actionType"` Action string `yaml:"action"` } }
Click to show internal directories.
Click to hide internal directories.