Documentation ¶
Index ¶
- Constants
- func PrintList(objects []runtime.Object, opt kobject.ConvertOptions) error
- type Kubernetes
- func (k *Kubernetes) ConfigEmptyVolumeSource() *api.VolumeSource
- func (k *Kubernetes) ConfigEnvs(name string, service kobject.ServiceConfig) []api.EnvVar
- func (k *Kubernetes) ConfigPVCVolumeSource(name string, readonly bool) *api.VolumeSource
- func (k *Kubernetes) ConfigPorts(name string, service kobject.ServiceConfig) []api.ContainerPort
- func (k *Kubernetes) ConfigServicePorts(name string, service kobject.ServiceConfig) []api.ServicePort
- func (k *Kubernetes) ConfigVolumes(name string, service kobject.ServiceConfig) ([]api.VolumeMount, []api.Volume, []*api.PersistentVolumeClaim)
- func (k *Kubernetes) CreateKubernetesObjects(name string, service kobject.ServiceConfig, opt kobject.ConvertOptions) []runtime.Object
- func (k *Kubernetes) CreatePVC(name string, mode string) *api.PersistentVolumeClaim
- func (k *Kubernetes) CreateService(name string, service kobject.ServiceConfig, objects []runtime.Object) *api.Service
- func (k *Kubernetes) Deploy(komposeObject kobject.KomposeObject, opt kobject.ConvertOptions) error
- func (k *Kubernetes) InitD(name string, service kobject.ServiceConfig, replicas int) *extensions.Deployment
- func (k *Kubernetes) InitDS(name string, service kobject.ServiceConfig) *extensions.DaemonSet
- func (k *Kubernetes) InitRC(name string, service kobject.ServiceConfig, replicas int) *api.ReplicationController
- func (k *Kubernetes) InitSvc(name string, service kobject.ServiceConfig) *api.Service
- func (k *Kubernetes) PortsExist(name string, service kobject.ServiceConfig) bool
- func (k *Kubernetes) SortServicesFirst(objs *[]runtime.Object)
- func (k *Kubernetes) Transform(komposeObject kobject.KomposeObject, opt kobject.ConvertOptions) []runtime.Object
- func (k *Kubernetes) Undeploy(komposeObject kobject.KomposeObject, opt kobject.ConvertOptions) error
- func (k *Kubernetes) UpdateController(obj runtime.Object, updateTemplate func(*api.PodTemplateSpec), ...)
- func (k *Kubernetes) UpdateKubernetesObjects(name string, service kobject.ServiceConfig, objects *[]runtime.Object)
- func (k *Kubernetes) VolumesFrom(objects *[]runtime.Object, komposeObject kobject.KomposeObject)
Constants ¶
const TIMEOUT = 300
timeout is how long we'll wait for the termination of kubernetes resource to be successful used when undeploying resources from kubernetes
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Kubernetes ¶
type Kubernetes struct { // the user provided options from the command line Opt kobject.ConvertOptions }
func (*Kubernetes) ConfigEmptyVolumeSource ¶ added in v0.1.2
func (k *Kubernetes) ConfigEmptyVolumeSource() *api.VolumeSource
helper function to create an EmptyDir api.VolumeSource
func (*Kubernetes) ConfigEnvs ¶ added in v0.1.2
func (k *Kubernetes) ConfigEnvs(name string, service kobject.ServiceConfig) []api.EnvVar
Configure the environment variables.
func (*Kubernetes) ConfigPVCVolumeSource ¶ added in v0.1.2
func (k *Kubernetes) ConfigPVCVolumeSource(name string, readonly bool) *api.VolumeSource
helper function to create an api.VolumeSource with a PVC
func (*Kubernetes) ConfigPorts ¶ added in v0.1.2
func (k *Kubernetes) ConfigPorts(name string, service kobject.ServiceConfig) []api.ContainerPort
Configure the container ports.
func (*Kubernetes) ConfigServicePorts ¶ added in v0.1.2
func (k *Kubernetes) ConfigServicePorts(name string, service kobject.ServiceConfig) []api.ServicePort
Configure the container service ports.
func (*Kubernetes) ConfigVolumes ¶ added in v0.1.2
func (k *Kubernetes) ConfigVolumes(name string, service kobject.ServiceConfig) ([]api.VolumeMount, []api.Volume, []*api.PersistentVolumeClaim)
Configure the container volumes.
func (*Kubernetes) CreateKubernetesObjects ¶ added in v0.1.2
func (k *Kubernetes) CreateKubernetesObjects(name string, service kobject.ServiceConfig, opt kobject.ConvertOptions) []runtime.Object
Generate a Kubernetes artifact for each input type service
func (*Kubernetes) CreatePVC ¶ added in v0.1.2
func (k *Kubernetes) CreatePVC(name string, mode string) *api.PersistentVolumeClaim
Initialize PersistentVolumeClaim
func (*Kubernetes) CreateService ¶ added in v0.1.2
func (k *Kubernetes) CreateService(name string, service kobject.ServiceConfig, objects []runtime.Object) *api.Service
create a k8s service
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) InitD ¶ added in v0.1.2
func (k *Kubernetes) InitD(name string, service kobject.ServiceConfig, replicas int) *extensions.Deployment
Init Deployment
func (*Kubernetes) InitDS ¶ added in v0.1.2
func (k *Kubernetes) InitDS(name string, service kobject.ServiceConfig) *extensions.DaemonSet
Init DS object
func (*Kubernetes) InitRC ¶ added in v0.1.2
func (k *Kubernetes) InitRC(name string, service kobject.ServiceConfig, replicas int) *api.ReplicationController
Init RC object
func (*Kubernetes) InitSvc ¶ added in v0.1.2
func (k *Kubernetes) InitSvc(name string, service kobject.ServiceConfig) *api.Service
Init Svc object
func (*Kubernetes) PortsExist ¶ added in v0.1.2
func (k *Kubernetes) PortsExist(name string, service kobject.ServiceConfig) bool
func (*Kubernetes) SortServicesFirst ¶ added in v0.1.2
func (k *Kubernetes) 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 (*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
func (*Kubernetes) UpdateController ¶ added in v0.1.2
func (k *Kubernetes) 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 (*Kubernetes) UpdateKubernetesObjects ¶ added in v0.1.2
func (k *Kubernetes) UpdateKubernetesObjects(name string, service kobject.ServiceConfig, objects *[]runtime.Object)
load configurations to k8s objects
func (*Kubernetes) VolumesFrom ¶ added in v0.1.2
func (k *Kubernetes) VolumesFrom(objects *[]runtime.Object, komposeObject kobject.KomposeObject)