# Functions
FakeNew creates new fake client for testing returns Client that is filled with fake clients and FakeClientSet that holds fake Clientsets to access Actions, Reactors etc..
FetchContainerResourceLimits returns cpu and memory resource limits of the component container from the passed dc Parameter: container: Component container Returns: resource limits from passed component container.
FindContainer finds the container.
GenerateOwnerReference genertes an ownerReference which can then be set as owner for various OpenShift objects and ensure that when the owner object is deleted from the cluster, all other objects are automatically removed by OpenShift garbage collector.
GetInputEnvVarsFromStrings generates corev1.EnvVar values from the array of string key=value pairs envVars is the array containing the key=value pairs.
GetResourceRequirementsFromCmpSettings converts the cpu and memory request info from component configuration into format usable in dc Parameters: cfg: Compoennt configuration/settings Returns: *corev1.ResourceRequirements: component configuration converted into format usable in dc.
GetS2IEnvForDevfile gets environment variable for builder image to be added in devfiles.
GetS2IMetaInfoFromBuilderImg returns script path protocol, S2I scripts path, S2I source or binary expected path, S2I deployment dir and errors(if any) from the passed builder image.
HasTag checks to see if there is a tag in a list of over tags..
IsDCRolledOut indicates whether the deployment config is rolled out or not Borrowed from https://github.com/openshift/origin/blob/64349ed036ed14808124c5b4d8538b3856783b54/pkg/oc/originpolymorphichelpers/deploymentconfigs/status.go.
New creates a new client.
ParseImageName parse image reference returns (imageNamespace, imageName, tag, digest, error) if image is referenced by tag (name:tag) than digest is "" if image is referenced by digest (name@digest) than tag is "".
# Constants
ComponentPortAnnotationName annotation is used on the secrets that are created for each exposed port of the component.
No description provided by the author
DefaultS2ISrcBackupDir is the default path where odo backs up the component source.
DefaultS2ISrcOrBinPath is the default path where S2I expects source/binary artifacts in absence of $S2ISrcOrBinLabel in builder image Ref: https://github.com/openshift/source-to-image/blob/master/docs/builder_image.md#required-image-contents.
EnvS2IBuilderImageName is the label that provides the name of builder image in component.
EnvS2IDeploymentDir is an env var exposed to https://github.com/openshift/odo-init-image/blob/master/assemble-and-restart to indicate s2i deployment directory.
EnvS2IScriptsProtocol is an env var exposed to https://github.com/openshift/odo-init-image/blob/master/assemble-and-restart to indicate the way to access location of s2i scripts indicated by ${${EnvS2IScriptsURL}} above.
EnvS2IScriptsURL is an env var exposed to https://github.com/openshift/odo-init-image/blob/master/assemble-and-restart to indicate location of s2i scripts in this case assemble script.
EnvS2ISrcBackupDir is the env var that points to the directory that holds a backup of component source This is required bcoz, s2i assemble script moves(hence deletes contents) the contents of $ODO_S2I_SRC_BIN_PATH to $APP_ROOT during which $APP_DIR alo needs to be empty so that mv doesn't complain pushing to an already exisiting dir with same name.
EnvS2ISrcOrBinPath is an env var exposed by s2i to indicate where the builder image expects the component source or binary to reside.
EnvS2IWorkingDir is an env var to odo-init-image assemble-and-restart.sh to indicate to it the s2i working directory.
No description provided by the author
No description provided by the author
S2IBuilderImageName is the S2I builder image name.
S2IScriptsURLLabel S2I script location Label name Ref: https://docs.openshift.com/enterprise/3.2/creating_images/s2i.html#build-process.
S2ISrcOrBinLabel is the label that provides, path where S2I expects component source or binary.
# Variables
No description provided by the author
No description provided by the author
S2IDeploymentsDir is a set of possible S2I labels that provides S2I deployments directory This label is not uniform across different builder images.
# Structs
No description provided by the author
CommonImageMeta has all the most common image data that is passed around within Odo.
CreateArgs is a container of attributes of component create action.
FakeClientset holds fake ClientSets this is returned by FakeNew to access methods of fake client sets.
S2IPaths is a struct that will hold path to S2I scripts and the protocol indicating access to them, component source/binary paths, artifacts deployments directory These are passed as env vars to component pod.
ServerInfo contains the fields that contain the server's information like address, OpenShift and Kubernetes versions.
No description provided by the author
UpdateComponentParams serves the purpose of holding the arguments to a component update request.