kubernetes

package
v0.0.0-...-280ab92 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SupportedPlatforms []Platform = []Platform{kind.NewPlatform(), k3s.NewPlatform(), ibm.NewPlatform()}

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	//	InternalIPs []string
	//	Ingress     bool
	Kubectl *kubernetes.Clientset
	// contains filtered or unexported fields
}

func NewCluster

func NewCluster(kubeconfig string) (*Cluster, error)

func (*Cluster) Connect

func (c *Cluster) Connect(config string) error

func (*Cluster) Exec

func (c *Cluster) Exec(namespace, podName, containerName string, command, stdin string) (string, string, error)

func (*Cluster) GetPlatform

func (c *Cluster) GetPlatform() Platform

func (*Cluster) ListPods

func (c *Cluster) ListPods(namespace, selector string) (*v1.PodList, error)

ListPods returns the list of currently scheduled or running pods in `namespace` with the given selector

func (*Cluster) WaitForPodBySelectorRunning

func (c *Cluster) WaitForPodBySelectorRunning(namespace, selector string, timeout int) error

Wait up to timeout seconds for all pods in 'namespace' with given 'selector' to enter running state. Returns an error if no pods are found or not all discovered pods enter running state.

func (*Cluster) WaitForPodRunning

func (c *Cluster) WaitForPodRunning(namespace, podName string, timeout time.Duration) error

Poll up to timeout seconds for pod to enter running state. Returns an error if the pod never enters the running state.

func (*Cluster) WaitUntilPodBySelectorExist

func (c *Cluster) WaitUntilPodBySelectorExist(namespace, selector string, timeout int) error

Wait up to timeout seconds for all pods in 'namespace' with given 'selector' to enter running state. Returns an error if no pods are found or not all discovered pods enter running state.

type Deployment

type Deployment interface {
	Deploy(Cluster) error
	Upgrade(Cluster) error
	SetDomain(d string)
	GetDomain() string
	Delete(Cluster) error
	Describe() string
	GetVersion() string

	Restore(Cluster, string) error
	Backup(Cluster, string) error
}

type Installer

type Installer struct {
}

func NewInstaller

func NewInstaller() *Installer

func (*Installer) Backup

func (i *Installer) Backup(d Deployment, cluster Cluster, output string) error

func (*Installer) Delete

func (i *Installer) Delete(d Deployment, cluster Cluster) error

func (*Installer) Install

func (i *Installer) Install(d Deployment, cluster Cluster) error

func (*Installer) Restore

func (i *Installer) Restore(d Deployment, cluster Cluster, output string) error

func (*Installer) Upgrade

func (i *Installer) Upgrade(d Deployment, cluster Cluster) error

type Platform

type Platform interface {
	Detect(*kubernetes.Clientset) bool
	Describe() string
	String() string
	Load(*kubernetes.Clientset) error
	ExternalIPs() []string
}

Directories

Path Synopsis
platform
ibm
k3s

Jump to

Keyboard shortcuts

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