# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Functions
AddDirToPath add a dir to the PATH environment variable.
AddKlogFlags adds flags from k8s.io/klog marks the flags as hidden to avoid showing them in help.
No description provided by the author
BuildAddonReleaseName returns the release name of addon, its f.
No description provided by the author
No description provided by the author
No description provided by the author
BuildLabelSelectorByNames builds the label selector by instance names, the label selector is like "instance-key in (name1, name2)".
BuildNodeAffinity build node affinity from node labels.
BuildPodAntiAffinity build pod anti affinity from topology keys.
BuildPodAntiAffinityForComponent build pod anti affinity from topology keys and tenancy for cluster.
No description provided by the author
BuildSemverVersion build semver version which starts with "v", such as "v1.0.0".
BuildTolerations toleration format: key=value:effect or key:effect,.
CheckEmpty checks if string is empty, if yes, returns <none> for displaying.
CheckErr prints a user-friendly error to STDERR and exits with a non-zero exit code.
CloneGitRepo clones git repo to local path.
CloseQuietly closes `io.Closer` quietly.
CombineLabels combines labels into a string.
CompGetFromTemplateWithLabels executes a Get operation using the specified template and args and returns the results which begin with `toComplete` and have the specified labels.
CompGetResourceWithLabels gets the list of the resource specified which begin with `toComplete` and have the specified labels.
ComponentConfigSpecs returns configSpecs used by the component.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
EnsureCloned clones into the destination path, otherwise returns no error.
EnsureUpdated ensures the destination path exists and is up to date.
ExecGitCommand executes a git command in the given directory.
No description provided by the author
FileExists check if a file exists, and return an error otherwise.
GetCliAddonDir returns kbcli addon index dir.
GetCliHomeDir returns kbcli home dir.
GetCliLogDir returns kbcli log dir.
GetClusterDefByName gets the ClusterDefinition object by the name.
No description provided by the author
GetCompDefByName gets the ComponentDefinition object by the name.
GetComponentDefByCompName gets the ComponentDefinition object by the component name.
No description provided by the author
GetComponentsFromResource returns name of component.
No description provided by the author
No description provided by the author
GetDataProtectionDeploy gets DataProtection deployments, now one kubernetes cluster only support one DataProtection.
No description provided by the author
No description provided by the author
GetDockerVersion get Docker Version.
No description provided by the author
No description provided by the author
No description provided by the author
GetHelmChartRepoURL gets helm chart repo, chooses one from GitHub and GitLab based on the IP location.
GetHumanReadableDuration returns a succinct representation of the provided startTime and endTime with limited precision for consumption by humans.
GetImageRegistryByProvider returns the image registry based on the k8s provider, for different providers, we will use different image registry.
No description provided by the author
GetK8SClientObject gets the client object of k8s, obj must be a struct pointer so that obj can be updated with the response.
GetK8sProvider returns the k8s provider.
GetK8sProviderFromNodes get k8s provider from node.spec.providerID.
GetK8sProviderFromVersion gets k8s provider from field GitVersion in cluster server version.
No description provided by the author
GetK8sVersion gets k8s server version.
GetKBDeploys gets KubeBlocks deployments, now one kubernetes cluster only support one KubeBlocks.
GetKubeBlocksCRDsURL gets the crds url by IP region.
No description provided by the author
No description provided by the author
GetKubeBlocksNamespace gets namespace of KubeBlocks installation, infer namespace from helm secrets.
GetKubeBlocksNamespaceByDynamic gets namespace of KubeBlocks installation, infer namespace from helm secrets.
GetKubeBlocksVersion gets KubeBlocks version.
GetKubeconfigDir returns the kubeconfig directory.
No description provided by the author
GetNodeByName chooses node by name from a node array.
No description provided by the author
No description provided by the author
GetResourceObjectFromGVR queries the resource object using GVR.
No description provided by the author
No description provided by the author
GetVersionInfo gets version include KubeBlocks, CLI and kubernetes.
No description provided by the author
No description provided by the author
IsGitCloned tests if the path is a git dir.
No description provided by the author
No description provided by the author
IsSupportReconfigureParams checks whether all updated parameters belong to config template parameters.
IsWindows returns true if the kbcli runtime situation is windows.
No description provided by the author
MakeSSHKeyPair makes a pair of public and private keys for SSH access.
NewConfigFlagNoWarnings returns a ConfigFlags that disables warnings.
No description provided by the author
NewOpsRequestForReconfiguring returns a new common OpsRequest for Reconfiguring operation.
OpenBrowser opens browser with url in different OS system.
No description provided by the author
No description provided by the author
RandRFC1123String generate a random string with length n, which fulfills RFC1123.
No description provided by the author
No description provided by the author
ResourceIsEmpty checks if resource is empty or not.
No description provided by the author
No description provided by the author
SetKubeConfig sets KUBECONFIG environment.
SortEventsByLastTimestamp sorts events by lastTimestamp.
No description provided by the author
TimeFormatWithDuration formats time with specified precision.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
UpdateAndCleanUntracked fetches origin and sets HEAD to origin/HEAD and also creates a pristine working directory by removing untracked files and directories.
No description provided by the author
No description provided by the author
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
DataprotectionAppComponent the value of app.kubernetes.io/component label for DataProtection deployment.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
KubeblocksAppComponent the value of app.kubernetes.io/component label for KubeBlocks deployment.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author