kube

package
v0.0.0-...-fdd9b93 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InClusterConfig

func InClusterConfig() (*rest.Config, error)

Types

type Kube

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

func NewForConfig

func NewForConfig(config *rest.Config) (*Kube, error)

func (*Kube) CreateConfigMap

func (k *Kube) CreateConfigMap(namespace string, cm *apiv1.ConfigMap) (*apiv1.ConfigMap, error)

func (*Kube) CreatePod

func (k *Kube) CreatePod(namespace string, pod *apiv1.Pod) (*apiv1.Pod, error)

func (*Kube) CreateSecret

func (k *Kube) CreateSecret(namespace string, secret *apiv1.Secret) (*apiv1.Secret, error)

func (*Kube) CreateService

func (k *Kube) CreateService(namespace string, service *apiv1.Service) (*apiv1.Service, error)

func (*Kube) DeleteAllPodsMatchingLabel

func (k *Kube) DeleteAllPodsMatchingLabel(namespace string, label string) error

func (*Kube) DeleteAndCreatePod

func (k *Kube) DeleteAndCreatePod(namespace string, podSpec *apiv1.Pod, label string) (*apiv1.Pod, error)

func (*Kube) DeleteAndCreateSecret

func (k *Kube) DeleteAndCreateSecret(namespace string, secret *apiv1.Secret) (*apiv1.Secret, error)

func (*Kube) DeleteDeployment

func (k *Kube) DeleteDeployment(namespace string, depName string) error

func (*Kube) DeletePod

func (k *Kube) DeletePod(namespace string, name string) error

func (*Kube) DeleteSecret

func (k *Kube) DeleteSecret(namespace string, secretName string) error

func (*Kube) DeleteService

func (k *Kube) DeleteService(namespace, name string) error

func (*Kube) GetConfigMap

func (k *Kube) GetConfigMap(namespace, name string) (*apiv1.ConfigMap, error)

func (*Kube) GetNamespaces

func (k *Kube) GetNamespaces() (*apiv1.NamespaceList, error)

func (*Kube) GetPodsByLabel

func (k *Kube) GetPodsByLabel(namespace, name string) (*apiv1.Pod, error)

func (*Kube) GetPort

func (k *Kube) GetPort(namespace, name string) (int32, error)

func (*Kube) GetPorts

func (k *Kube) GetPorts(namespace, name string) ([]apiv1.ServicePort, error)

func (*Kube) GetSecret

func (k *Kube) GetSecret(namespace string, name string) (*apiv1.Secret, error)

func (*Kube) GetService

func (k *Kube) GetService(namespace, name string) (*apiv1.Service, error)

func (*Kube) GetVersion

func (k *Kube) GetVersion() (*version.Info, error)

GetVersion returns back kubernetes server version

func (*Kube) UpdateSecret

func (k *Kube) UpdateSecret(namespace, name, path string, data []byte) (*apiv1.Secret, error)

Jump to

Keyboard shortcuts

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