specs

package
v0.1.13-1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeriveScriptKey

func DeriveScriptKey(path string) string

Given a full path, derive the key from the script name minus the extension

Types

type ContainerSpec

type ContainerSpec struct {
	JobName          string
	Image            string
	Name             string
	WorkingDir       string
	InitContainer    bool
	EntrypointScript EntrypointScript

	// If a command is provided, it's likely an addon (and EntrypointScript is ignored)
	Command []string

	// Does the Container spec need to be written to our set of config maps?
	NeedsWrite bool

	Resources  *api.ContainerResources
	Attributes *api.ContainerSpec
}

A ContainerSpec is used by a metric to define a container Job name and container name allow us to associate a script with a replicated job

type EntrypointScript

type EntrypointScript struct {
	Name   string
	Path   string
	Script string

	// Pre block typically includes metadata
	Pre string

	// This is the main command, provided in case we need to wrap it in something
	Command string

	// Anything after the command!
	Post string
}

Named entrypoint script for a container

func (EntrypointScript) WriteScript

func (e EntrypointScript) WriteScript() string

WriteScript writes the final script, combining the pre, command, and post

type VolumeSpec

type VolumeSpec struct {
	Volume   corev1.Volume
	ReadOnly bool
	Path     string
	Mount    bool
}

VolumeSpec includes one or more volumes and mount, etc. location

Jump to

Keyboard shortcuts

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