kube

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2016 License: BSD-3-Clause Imports: 26 Imported by: 0

Documentation

Overview

Copyright © 2016 National Data Service

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KubeHelper

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

func NewKubeHelper

func NewKubeHelper(kubeBase string, username string, password string, tokenPath string) (*KubeHelper, error)

func (*KubeHelper) CreateBasicAuthSecret

func (k *KubeHelper) CreateBasicAuthSecret(pid string, hashedPassword string) (*api.Secret, error)

func (*KubeHelper) CreateControllerTemplate

func (k *KubeHelper) CreateControllerTemplate(ns string, name string, stack string, stackService *ndsapi.StackService, spec *ndsapi.ServiceSpec, links *map[string]ServiceAddrPort, sharedEnv *map[string]string) *api.ReplicationController

func (*KubeHelper) CreateIngress

func (k *KubeHelper) CreateIngress(pid string, host string, service string, port int, tlsSecretName string, basicAuth bool) (*extensions.Ingress, error)

func (*KubeHelper) CreateLimitRange

func (k *KubeHelper) CreateLimitRange(pid string, cpu int, mem int) (*api.LimitRange, error)

func (*KubeHelper) CreateNamespace

func (k *KubeHelper) CreateNamespace(pid string) (*api.Namespace, error)

func (*KubeHelper) CreateResourceQuota

func (k *KubeHelper) CreateResourceQuota(pid string, cpu int, mem int) (*api.ResourceQuota, error)

func (*KubeHelper) CreateSecret

func (k *KubeHelper) CreateSecret(pid string, secret *api.Secret) (*api.Secret, error)

func (*KubeHelper) CreateServiceTemplate

func (k *KubeHelper) CreateServiceTemplate(name string, stack string, spec *ndsapi.ServiceSpec,
	useNodePort bool) *api.Service

func (*KubeHelper) CreateTLSSecret

func (k *KubeHelper) CreateTLSSecret(pid string, secretName string, tlsCert []byte, tlsKey []byte) (*api.Secret, error)

func (*KubeHelper) DeleteNamespace

func (k *KubeHelper) DeleteNamespace(pid string) (*api.Namespace, error)

func (*KubeHelper) DeleteSecret

func (k *KubeHelper) DeleteSecret(pid string, name string) (*api.Secret, error)

func (*KubeHelper) Exec

func (k *KubeHelper) Exec(pid string, pod string, container string, kube *KubeHelper) *websocket.Handler

func (*KubeHelper) ExecCommand

func (k *KubeHelper) ExecCommand(pid string, pod string, command []string) (string, error)

Execute an arbitrary command in the specified pod and return stdout

func (*KubeHelper) GenerateName

func (k *KubeHelper) GenerateName(randomLength int) string

func (*KubeHelper) GetIngress

func (k *KubeHelper) GetIngress(pid string, ingressName string) (*extensions.Ingress, error)

func (*KubeHelper) GetLog

func (k *KubeHelper) GetLog(pid string, podName string, tailLines int) (string, error)

func (*KubeHelper) GetNamespace

func (k *KubeHelper) GetNamespace(pid string) (*api.Namespace, error)

func (*KubeHelper) GetPod

func (k *KubeHelper) GetPod(pid string, name string) (*api.Pod, error)

func (*KubeHelper) GetPods

func (k *KubeHelper) GetPods(pid string, label string, value string) ([]api.Pod, error)

func (*KubeHelper) GetPodsStatus

func (k *KubeHelper) GetPodsStatus(pid string, selector string) (*map[string]string, error)

func (*KubeHelper) GetReplicationController

func (k *KubeHelper) GetReplicationController(pid string, name string) (*api.ReplicationController, error)

func (*KubeHelper) GetReplicationControllers

func (k *KubeHelper) GetReplicationControllers(pid string, label string, value string) ([]api.ReplicationController, error)

func (*KubeHelper) GetResourceQuota

func (k *KubeHelper) GetResourceQuota(pid string) (*api.ResourceQuotaList, error)

func (*KubeHelper) GetSecret

func (k *KubeHelper) GetSecret(pid string, secretName string) (*api.Secret, error)

func (*KubeHelper) GetService

func (k *KubeHelper) GetService(pid string, name string) (*api.Service, error)

func (*KubeHelper) GetServiceEndpoints

func (k *KubeHelper) GetServiceEndpoints(pid string, stackKey string) (*map[string]string, error)

func (*KubeHelper) GetServices

func (k *KubeHelper) GetServices(pid string, stack string) ([]api.Service, error)

func (*KubeHelper) NamespaceExists

func (k *KubeHelper) NamespaceExists(pid string) bool

func (*KubeHelper) RandomString

func (k *KubeHelper) RandomString(randomLength int) string

func (*KubeHelper) ServiceExists

func (k *KubeHelper) ServiceExists(pid string, name string) bool

func (*KubeHelper) StartController

func (k *KubeHelper) StartController(pid string, spec *api.ReplicationController) (bool, error)

Start the specified replication controller

func (*KubeHelper) StartService

func (k *KubeHelper) StartService(pid string, spec *api.Service) (*api.Service, error)

func (*KubeHelper) StopController

func (k *KubeHelper) StopController(pid string, name string) error

func (*KubeHelper) StopService

func (k *KubeHelper) StopService(pid string, name string) error

func (*KubeHelper) WatchEvents

func (k *KubeHelper) WatchEvents(handler events.EventHandler)

func (*KubeHelper) WatchPods

func (k *KubeHelper) WatchPods(handler events.EventHandler)

type ServiceAddrPort

type ServiceAddrPort struct {
	Name     string
	Host     string
	Port     int32
	NodePort int32
}

Jump to

Keyboard shortcuts

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