kubernetes

package
v0.0.0-...-ef7d8be Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2018 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIPresent

func APIPresent(config *rest.Config) error

APIPresent checks that an API is installed.

func IsColliding

func IsColliding(services corev1.ServiceInterface, stack *apiv1beta1.Stack, cfg *composetypes.Config) error

IsColliding verify that services defined in the stack collides with already deployed services

func LoadStack

func LoadStack(name string, cfg composetypes.Config) (*apiv1beta1.Stack, error)

LoadStack loads a stack from a Compose config, with a given name.

func RunDeploy

func RunDeploy(dockerCli *KubeCli, opts options.Deploy) error

RunDeploy is the kubernetes implementation of docker stack deploy

func RunList

func RunList(dockerCli *KubeCli, opts options.List) error

RunList is the kubernetes implementation of docker stack ls

func RunPS

func RunPS(dockerCli *KubeCli, options options.PS) error

RunPS is the kubernetes implementation of docker stack ps

func RunRemove

func RunRemove(dockerCli *KubeCli, opts options.Remove) error

RunRemove is the kubernetes implementation of docker stack remove

func RunServices

func RunServices(dockerCli *KubeCli, opts options.Services) error

RunServices is the kubernetes implementation of docker stack services

Types

type DeployWatcher

type DeployWatcher struct {
	Pods corev1.PodInterface
}

DeployWatcher watches a stack deployement

func (DeployWatcher) Watch

func (w DeployWatcher) Watch(stack *apiv1beta1.Stack, serviceNames []string) chan bool

Watch watches a stuck deployement and return a chan that will holds the state of the stack

type Factory

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

Factory is the kubernetes client factory

func NewFactory

func NewFactory(namespace string, config *restclient.Config) (*Factory, error)

NewFactory creates a kubernetes client factory

func (*Factory) ConfigMaps

func (s *Factory) ConfigMaps() corev1.ConfigMapInterface

ConfigMaps returns a client for kubernetes's config maps

func (*Factory) Nodes

func (s *Factory) Nodes() corev1.NodeInterface

Nodes returns a client for kubernetes's nodes

func (*Factory) Pods

func (s *Factory) Pods() corev1.PodInterface

Pods returns a client for kubernetes's pods

func (*Factory) ReplicaSets

func (s *Factory) ReplicaSets() typesappsv1beta2.ReplicaSetInterface

ReplicaSets return a client for kubernetes replace sets

func (*Factory) ReplicationControllers

func (s *Factory) ReplicationControllers() corev1.ReplicationControllerInterface

ReplicationControllers returns a client for kubernetes replication controllers

func (*Factory) Secrets

func (s *Factory) Secrets() corev1.SecretInterface

Secrets returns a client for kubernetes's secrets

func (*Factory) Services

func (s *Factory) Services() corev1.ServiceInterface

Services returns a client for kubernetes's secrets

type KubeCli

type KubeCli struct {
	command.Cli
	// contains filtered or unexported fields
}

KubeCli holds kubernetes specifics (client, namespace) with the command.Cli

func WrapCli

func WrapCli(dockerCli command.Cli, cmd *cobra.Command) (*KubeCli, error)

WrapCli wraps command.Cli with kubernetes specifics

Jump to

Keyboard shortcuts

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