common

package
v0.0.39 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecCommand added in v0.0.27

func ExecCommand(name string, arg ...string) (err error)

ExecCommand runs a command

func GetClient added in v0.0.27

func GetClient() (client dynamic.Interface, clientSet *kubernetes.Clientset, err error)

GetClient returns the k8s client

func GetKubeShpereDeployment added in v0.0.31

func GetKubeShpereDeployment() []string

GetKubeShpereDeployment returns the deployment of KubeSphere

func GetNightlyTag added in v0.0.27

func GetNightlyTag(date string) (dateStr, tag string)

GetNightlyTag parse the nightly tag

func GetPluginAbleComponents added in v0.0.28

func GetPluginAbleComponents() []string

GetPluginAbleComponents returns the component list which can plug-in or plug-out

func NoFileCompletion added in v0.0.22

func NoFileCompletion(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective)

NoFileCompletion avoid completion with files

func PortIsFree added in v0.0.30

func PortIsFree(port int) bool

PortIsFree checks if the port is free or not

func UpdateWithEditor

func UpdateWithEditor(resource schema.GroupVersionResource, ns, name string, client dynamic.Interface) (err error)

UpdateWithEditor update the k8s resources with a editor

Types

type CompletionFunc added in v0.0.31

type CompletionFunc func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

CompletionFunc is the function for command completion

func ArrayCompletion added in v0.0.22

func ArrayCompletion(array ...string) CompletionFunc

ArrayCompletion return a completion which base on an array

func KubeSphereDeploymentCompletion added in v0.0.31

func KubeSphereDeploymentCompletion() CompletionFunc

KubeSphereDeploymentCompletion returns a completion function for KuebSphere deployments

func PluginAbleComponentsCompletion added in v0.0.28

func PluginAbleComponentsCompletion() CompletionFunc

PluginAbleComponentsCompletion returns a completion function for pluginAble components

type ComponentStatus added in v0.0.29

type ComponentStatus struct {
	Enabled bool
}

ComponentStatus is a common status

type FreePort added in v0.0.30

type FreePort struct {
	// contains filtered or unexported fields
}

FreePort is the tool to find free ports of KubeSphere

func (*FreePort) FindFreePortsOfKubeSphere added in v0.0.30

func (f *FreePort) FindFreePortsOfKubeSphere() ([]int, error)

FindFreePortsOfKubeSphere returns the free ports of KubeSphere The order of the ports is: console, jenkins

type KSInstaller added in v0.0.29

type KSInstaller struct {
	Spec KSInstallerSpec `yaml:"spec"`
}

KSInstaller is the installer for KubeSphere

type KSInstallerSpec added in v0.0.29

type KSInstallerSpec struct {
	Version        string
	ImageNamespace string

	Servicemesh   ComponentStatus
	Openpitrix    ComponentStatus
	Notification  ComponentStatus
	NetworkPolicy ComponentStatus
	MetricsServer ComponentStatus
	Logging       ComponentStatus
	Events        ComponentStatus
	DevOps        ComponentStatus
	Auditing      ComponentStatus
	Alerting      ComponentStatus
	Multicluster  Multicluster `yaml:"multicluster"`
}

KSInstallerSpec is ks-installer

type Multicluster added in v0.0.29

type Multicluster struct {
	ClusterRole string `yaml:"clusterRole"`
}

Multicluster represents multi-cluster

Jump to

Keyboard shortcuts

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