Documentation ¶
Index ¶
- func EnsureCRD(clientset apiextensionsclient.Interface, logger kitlog.Logger) error
- func GetPodCondition(status *v1.PodStatus, conditionType v1.PodConditionType) (int, *v1.PodCondition)
- func GetPodReadyCondition(status v1.PodStatus) *v1.PodCondition
- func IsPodReady(pod *v1.Pod) bool
- func IsPodReadyConditionTrue(status v1.PodStatus) bool
- func NewClient(kubeconfig, context string, logger kitlog.Logger) (kubernetes.Interface, error)
- func NewClientConfigV1(name, user, url string, key, cert, ca []byte) clientcmdapiv1.Config
- func NewConfig(kubeconfig, context string) (*rest.Config, error)
- func PVAccessMode(client kubernetes.Interface) (string, error)
- func WaitForServer(client kubernetes.Interface, stopCh <-chan struct{}, logger kitlog.Logger) error
- type SharedClientFactory
- type Tunnel
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 ¶
IsPodReady returns true if a pod is ready; false otherwise.
func IsPodReadyConditionTrue ¶
IsPodReady retruns true if a pod is ready; false otherwise.
func NewClientConfigV1 ¶
func NewClientConfigV1(name, user, url string, key, cert, ca []byte) clientcmdapiv1.Config
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 { // 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) ForwardPort ¶
ForwardPort opens a tunnel to a kubernetes pod