kube

package
v0.0.0-...-e07045a Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: BSD-3-Clause, Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildConfig

func BuildConfig(kubeconfig string) (*rest.Config, error)

func NewKubeClient

func NewKubeClient(kubeCfgFile string) (*k8sclient.Clientset, error)

TODO refactor for config *rest.Config :)

Types

type Kubernetes

type Kubernetes struct {
	Client        *k8sclient.Clientset
	MasterHost    string
	DefaultOption metav1.GetOptions
	DeleteOption  metav1.DeleteOptions
}

func New

func New(kubeConfigFile, masterHost string) (*Kubernetes, error)

func (*Kubernetes) CreateOrUpdateDeployment

func (k *Kubernetes) CreateOrUpdateDeployment(deployment *appsv1Beta1.Deployment) error

Deploys the given deployment into kubernetes, error is returned if a non recoverable error happens

func (*Kubernetes) CreateOrUpdateService

func (k *Kubernetes) CreateOrUpdateService(service *v1.Service) error

Deploys the given service into kubernetes, error is returned if a non recoverable error happens

func (*Kubernetes) CreateOrUpdateStatefulSet

func (k *Kubernetes) CreateOrUpdateStatefulSet(statefulset *appsv1Beta1.StatefulSet) error

Deploys the given statefulset into kubernetes, error is returned if a non recoverable error happens

func (*Kubernetes) DeleteDeployment

func (k *Kubernetes) DeleteDeployment(deployment *appsv1Beta1.Deployment) error

func (*Kubernetes) DeleteService

func (k *Kubernetes) DeleteService(service *v1.Service) error

func (*Kubernetes) DeleteStatefulset

func (k *Kubernetes) DeleteStatefulset(statefulset *appsv1Beta1.StatefulSet) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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