kube

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModeKubeConfig     = "kubeconfig"
	ModeServiceAccount = "serviceaccount"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type KubeClient

type KubeClient struct {
	ClientSet *kubernetes.Clientset
	// contains filtered or unexported fields
}

func NewKubeClient

func NewKubeClient(mode string, kubeConfig string) (*KubeClient, error)

func NewKubeClientFromCommand

func NewKubeClientFromCommand(cmd *cobra.Command) (*KubeClient, error)

func (*KubeClient) GetDeploymentInNamespace

func (k *KubeClient) GetDeploymentInNamespace(namespace string, deploymentName string) (*v1.Deployment, bool, error)

func (*KubeClient) GetDeploymentNamesInNamespace

func (k *KubeClient) GetDeploymentNamesInNamespace(namespace string) ([]string, error)

func (*KubeClient) GetDeploymentScale

func (k *KubeClient) GetDeploymentScale(namespace string, deploymentName string) (*autoscalingv1.Scale, bool, error)

func (*KubeClient) GetDeploymentsInNamespace

func (k *KubeClient) GetDeploymentsInNamespace(namespace string) (*v1.DeploymentList, error)

func (*KubeClient) GetNamespaceNames

func (k *KubeClient) GetNamespaceNames() ([]string, error)

func (*KubeClient) GetStatefulSetInNamespace

func (k *KubeClient) GetStatefulSetInNamespace(namespace string, statefulSetName string) (*v1.StatefulSet, bool, error)

func (*KubeClient) GetStatefulSetNamesInNamespace

func (k *KubeClient) GetStatefulSetNamesInNamespace(namespace string) ([]string, error)

func (*KubeClient) GetStatefulSetScale

func (k *KubeClient) GetStatefulSetScale(namespace string, statefulSetName string) (*autoscalingv1.Scale, bool, error)

func (*KubeClient) GetStatefulSetsInNamespace

func (k *KubeClient) GetStatefulSetsInNamespace(namespace string) (*v1.StatefulSetList, error)

func (*KubeClient) SetDeploymentScale

func (k *KubeClient) SetDeploymentScale(namespace string, deploymentName string, count int32) (int32, bool, error)

func (*KubeClient) SetStatefulSetScale

func (k *KubeClient) SetStatefulSetScale(namespace string, statefulSetName string, count int32) (int32, bool, error)

Jump to

Keyboard shortcuts

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