kubernetes

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2018 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureCRD

func EnsureCRD(clientset apiextensionsclient.Interface, logger kitlog.Logger) error

func GetPodCondition

func GetPodCondition(status *v1.PodStatus, conditionType v1.PodConditionType) (int, *v1.PodCondition)

GetPodCondition extracts the provided condition from the given status and returns that. Returns nil and -1 if the condition is not present, and the index of the located condition.

func GetPodReadyCondition

func GetPodReadyCondition(status v1.PodStatus) *v1.PodCondition

Extracts the pod ready condition from the given status and returns that. Returns nil if the condition is not present.

func IsPodReady

func IsPodReady(pod *v1.Pod) bool

IsPodReady returns true if a pod is ready; false otherwise.

func IsPodReadyConditionTrue

func IsPodReadyConditionTrue(status v1.PodStatus) bool

IsPodReady retruns true if a pod is ready; false otherwise.

func NewClient

func NewClient(kubeconfig, context string, logger kitlog.Logger) (kubernetes.Interface, error)

func NewClientConfigV1

func NewClientConfigV1(name, user, url string, key, cert, ca []byte) clientcmdapiv1.Config

func NewConfig

func NewConfig(kubeconfig, context string) (*rest.Config, error)

func PVAccessMode

func PVAccessMode(client kubernetes.Interface) (string, error)

PVAccessMode is a helper that tries to determine which access mode to use for pvc. It default to ReadWriteOnce and only returns ReadWriteMany when there are no storage classes and at least one ReadWriteMany PV

func WaitForServer

func WaitForServer(client kubernetes.Interface, stopCh <-chan struct{}, logger kitlog.Logger) error

Types

type SharedClientFactory

type SharedClientFactory struct {
	Logger kitlog.Logger
	// contains filtered or unexported fields
}

func NewSharedClientFactory

func NewSharedClientFactory(secrets typedv1.SecretInterface, klusterEvents cache.SharedIndexInformer, logger kitlog.Logger) *SharedClientFactory

func (*SharedClientFactory) ClientFor

func (f *SharedClientFactory) ClientFor(k *kubernikus_v1.Kluster) (clientset kubernetes.Interface, err error)

type Tunnel

type Tunnel struct {
	Local     int
	Remote    int
	Namespace string
	PodName   string
	Out       io.Writer
	// contains filtered or unexported fields
}

Tunnel describes a ssh-like tunnel to a kubernetes pod

func NewTunnel

func NewTunnel(client rest.Interface, config *rest.Config, namespace, podName string, remote int) *Tunnel

NewTunnel creates a new tunnel

func (*Tunnel) Close

func (t *Tunnel) Close()

Close disconnects a tunnel connection

func (*Tunnel) ForwardPort

func (t *Tunnel) ForwardPort() error

ForwardPort opens a tunnel to a kubernetes pod

Jump to

Keyboard shortcuts

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