utils

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComponentExists

func ComponentExists(client kclient.Client, name string) bool

ComponentExists checks whether a deployment by the given name exists

func ConvertEnvs

func ConvertEnvs(vars []common.DockerimageEnv) []corev1.EnvVar

ConvertEnvs converts environment variables from the devfile structure to kubernetes structure

func ConvertPorts added in v1.1.2

func ConvertPorts(endpoints []common.DockerimageEndpoint) ([]corev1.ContainerPort, error)

ConvertPorts converts endpoint variables from the devfile structure to kubernetes ContainerPort

func GetContainers

func GetContainers(devfileObj devfileParser.DevfileObj) ([]corev1.Container, error)

GetContainers iterates through the components in the devfile and returns a slice of the corresponding containers

func GetResourceReqs

func GetResourceReqs(comp common.DevfileComponent) corev1.ResourceRequirements

GetResourceReqs creates a kubernetes ResourceRequirements object based on resource requirements set in the devfile

func UpdateContainersWithSupervisord added in v1.1.2

func UpdateContainersWithSupervisord(devfileObj devfileParser.DevfileObj, containers []corev1.Container, devfileRunCmd string) ([]corev1.Container, error)

UpdateContainersWithSupervisord updates the run components entrypoint and volume mount with supervisord if no entrypoint has been specified for the component in the devfile

Types

This section is empty.

Jump to

Keyboard shortcuts

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