The following contains a list of capacity_requirements properties available if deployed within a Kubernetes environment.

The following properties are specific to the container-v1-core and podspec-v1-core from Kubernetes version 1.24.

Two special properties are provided container_spec_field_overrides and pod_spec_field_overrides for specifying fields that may come in future Kubernetes specs.

Container core properties

Property

Type

Description

container_spec_field_overrides

Dict<string,any>

Special property that does not apply to any particular Kubernetes field, instead this can used to inject fields that may be added in future Kubernetes releases.

[job.sample-job.capacity_requirements.container_spec_field_overrides]
futureKuberneteContainerCoreField = "foobar"

env

Array<Dict<string,any>>

List of environment variables to set in the job’s container pod env.

[[job.sample-job.capacity_requirements.env]]
name = "foo"
value = "bar"

env_from

Array<Dict<string,any>>

List of sources to populate environment variables in the job’s container pod env from.

[[job.sample-job.capacity_requirements.envFrom]]
[job.sample-job.capacity_requirements.envFrom.configMapRef]
name = "sample-config"

image_pull_policy

string

The image pull policy for the job’s container image image pull policy.

[job.sample-job.capacity_requirements]
image_pull_policy = "Always"

lifecycle

Dict<string,any>

Specify the job’s container lifecycle lifecycle.

[job.sample-job.capacity_requirements.lifecycle.postStart.exec]
command = [
 "/bin/sh",
 "-c",
 "echo Hello from the postStart handler > /usr/share/message"
]

[job.sample-job.capacity_requirements.lifecycle.preStop.exec]
command = [
 "/bin/sh",
 "-c",
 "sleep 1"
]

liveness_probe

Dict<string,any>

Specify the job’s container pod liveness probe.

[job.sample-job.capacity_requirements.liveness_probe]
  [job.sample-job.capacity_requirements.liveness_probe.httpGet]
  path = "/status"
  port = "http"

ports

Array<Dict<string,any>>

Specify the job’s container pod container ports.

[[job.sample-job.capacity_requirements.ports]]
name = "http"
containerPort = 80
protocol = "TCP"

resource_limits

Dict<string,any>

Specify the job’s container pod resource limits. Refer to resource units for acceptable units.

[job.sample-job.capacity_requirements.resource_limits]
cpu = 1
memory = "4096Mi"
"nvidia.com/gpu" = 1

readiness_probe

Dict<string,any>

Specify the job’s container pod readiness probe.

[job.sample-job.capacity_requirements.readiness_probe]
  [job.sample-job.capacity_requirements.readiness_probe.httpGet]
  path = "/status"
  port = "http"

security_context

Dict<string,any>

Specify the job’s container pod, security context.

[job.sample-job.capacity_requirements.security_context]
runAsUser = 2000
allowPrivilegeEscalation = false

startup_probe

Dict<string,any>

Specify the job’s container pod startup probe.

[job.sample-job.capacity_requirements.startup_probe]
  [job.sample-job.capacity_requirements.startup_probe.httpGet]
  path = "/status"
  port = "http"

stdin

boolean

Control whether the job’s container should allocate a buffer for stdin in the container runtime stdin.

[job.sample-job.capacity_requirements]
stdin = true

stdin_once

boolean

Control whether the job’s container runtime should close the stdin channel after it has been opened by a single attach stdin once.

[job.sample-job.capacity_requirements]
stdin_once = false

termination_message_path

string

Path at which the file to which the container’s termination message will be written is mounted into the container’s filesystem termination message path.

[job.sample-job.capacity_requirements]
termination_message_path = "/dev/termination-log"

termination_message_policy

string

Indicate how the termination message should be populated termination message policy.

[job.sample-job.capacity_requirements]
termination_message_policy = "File"

tty

boolean

Control whether the job’s container should allocate a TTY for itself, also requires ‘stdin’ to be true tty.

[job.sample-job.capacity_requirements]
tty = true

volume_devices

Array<Dict<string,any>>

Specify the job’s container pod volume devices volume devices.

[[job.sample-job.capacity_requirements.volume_devices]]
devicePath = "/myrawblockdevice"
name = "blockDevicePvc"

volume_mounts

Array<Dict<string,any>>

Specify the job’s container pod volume mounts.

[[job.sample-job.capacity_requirements.volume_mounts]]
mountPath = "/root/.provider/"
name = "creds"
Pod Spec Properties

Property

Type

Description

pod_spec_field_overrides

Dict<string,any>

Special property that does not apply to any particular Kubernetes field, instead this can used to inject fields that may be added in future Kubernetes releases.

[job.sample-job.capacity_requirements.pod_spec_field_overrides]
futureKubernetesPodSpecField = "foobar"

active_deadline_seconds

integer

Duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers active deadline seconds.

[job.sample-job.capacity_requirements]
active_deadline_seconds = 30

affinity

Dict<string,any>

Specify the job’s container pod affinity.

[[job.sample-job.capacity_requirements.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms]]
[[job.sample-job.capacity_requirements.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms.matchExpressions]]
key = "name"
operator = "In"
values = [ "worker-node" ]

[[job.sample-job.capacity_requirements.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution]]
weight = 1

[[job.sample-job.capacity_requirements.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution.preference.matchExpressions]]
key = "type"
operator = "In"
values = [ "01" ]

automount_service_account_token

boolean

Indicate whether a service account token should be automatically mounted automount service account token.

[job.sample-job.capacity_requirements]
active_deadline_seconds = 30

dns_config

Dict<string,any>

Specifies the DNS parameters of the job’s container pod dns config.

[job.sample-job.capacity_requirements.dnsConfig]
nameservers = [ "1.2.3.4" ]
searches = [ "ns1.svc.cluster-domain.example", "my.dns.search.suffix" ]

[[job.sample-job.capacity_requirements.dnsConfig.options]]
name = "ndots"
value = "2"

[[job.sample-job.capacity_requirements.dnsConfig.options]]
name = "edns0"

dns_policy

Dict<string,any>

Set DNS policy for the job’s container pod dns policy.

[job.sample-job.capacity_requirements]
dns_policy = "ClusterFirst"

enable_service_links

boolean

Indicates whether information about services should be injected into pod’s environment variables enable service links.

[job.sample-job.capacity_requirements]
enable_service_links = true

ephemeral_containers

Array<Dict<string,any>>

List of ephemeral containers run in the job’s container pod. ephemeral containers.

host_aliases

Array<Dict<string,any>>

List of hosts and IPs that will be injected into the pod’s hosts file if specified. This is only valid for non-hostNetwork pods. host aliases.

host_IPC

boolean

Use the host’s IPC namespace host IPC.

host_network

boolean

Host networking requested for the job’s container pod host network.

host_PID

boolean

Use the host’s PID namespace host PID.

hostname

string

Specifies the hostname of the Pod hostname.

image_pull_secrets

Array<Dict<string,any>>

List of references to secrets in the same namespace to use for pulling any of the images image pull secrets.

[[job.sample-job.capacity_requirements.imagePullSecrets]]
name = "registry-secret"

init_containers

Array<Dict<string,any>>

List of initialization containers init containers.

node_name

string

Node name is a request to schedule this pod onto a specific node node name.

node_selector

Dict<string,string>

Selector which must be true for the pod to fit on a node node selector.

[job.sample-job.capacity_requirements.node_selector]
"beta.kubernetes.io/instance-type" = "worker"
"beta.kubernetes.io/os" = "linux"

os

Dict<string,string>

Specifies the OS of the containers in the pod os.

overhead

Dict>string,any>

Overhead represents the resource overhead associated with running a pod for a given RuntimeClass overhead.

preemption_policy

string

Policy for preempting pods with lower priority preemption policy.

priority

string

Priority value priority.

priority_class_name

string

Indicate the pod’s priority priority class name.

readiness_gates

Array<Dict<string,any>>

Pod’s readiness gates.

runtime_class_name

string

Set the pod’s runtime class name.

scheduler_name

string

Specific scheduler to dispatch the pod scheduler name.

pod_security_context

Dict<string,any>

Specify the job’s container pod, pod security context.

[job.sample-job.capacity_requirements.pod_security_context]
runAsUser = 1000

service_account

string

Set the pod’s service account.

service_account_name

string

Name of the service account to use to run this pod service account name.

set_hostname_as_FQDN

boolean

The pod’s hostname will be configured as the pod’s FQDN set hostname as FQDN.

share_process_namespace

boolean

Share a single process namespace between all of the containers in a pod share process namespace.

subdomain

string

Specify the pod’s subdomain.

termination_grace_period_seconds

integer

Duration in seconds the pod needs to terminate gracefully termination grace period seconds.

tolerations

Array<Dict<string,any>>

Specify the job’s container pod tolerations.

[[job.sample-job.capacity_requirements.tolerations]]
key = "key1"
operator = "Equal"
value = "value1"
effect = "NoSchedule"

topology_spread_constraints

Array<Dict<string,any>>

Topology domain constraints see details.

volumes

Array<Dict<string,any>>

Specify the job’s container pod volumes. Refer to volumes for more examples and valid fields. The follow is an example of mounting a config map.

[[job.sample-job.capacity_requirements.volumes]]
name = "creds"
  [job.sample-job.capacity_requirements.volumes.configMap]
  name = "credentials-cm"