Documentation ¶
Index ¶
- Constants
- Variables
- func CheckErr(err error, explain ...string)
- func CreatVarsCM(subStr string)
- func CreatVarsCMFile(subStr string) string
- func CreateDaemonSet(daemonsetName, namespace, imageName string, client *kubernetes.Clientset) *appsv1.DaemonSet
- func CreatePod(podName, namespace, nodeName, image, kubeconfigFile string)
- func DoCmd(cmd exec.Cmd) (bytes.Buffer, bytes.Buffer)
- func DoErrCmd(cmd exec.Cmd) (bytes.Buffer, bytes.Buffer)
- func DoSonoBuoyCheckByPasswd(password, masterSSH string)
- func ExposeServiceToDaemonset(serviceName, serviceNamespace, svcType, sourceSelector string, ...) *corev1.Service
- func FlagParse()
- func GenerateClusterClient(localKubeConfigPath string) *kubernetes.Clientset
- func GetKuBeanPath() string
- func NewDoCmd(cmd string, args ...string) (bytes.Buffer, bytes.Buffer)
- func NewDoCmdSoft(cmd string, args ...string) (bytes.Buffer, error)
- func NodePingPodByPasswd(password, sshNode, podIP string)
- func OperateClusterByYaml(clusterInstallYamlsPath, operatorName string, kindConfig *restclient.Config, ...)
- func PodPingPodByPasswd(password, node, podFromNs, podFromName, podToIP string)
- func RemoteSSHCmdArray(subCmd []string) []string
- func RemoteSSHCmdArrayByPasswd(password string, subCmd []string) []string
- func SaveKubeConf(kindConfig *restclient.Config, clusterName, configToSavePath string)
- func SvcCurl(curIP string, curPort 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, ...) *corev1.Pod
- func WaitPodSInKubeSystemBeRunning(kubeClient *kubernetes.Clientset, timeTotalSecond time.Duration, ...)
- type KubeanOpsYml
- type OfflineConfig
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
View Source
const ( OriginK8Version = "v1.29.5" UpgradeK8Version_Y = "v1.30.0" UpgradeK8Version_Z = "v1.30.5" NginxAlpha = "release-ci.daocloud.io/kubean/nginx:alpine" E2eInstallClusterYamlFolder = "e2e-install-cluster" )
Variables ¶
View Source
var Arch string
View Source
var ClusterOperationName string
View Source
var IsOffline string
View Source
var Kubeconfig string
View Source
var OfflineConfigStr string
View Source
var OtherLabel string
View Source
var Vipadd string
View Source
var VmPassword string
View Source
var Vmipaddr string
View Source
var Vmipaddr2 string
View Source
var Vmipaddr3 string
Functions ¶
func CreatVarsCM ¶ added in v0.3.0
func CreatVarsCM(subStr string)
func CreatVarsCMFile ¶ added in v0.3.0
func CreateDaemonSet ¶ added in v0.5.1
func CreateDaemonSet(daemonsetName, namespace, imageName string, client *kubernetes.Clientset) *appsv1.DaemonSet
func CreatePod ¶ added in v0.4.2
func CreatePod(podName, namespace, nodeName, image, kubeconfigFile string)
func DoSonoBuoyCheckByPasswd ¶ added in v0.4.2
func DoSonoBuoyCheckByPasswd(password, masterSSH string)
func ExposeServiceToDaemonset ¶ added in v0.5.1
func ExposeServiceToDaemonset(serviceName, serviceNamespace, svcType, sourceSelector string, clientSet *kubernetes.Clientset) *corev1.Service
func GenerateClusterClient ¶ added in v0.4.10
func GenerateClusterClient(localKubeConfigPath string) *kubernetes.Clientset
func GetKuBeanPath ¶
func GetKuBeanPath() string
func NewDoCmdSoft ¶ added in v0.4.10
func NodePingPodByPasswd ¶ added in v0.4.2
func NodePingPodByPasswd(password, sshNode, podIP string)
func OperateClusterByYaml ¶ added in v0.4.2
func OperateClusterByYaml(clusterInstallYamlsPath, operatorName string, kindConfig *restclient.Config, args ...string)
func PodPingPodByPasswd ¶ added in v0.4.2
func PodPingPodByPasswd(password, node, podFromNs, podFromName, podToIP string)
func RemoteSSHCmdArray ¶ added in v0.2.6
func RemoteSSHCmdArrayByPasswd ¶ added in v0.4.2
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"` } }
type OfflineConfig ¶ added in v0.4.1
type OfflineConfig struct { Ip string `yaml:"ip"` RegistryAddr string `yaml:"registry_addr"` MinioAddr string `yaml:"minio_addr"` NginxImageAMD64 string `yaml:"nginx_image_amd64"` NginxImageARM64 string `yaml:"nginx_image_arm64"` }
func InitOfflineConfig ¶ added in v0.4.1
func InitOfflineConfig() OfflineConfig
Click to show internal directories.
Click to hide internal directories.