kube

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2017 License: Apache-2.0 Imports: 17 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Deployments = &DeploymentsService{}

Deployments is the default deployments service instance

View Source
var Namespaces = &NamespacesService{}

Namespaces is the default namespaces service instance

View Source
var Nodes = &NodesService{}

Nodes is the default nodes service instance

View Source
var Pods = &PodsService{}

Pods is the default pods service instance

View Source
var ReplicaSets = &ReplicaSetsService{}

ReplicaSets is the default replicasets service instance

View Source
var Services = &ServicesService{}

Services is the default services service instance

Functions

func Create added in v1.1.0

func Create(spec string) (map[string][]string, error)

Create uses `kubectl create` to create the objects defined by `spec`

func Delete added in v1.1.0

func Delete(spec string) (map[string][]string, error)

Delete uses `kubectl delete` to delete the objects defined by `spec`

func Init

func Init(c *Config) error

Init initializes the kubernetes service with the given config

Types

type Config

type Config struct {
	EnvConfigs map[string]*EnvConfig
}

Config is the kubernetes configuration

type DeploymentsService added in v1.1.0

type DeploymentsService struct {
}

DeploymentsService is the kubernetes service to interace with deployments

func (*DeploymentsService) Create added in v1.1.0

Create creates a deployment in `env`

func (*DeploymentsService) Delete added in v1.1.0

func (s *DeploymentsService) Delete(env, name string) (*unversioned.Status, error)

Delete deletes the deployment in `env` with `name`

func (*DeploymentsService) Get added in v1.1.0

Get fetches the deployment in `env` with `name`

func (*DeploymentsService) List added in v1.1.0

List fetches the list of deployments in `env`

func (*DeploymentsService) Replace added in v1.1.0

Replace replaces the deployment in `env` with `name`

func (*DeploymentsService) Rollback added in v1.1.0

Rollback rolls back the deployment in `env` with `name`

func (*DeploymentsService) Scale added in v1.1.0

func (s *DeploymentsService) Scale(env, name string, data *v1beta1.Scale) (*v1beta1.Scale, *unversioned.Status, error)

Scale scales the deployment in `env` with `name`

type EnvConfig

type EnvConfig struct {
	URL        string
	Namespace  string
	Token      string
	ClientCert string
	ClientKey  string
	// contains filtered or unexported fields
}

EnvConfig is an environment's kubernetes configuration

type NamespacesService added in v1.1.0

type NamespacesService struct {
}

NamespacesService is the kubernetes service to interace with namespaces

func (*NamespacesService) Create added in v1.1.0

Create creates a namespace

func (*NamespacesService) Delete added in v1.1.0

func (s *NamespacesService) Delete(name string) (*unversioned.Status, error)

Delete deletes the namespace with `name`

func (*NamespacesService) Get added in v1.1.0

Get fetches the namespace with `name`

func (*NamespacesService) List added in v1.1.0

List fetches the list of namespaces

type Node

type Node struct {
	Spec NodeSpec `json:"spec,omitempty"`
}

Node is a custom struct representing a kubernetes Node

type NodeSpec

type NodeSpec struct {
	Unschedulable bool `json:"unschedulable"`
}

NodeSpec is a custom struct representing a kubernetes NodeSpec

type NodesService

type NodesService struct {
}

NodesService is the kubernetes service to interace with nodes

func (*NodesService) Get

func (s *NodesService) Get(env, name string) (*v1.Node, *unversioned.Status, error)

Get fetches the node in `env` with `name`

func (*NodesService) List

func (s *NodesService) List(env string, query *url.Values) (*v1.NodeList, error)

List fetches the list of nodes in `env`

func (*NodesService) Patch

func (s *NodesService) Patch(env, name string, data *v1.Node) (*v1.Node, error)

Patch patches the node in `env` with `name`

func (*NodesService) PatchUnschedulable

func (s *NodesService) PatchUnschedulable(env, name string, unschedulable bool) (*v1.Node, error)

PatchUnschedulable changes the unschedulable value of the node in `env` with `name` This is necessary because Go doesn't serialize false Unschedulable values in v1.NodeSpec

type PodsService

type PodsService struct {
}

PodsService is the kubernetes service to interace with pods

func (*PodsService) Create

func (s *PodsService) Create(env string, data *v1.Pod) (*v1.Pod, *unversioned.Status, error)

Create creates a pod in `env`

func (*PodsService) Delete

func (s *PodsService) Delete(env, name string) (*v1.Pod, *unversioned.Status, error)

Delete deletes the pod in `env` with `name`

func (*PodsService) DeleteForController

func (s *PodsService) DeleteForController(env string, controller *v1.ReplicationController) (*v1.PodList, *unversioned.Status, error)

DeleteForController deletes the pods in `env` for the given controller

func (*PodsService) Get

func (s *PodsService) Get(env, name string) (*v1.Pod, *unversioned.Status, error)

Get fetches the pod in `env` with `name`

func (*PodsService) GetLog

func (s *PodsService) GetLog(env, name string) (string, *unversioned.Status, error)

GetLog fetches the pod log in `env` with `name`

func (*PodsService) List

func (s *PodsService) List(env string, query *url.Values) (*v1.PodList, *unversioned.Status, error)

List fetches the list of pods in `env`

func (*PodsService) ListForController

func (s *PodsService) ListForController(env string, controller *v1.ReplicationController) (*v1.PodList, *unversioned.Status, error)

ListForController fetches the list of pods in `env` for the given controller

func (*PodsService) ListForDeployment added in v1.1.0

func (s *PodsService) ListForDeployment(env string, deployment *v1beta1.Deployment) (*v1.PodList, *unversioned.Status, error)

ListForDeployment fetches the list of pods in `env` for the given deployment

func (*PodsService) ListForReplicaSet added in v1.1.0

func (s *PodsService) ListForReplicaSet(env string, replicaSet *v1beta1.ReplicaSet) (*v1.PodList, *unversioned.Status, error)

ListForReplicaSet fetches the list of pods in `env` for the given replicaset

type ReplicaSetsService added in v1.1.0

type ReplicaSetsService struct {
}

ReplicaSetsService is the kubernetes service to interace with replicasets

func (*ReplicaSetsService) Create added in v1.1.0

Create creates a replicaset in `env`

func (*ReplicaSetsService) Delete added in v1.1.0

func (s *ReplicaSetsService) Delete(env, name string) (*v1beta1.ReplicaSet, *unversioned.Status, error)

Delete deletes the replicaset in `env` with `name`

func (*ReplicaSetsService) Get added in v1.1.0

Get fetches the replicaset in `env` with `name`

func (*ReplicaSetsService) List added in v1.1.0

List fetches the list of replicasets in `env`

func (*ReplicaSetsService) ListForDeployment added in v1.1.0

func (s *ReplicaSetsService) ListForDeployment(env string, deployment *v1beta1.Deployment) (*v1beta1.ReplicaSetList, *unversioned.Status, error)

ListForDeployment fetches the list of replicasets in `env` for the given deployment

func (*ReplicaSetsService) Patch added in v1.1.0

Patch patches the replicaset in `env` with `name`

type ServicesService

type ServicesService struct {
}

ServicesService is the kubernetes service to interace with services

func (*ServicesService) Create

func (s *ServicesService) Create(env, name string, data *v1.Service) (*v1.Service, error)

Create fetches the service in `env` with `name`

func (*ServicesService) Get

func (s *ServicesService) Get(env, name string) (*v1.Service, *unversioned.Status, error)

Get fetches the service in `env` with `name`

func (*ServicesService) List

func (s *ServicesService) List(env string) (*v1.ServiceList, error)

List fetches the list of services in `env`

Directories

Path Synopsis
extensions
Package unversioned contains API types that are common to all versions.
Package unversioned contains API types that are common to all versions.

Jump to

Keyboard shortcuts

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