utils

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddProjectVolumeToComp

func AddProjectVolumeToComp(projectVolumeName string, hostConfig *container.HostConfig) *container.HostConfig

func ComponentExists

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

ComponentExists checks if Docker containers labeled with the specified component name exists

func ConvertEnvs

func ConvertEnvs(vars []common.DockerimageEnv) []string

ConvertEnvs converts environment variables from the devfile structure to an array of strings, as expected by Docker

func DoesContainerNeedUpdating

func DoesContainerNeedUpdating(component common.DevfileComponent, containerConfig *container.Config) bool

DoesContainerNeedUpdating returns true if a given container needs to be removed and recreated This function compares values in the container vs corresponding values in the devfile component. If any of the values between the two differ, a restart is required (and this function returns true) Unlike Kube, Docker doesn't provide a mechanism to update a container in place only when necesary so this function is necessary to prevent having to restart the container on every odo pushs

func GetProjectVolumeLabels

func GetProjectVolumeLabels(componentName string) map[string]string

GetProjectVolumeLabels returns the label selectors used to retrieve the project/source volume for a given component

Types

This section is empty.

Jump to

Keyboard shortcuts

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