kubernetes

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2016 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigEnvs

func ConfigEnvs(name string, service kobject.ServiceConfig) []api.EnvVar

Configure the environment variables.

func ConfigPorts

func ConfigPorts(name string, service kobject.ServiceConfig) []api.ContainerPort

Configure the container ports.

func ConfigServicePorts

func ConfigServicePorts(name string, service kobject.ServiceConfig) []api.ServicePort

Configure the container service ports.

func ConfigVolumes

func ConfigVolumes(name string, service kobject.ServiceConfig) ([]api.VolumeMount, []api.Volume, []*api.PersistentVolumeClaim)

Configure the container volumes.

func CreateKubernetesObjects

func CreateKubernetesObjects(name string, service kobject.ServiceConfig, opt kobject.ConvertOptions) []runtime.Object

Generate a Kubernetes artifact for each input type service

func CreatePVC added in v0.1.1

func CreatePVC(name string, mode string) *api.PersistentVolumeClaim

Initialize PersistentVolumeClaim

func CreateService

func CreateService(name string, service kobject.ServiceConfig, objects []runtime.Object) *api.Service

create a k8s service

func InitD

func InitD(name string, service kobject.ServiceConfig, replicas int) *extensions.Deployment

Init Deployment

func InitDS

func InitDS(name string, service kobject.ServiceConfig) *extensions.DaemonSet

Init DS object

func InitRC

func InitRC(name string, service kobject.ServiceConfig, replicas int) *api.ReplicationController

Init RC object

func InitSvc

func InitSvc(name string, service kobject.ServiceConfig) *api.Service

Init Svc object

func PortsExist

func PortsExist(name string, service kobject.ServiceConfig) bool

func PrintList

func PrintList(objects []runtime.Object, opt kobject.ConvertOptions) error

PrintList will take the data converted and decide on the commandline attributes given

func SortServicesFirst

func SortServicesFirst(objs *[]runtime.Object)

the objects that we get can be in any order this keeps services first according to best practice kubernetes services should be created first http://kubernetes.io/docs/user-guide/config-best-practices/

func UpdateController

func UpdateController(obj runtime.Object, updateTemplate func(*api.PodTemplateSpec), updateMeta func(meta *api.ObjectMeta))

Updates the given object with the given pod template update function and ObjectMeta update function

func UpdateKubernetesObjects

func UpdateKubernetesObjects(name string, service kobject.ServiceConfig, objects *[]runtime.Object)

load configurations to k8s objects

Types

type Kubernetes

type Kubernetes struct {
}

func (*Kubernetes) Deploy added in v0.1.1

func (k *Kubernetes) Deploy(komposeObject kobject.KomposeObject, opt kobject.ConvertOptions) error

Submit deployment and svc to k8s endpoint

func (*Kubernetes) Transform

func (k *Kubernetes) Transform(komposeObject kobject.KomposeObject, opt kobject.ConvertOptions) []runtime.Object

Transform maps komposeObject to k8s objects returns object that are already sorted in the way that Services are first

func (*Kubernetes) Undeploy added in v0.1.1

func (k *Kubernetes) Undeploy(komposeObject kobject.KomposeObject, opt kobject.ConvertOptions) error

Jump to

Keyboard shortcuts

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