Documentation ¶
Overview ¶
Package decorate is a library for adding to a user-provided PodSpec in order to create a full Pod that will fulfill a test job
Index ¶
- func CloneLogPath(logMount kube.VolumeMount) string
- func CloneRefs(pj kube.ProwJob, codeMount, logMount kube.VolumeMount) (*kube.Container, []kube.Refs, []kube.Volume, error)
- func Labels() []string
- func LabelsAndAnnotationsForJob(pj kube.ProwJob) (map[string]string, map[string]string)
- func LabelsAndAnnotationsForSpec(spec kube.ProwJobSpec, extraLabels, extraAnnotations map[string]string) (map[string]string, map[string]string)
- func ProwJobToPod(pj kube.ProwJob, buildID string) (*v1.Pod, error)
- func VolumeMountPaths() []string
- func VolumeMounts() []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloneLogPath ¶
func CloneLogPath(logMount kube.VolumeMount) string
CloneLogPath returns the path to the clone log file in the volume mount.
func CloneRefs ¶
func CloneRefs(pj kube.ProwJob, codeMount, logMount kube.VolumeMount) (*kube.Container, []kube.Refs, []kube.Volume, error)
CloneRefs constructs the container and volumes necessary to clone the refs requested by the ProwJob.
The container checks out repositories specified by the ProwJob Refs to `codeMount`. A log of what it checked out is written to `clone.json` in `logMount`.
The container may need to mount SSH keys and/or cookiefiles in order to access private refs. CloneRefs returns a list of volumes containing these secrets required by the container.
func LabelsAndAnnotationsForJob ¶
LabelsAndAnnotationsForJob returns a standard set of labels to add to pod/build/etc resources.
func LabelsAndAnnotationsForSpec ¶
func LabelsAndAnnotationsForSpec(spec kube.ProwJobSpec, extraLabels, extraAnnotations map[string]string) (map[string]string, map[string]string)
LabelsAndAnnotationsForSpec returns a minimal set of labels to add to prowjobs or its owned resources.
User-provided extraLabels and extraAnnotations values will take precedence over auto-provided values.
func ProwJobToPod ¶
ProwJobToPod converts a ProwJob to a Pod that will run the tests.
func VolumeMountPaths ¶
func VolumeMountPaths() []string
VolumeMountPaths returns a string slice with *MountPath consts in it.
func VolumeMounts ¶
func VolumeMounts() []string
VolumeMounts returns a string slice with *MountName consts in it.
Types ¶
This section is empty.