types

package
v0.0.0-...-a0e73d3 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 0 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	/* Name of the container */
	Name string

	/* URL of the container, eg. gcr.io/google-containers/busybox:latest */
	Image string `yaml:"image"`

	/* Command to run in the container */
	Command []string `yaml:"command"`

	/* Args to be passed to command */
	Args []string `yaml:"args"`

	/* Volumes to be mounted for container */
	VolumeMounts []struct {
		/* Name of the volume to mount */
		Name string `yaml:"name"`
		/* Path on container */
		MountPath string `yaml:"mountPath"`
		/* Should the volume be read-only */
		ReadOnly bool `yaml:"readOnly"`
	} `yaml:"volumeMounts"`

	/* Environment variables to be passed to container */
	Env []struct {
		/* Name of environment variable */
		Name string
		/* Value of environment variable */
		Value string
	}

	/* Container security context */
	SecurityContext SecurityContextDeclaration `yaml:"securityContext"`

	/* Should container have STDIN open */
	StdIn bool

	/* Allocate pseudo-TTY for container */
	Tty bool
}

Structure describing single container

type ContainerSpec

type ContainerSpec struct {
	/* Body of the specification */
	Spec ContainerSpecStruct
}

Structure describing single container

type ContainerSpecStruct

type ContainerSpecStruct struct {
	/* Array of container, must be size 1 */
	Containers []Container

	/* Array of volumes, must correspond to containers */
	Volumes []Volume

	/* Restart policy for containers */
	RestartPolicy *RestartPolicy `yaml:"restartPolicy"`
}

type EmptyDirVolume

type EmptyDirVolume struct {
	// The only currently supported Medium is "Memory"
	Medium string
}

EmptyDirVolume represents an empty directory (hence the name) that can be mounted into a container.

type GcePersistentDiskVolume

type GcePersistentDiskVolume struct {
	PdName    string `yaml:"pdName"`
	FsType    string `yaml:"fsType,omitempty"`
	Partition int    `yaml:"partition,omitempty"`
}

type HostPathVolume

type HostPathVolume struct {
	Path string
}

type RestartPolicy

type RestartPolicy string

RestartPolicy describes how the container should be restarted. Only one of the following restart policies may be specified. If none of the following policies is specified, the default one is RestartPolicyAlways.

const (
	RestartPolicyAlways    RestartPolicy = "Always"
	RestartPolicyOnFailure RestartPolicy = "OnFailure"
	RestartPolicyNever     RestartPolicy = "Never"
)

type SecurityContextDeclaration

type SecurityContextDeclaration struct {
	/* Should container be run in privileged mode */
	Privileged bool
}

type Volume

type Volume struct {
	Name string
	// Only one of EmptyDir, HostPath or GcePersistentDiskVolume should be present
	EmptyDir          *EmptyDirVolume          `yaml:"emptyDir"`
	HostPath          *HostPathVolume          `yaml:"hostPath"`
	GcePersistentDisk *GcePersistentDiskVolume `yaml:"gcePersistentDisk"`
}

Jump to

Keyboard shortcuts

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