resources

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LabelKeyApp          = "app"
	LabelValueFakeJob    = "fake-job"
	LabelValueFakePod    = "fake-pod"
	LabelSelectorFakePod = LabelKeyApp + "=" + LabelValueFakePod
)

Variables

View Source
var (
	// EnvVarCount is the number of envvars in a pod spec.
	EnvVarCount = 5
	// MaxEnvVarSize is the maximum size of an env var in bytes.
	MaxEnvVarSize = 10 * 1024
	// EnvVarsType is the type of env vars that should be used when creating fake pods (nano, micro, xsmall...).
	EnvVarsType = newEnvVars(EnvVarCount, 2*1024, "SOME_ENV_VAR_MEDIUM")
)

Functions

func GetEnvVars added in v0.2.4

func GetEnvVars(envVarType string) []corev1.EnvVar

func GetRandomEnvVarType added in v0.2.3

func GetRandomEnvVarType() []corev1.EnvVar

func NewFakeJob

func NewFakeJob(name, namespace string, randomEnvVars bool) *batchv1.Job

NewFakeJob creates a fake Kubernetes Job resource, managed by KWOK, with the specified name and namespace.

func NewFakeNode

func NewFakeNode(nodeName string) *corev1.Node

NewFakeNode creates a fake Kubernetes Node resource, managed by KWOK, with the specified name.

func NewFakePod

func NewFakePod(name, namespace string, randomEnvVars bool) *corev1.Pod

NewFakePod creates a fake Kubernetes Pod resource, managed by KWOK, with the specified name and namespace.

func SetDefaultEnvVarsType added in v0.1.0

func SetDefaultEnvVarsType(envVarType string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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