kube

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2019 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type K8s

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

K8s represents a connection to kubernetes

func NewClient added in v0.3.0

func NewClient(conf string) *K8s

NewClient populates a new connection

func NewFakeClient added in v0.3.0

func NewFakeClient() *K8s

NewFakeClient returns a testing instance

func (*K8s) CreateNamespace

func (k8s *K8s) CreateNamespace(name string) error

CreateNamespace tells the k8s api to make a namespace

func (*K8s) FindPod

func (k8s *K8s) FindPod(namespace, label string) (result string, err error)

FindPod finds a pod based on the namespace and the given label

func (*K8s) ForwardPod

func (k8s *K8s) ForwardPod(name, namespace, local, remote string) chan struct{}

ForwardPod establishes a persistent connection to a remote pod

func (*K8s) FromConfigMap

func (k8s *K8s) FromConfigMap(name, namespace, key string) (result string, err error)

FromConfigMap reads an entry from a ConfigMap

func (*K8s) FromSecret

func (k8s *K8s) FromSecret(name, namespace, key string) (result string, err error)

FromSecret reads an entry from a Secret

type Manifest

type Manifest struct {
	Namespace string `yaml:"namespace"` // namespace
	Timeout   int64  `yaml:"timeout"`   // install / upgrade wait time
	Remove    bool   `yaml:"remove"`    // remove once installed
	Object    []byte
	*K8s
}

Manifest represents a kubernetes definition

func (*Manifest) Connect

func (m *Manifest) Connect(k8s interface{})

Connect links the manifest to the k8 api

func (*Manifest) Delete

func (m *Manifest) Delete() error

Delete the decoded kubernetes objects

func (*Manifest) Execute

func (m *Manifest) Execute(spec runtime.Object, do action, result chan error)

Execute performs actions against the kubernetes api

func (*Manifest) GetInput added in v0.3.0

func (m *Manifest) GetInput() []byte

GetInput return the manifest object

func (*Manifest) InstallOrUpgrade added in v0.4.3

func (m *Manifest) InstallOrUpgrade() error

Install the decoded kubernetes objects

func (*Manifest) Lint

func (m *Manifest) Lint(key string, in *util.Values) error

Lint checks that our definition has a namespace

func (*Manifest) SetInput

func (m *Manifest) SetInput(obj []byte)

SetInput adds to object to the manifest

func (*Manifest) Status

func (m *Manifest) Status() (bool, error)

Status returns true if the objects exists

func (*Manifest) Workflow

func (m *Manifest) Workflow(do action) error

Workflow executes against each kubernetes spec

Jump to

Keyboard shortcuts

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