cluster

package
v0.0.0-...-bae14f2 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster interface {
	CreateDeployment(deploymentData deploymentconfig.DeploymentConfig) (name string, err error)
	FindPodIP(deploymentName string) (string, error)
	DeleteDeployment(deploymentName string) error
}

Cluster interface provides common function for work and testing with k8s cluster

type FakeKubernetes

type FakeKubernetes struct {
	CreateDeploymentResult string
	FindPodIPResult        string
}

FakeKubernetes is rub for k8s client

func (FakeKubernetes) CreateDeployment

func (k FakeKubernetes) CreateDeployment(deploymentData deploymentconfig.DeploymentConfig) (name string, err error)

CreateDeployment creates deployment

func (FakeKubernetes) DeleteDeployment

func (k FakeKubernetes) DeleteDeployment(deploymentName string) error

DeleteDeployment deletes deployment

func (FakeKubernetes) FindPodIP

func (k FakeKubernetes) FindPodIP(deploymentName string) (string, error)

FindPodIP finds pod's ip

type Kubernetes

type Kubernetes struct {
	Config *config.Config
	// contains filtered or unexported fields
}

Kubernetes helps to access k8s cluster methods

func (*Kubernetes) CreateClient

func (k *Kubernetes) CreateClient() error

CreateClient creayes k8s client

func (*Kubernetes) CreateDeployment

func (k *Kubernetes) CreateDeployment(deploymentData deploymentconfig.DeploymentConfig) (name string, err error)

CreateDeployment creates deployment

func (*Kubernetes) DeleteDeployment

func (k *Kubernetes) DeleteDeployment(deploymentName string) error

DeleteDeployment deletes deployment

func (*Kubernetes) FindPodIP

func (k *Kubernetes) FindPodIP(deploymentName string) (string, error)

FindPodIP finds pod's ip

Jump to

Keyboard shortcuts

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