Skip to content

Workload

Appears in

  • .Values.workload

Naming scheme

  • Primary: $FullName (release-name-chart-name)
  • Non-Primary: $FullName-$WorkloadName (release-name-chart-name-workload-name)

workload

Define workload objects

Keyworkload
Typemap
Required
Helm tpl
Default{}

Example

workload: {}

$name

Define workload

Keyworkload.$name
Typemap
Required
Helm tpl
Default{}

Example

workload:
workload-name: {}

enabled

Enable or disable workload

Keyworkload.$name.enabled
Typebool
Required
Helm tpl
Defaultfalse

Example

workload:
workload-name:
enabled: true

primary

Set workload as primary

Keyworkload.$name.primary
Typebool
Required
Helm tpl
Defaultfalse

Example

workload:
workload-name:
primary: true

labels

Define labels for workload

Keyworkload.$name.labels
Typemap
Required
Helm tpl✅ (On value only)
Default{}

Example

workload:
workload-name:
labels:
key: value

annotations

Define annotations for workload

Keyworkload.$name.annotations
Typemap
Required
Helm tpl✅ (On value only)
Default{}

Example

workload:
workload-name:
annotations:
key: value

namespace

Define the namespace for this object

Keyworkload.$name.namespace
Typestring
Required
Helm tpl✅ (On value only)
Default""

Example

workload:
workload-name:
namespace: some-namespace

type

Define the kind of the workload

Keyworkload.$name.type
Typestring
Required
Helm tpl
Default""

Valid values

Example

workload:
workload-name:
type: Deployment

podSpec

Define the podSpec for the workload

Keyworkload.$name.podSpec
Typemap
Required
Helm tpl
Default{}

Example

workload:
workload-name:
podSpec: {}

labels

Define labels for podSpec

Keyworkload.$name.podSpec.labels
Typemap
Required
Helm tpl✅ (On value only)
Default{}

Example

workload:
workload-name:
podSpec:
labels:
key: value

annotations

Define annotations for podSpec

Keyworkload.$name.podSpec.annotations
Typemap
Required
Helm tpl✅ (On value only)
Default{}

Example

workload:
workload-name:
podSpec:
annotations:
key: value

automountServiceAccountToken

Pod’s automountServiceAccountToken

Keyworkload.$name.podSpec.automountServiceAccountToken
Typebool
Required
Helm tpl
DefaultSee default here

Example

workload:
workload-name:
podSpec:
automountServiceAccountToken: true

hostNetwork

Bind pod to host’s network

Keyworkload.$name.podSpec.hostNetwork
Typebool
Required
Helm tpl
DefaultSee default here

Example

workload:
workload-name:
podSpec:
hostNetwork: true
hostPID

Allow pod to access host’s PID namespace

Keyworkload.$name.podSpec.hostPID
Typebool
Required
Helm tpl
DefaultSee default here

Example

workload:
workload-name:
podSpec:
hostPID: true

hostIPC

Allow pod to access host’s IPC namespace

Keyworkload.$name.podSpec.hostIPC
Typebool
Required
Helm tpl
DefaultSee default here

Example

workload:
workload-name:
podSpec:
hostIPC: true

hostUsers

Allow pod to access host’s users namespace

Keyworkload.$name.podSpec.hostUsers
Typebool
Required
Helm tpl
DefaultSee default here

Example

workload:
workload-name:
podSpec:
hostUsers: true

shareProcessNamespace

Share Process Namespace with other containers in the pod

Keyworkload.$name.podSpec.shareProcessNamespace
Typebool
Required
Helm tpl
DefaultSee default here

Example

workload:
workload-name:
podSpec:
shareProcessNamespace: true

Pod’s enableServiceLinks

Keyworkload.$name.podSpec.enableServiceLinks
Typebool
Required
Helm tpl
DefaultSee default here

Example

workload:
workload-name:
podSpec:
enableServiceLinks: true

restartPolicy

Pod’s restartPolicy

Keyworkload.$name.podSpec.restartPolicy
Typestring
Required
Helm tpl
DefaultSee default here

Valid values

  • Always
  • Never
  • OnFailure

Example

workload:
workload-name:
podSpec:
restartPolicy: OnFailure

schedulerName

Pod’s schedulerName

Keyworkload.$name.podSpec.schedulerName
Typestring
Required
Helm tpl
DefaultSee default here

Example

workload:
workload-name:
podSpec:
schedulerName: some-scheduler

priorityClassName

Pod’s priorityClassName

Keyworkload.$name.podSpec.priorityClassName
Typestring
Required
Helm tpl
DefaultSee default here

Example

workload:
workload-name:
podSpec:
priorityClassName: some-priority-class-name

hostname

Pod’s hostname

Keyworkload.$name.podSpec.hostname
Typestring
Required
Helm tpl
Default""

Example

workload:
workload-name:
podSpec:
hostname: some-hostname

terminationGracePeriodSeconds

Pod’s terminationGracePeriodSeconds

Keyworkload.$name.podSpec.terminationGracePeriodSeconds
Typeint
Required
Helm tpl
DefaultSee default here

Example

workload:
workload-name:
podSpec:
terminationGracePeriodSeconds: 100

nodeSelector

Pod’s nodeSelector

Keyworkload.$name.podSpec.nodeSelector
Typemap
Required
Helm tpl✅ (On value only)
DefaultSee default here

Example

workload:
workload-name:
podSpec:
nodeSelector:
disk_type: ssd

topologySpreadConstraints

Pod’s topologySpreadConstraints

Keyworkload.$name.podSpec.topologySpreadConstraints
Typelist of map
Required
Helm tpl
DefaultSee default here

hostAliases

Pod’s hostAliases

Keyworkload.$name.podSpec.hostAliases
Typelist of map
Required
Helm tpl
DefaultSee default here

Example

workload:
workload-name:
podSpec:
hostAliases: []

ip

Pod’s hostAliases ip

Keyworkload.$name.podSpec.hostAliases.ip
Typestring
Required
Helm tpl
Default""

Example

workload:
workload-name:
podSpec:
hostAliases:
- ip: 1.2.3.4

hostnames

Pod’s hostAliases hostnames

Keyworkload.$name.podSpec.hostAliases.hostnames
Typelist of string
Required
Helm tpl✅ (On each entry)
Default[]

Example

workload:
workload-name:
podSpec:
hostAliases:
- ip: 1.2.3.4
hostnames:
- myserver.local
- storage.local

dnsPolicy

Pod’s dnsPolicy

Keyworkload.$name.podSpec.dnsPolicy
Typestring
Required
Helm tpl
DefaultSee default here

Valid values

  • None
  • Default
  • ClusterFirst
  • ClusterFirstWithHostNet

Example

workload:
workload-name:
podSpec:
dnsPolicy: ClusterFirst

dnsConfig

Pod’s dnsConfig

Keyworkload.$name.podSpec.dnsConfig
Typemap
Required
Helm tpl
DefaultSee default here

Example

workload:
workload-name:
podSpec:
dnsConfig: {}

dnsConfig.nameservers

Pod’s dnsConfig nameservers

Keyworkload.$name.podSpec.dnsConfig.nameservers
Typelist of string
Required
Helm tpl✅ (On each entry)
Default[]

Example

workload:
workload-name:
podSpec:
dnsConfig:
nameservers:
- 1.1.1.1

dnsConfig.searches

Pod’s dnsConfig searches

Keyworkload.$name.podSpec.dnsConfig.searches
Typelist of string
Required
Helm tpl✅ (On each entry)
Default[]

Example

workload:
workload-name:
podSpec:
dnsConfig:
searches:
- ns1.svc.cluster-domain.example

dnsConfig.options

Pod’s dnsConfig options

Keyworkload.$name.podSpec.dnsConfig.options
Typelist of map
Required
Helm tpl
Default[{"ndots": "1"}]

Example

workload:
workload-name:
podSpec:
dnsConfig:
options: []

dnsConfig.options.name

Pod’s dnsConfig options name

Keyworkload.$name.podSpec.dnsConfig.options.name
Typestring
Required
Helm tpl
Default""

Example

workload:
workload-name:
podSpec:
dnsConfig:
options:
- name: ndots
value: "1"

dnsConfig.options.value

Pod’s dnsConfig options value

Keyworkload.$name.podSpec.dnsConfig.options.value
Typestring
Required
Helm tpl
Default""

Example

workload:
workload-name:
podSpec:
dnsConfig:
options:
- name: ndots
value: "1"

tolerations

Pod’s tolerations

Keyworkload.$name.podSpec.tolerations
Typelist of map
Required
Helm tpl
DefaultSee default here

Example

workload:
workload-name:
podSpec:
tolerations: []

tolerations.operator

Pod’s tolerations operator

Keyworkload.$name.podSpec.tolerations.operator
Typestring
Required
Helm tpl
Default""

Valid values

  • Equal
  • Exists

Example

workload:
workload-name:
podSpec:
tolerations:
- operator: Exists

tolerations.key

Pod’s tolerations key

Keyworkload.$name.podSpec.tolerations.key
Typestring
Required❌/✅
Helm tpl
Default""

Example

workload:
workload-name:
podSpec:
tolerations:
- operator: Equal
key: key

tolerations.value

Pod’s tolerations value

Keyworkload.$name.podSpec.tolerations.value
Typestring
Required❌/✅
Helm tpl
Default""

Example

workload:
workload-name:
podSpec:
tolerations:
- operator: Equal
key: key
value: value

tolerations.effect

Pod’s tolerations effect

Keyworkload.$name.podSpec.tolerations.effect
Typestring
Required
Helm tpl
Default""

Valid values

  • NoExecute
  • NoSchedule
  • PreferNoSchedule

Example

workload:
workload-name:
podSpec:
tolerations:
- operator: Exists
effect: NoExecute

tolerations.tolerationSeconds

Pod’s tolerations tolerationSeconds

Keyworkload.$name.podSpec.tolerations.tolerationSeconds
Typeint
Required
Helm tpl
Defaultunset

Example

workload:
workload-name:
podSpec:
tolerations:
- operator: Exists
effect: NoExecute
tolerationSeconds: 3600

runtimeClassName

Pod’s runtimeClassName

Keyworkload.$name.podSpec.runtimeClassName
Typestring
Required
Helm tpl
DefaultSee default here

Example

workload:
workload-name:
podSpec:
runtimeClassName: some-runtime-class

securityContext

Pod’s securityContext

Keyworkload.$name.podSpec.securityContext
Typemap
Required
Helm tpl
DefaultSee default here

Default

securityContext:
pod:
fsGroup: 568
fsGroupChangePolicy: OnRootMismatch
supplementalGroups:
- 568

Example

workload:
workload-name:
podSpec:
securityContext: {}

securityContext.fsGroup

Pod’s securityContext fsGroup

Keyworkload.$name.podSpec.securityContext.fsGroup
Typeint
Required
Helm tpl
DefaultSee default here

Example

workload:
workload-name:
podSpec:
securityContext:
fsGroup: 568

securityContext.fsGroupChangePolicy

Pod’s securityContext fsGroupChangePolicy

Keyworkload.$name.podSpec.securityContext.fsGroupChangePolicy
Typestring
Required
Helm tpl
DefaultSee default here

Valid values

  • Always
  • OnRootMismatch

Example

workload:
workload-name:
podSpec:
securityContext:
fsGroupChangePolicy: OnRootMismatch

securityContext.supplementalGroups

Pod’s securityContext supplementalGroups

Keyworkload.$name.podSpec.securityContext.supplementalGroups
Typelist of int
Required
Helm tpl
DefaultSee default here

Example

workload:
workload-name:
podSpec:
securityContext:
supplementalGroups:
- 568

securityContext.sysctls
Keyworkload.$name.podSpec.securityContext.sysctls
Typelist of map
Required
Helm tpl
DefaultSee default here

Example

workload:
workload-name:
podSpec:
securityContext:
sysctls: []

securityContext.sysctls.name

Pod’s securityContext sysctls name

Keyworkload.$name.podSpec.securityContext.sysctls.name
Typestring
Required
Helm tpl
Default""

Example

workload:
workload-name:
podSpec:
securityContext:
sysctls:
- name: net.ipv4.ip_local_port_range
value: 1024 65535

securityContext.sysctls.value

Pod’s securityContext sysctls value

Keyworkload.$name.podSpec.securityContext.sysctls.value
Typestring
Required
Helm tpl
Default""

Example

workload:
workload-name:
podSpec:
securityContext:
sysctls:
- name: net.ipv4.ip_local_port_range
value: 1024 65535

containers

Define container(s) for the workload

See Container for more information

Keyworkload.$name.containers
Typemap
Required
Helm tpl
Default{}

Example

workload:
workload-name:
containers: {}

initContainers

Define initContainer(s) for the workload

See Container for more information

Keyworkload.$name.initContainers
Typemap
Required
Helm tpl
Default{}

Example

workload:
workload-name:
initContainers: {}

Full Examples

workload:
workload-name:
enabled: true
primary: true
namespace: some-namespace
labels:
key: value
annotations:
key: value
podSpec:
labels:
key: value
annotations:
key: value
automountServiceAccountToken: true
hostNetwork: false
hostPID: false
shareProcessNamespace: false
enableServiceLinks: false
schedulerName: some-scheduler
priorityClassName: some-priority-class-name
hostname: some-hostname
terminationGracePeriodSeconds: 100
nodeSelector:
disk_type: ssd
hostAliases:
- ip: 10.10.10.100
hostnames:
- myserver.local
- storage.local
- ip: 10.10.10.101
hostnames:
- myotherserver.local
- backups.local
dnsPolicy: ClusterFirst
dnsConfig:
nameservers:
- 1.1.1.1
- 1.0.0.1
searches:
- ns1.svc.cluster-domain.example
- my.dns.search.suffix
options:
- name: ndots
value: "1"
- name: edns0
tolerations:
- operator: Exists
effect: NoExecute
tolerationSeconds: 3600
runtimeClassName: some-runtime-class
securityContext:
fsGroup: 568
fsGroupChangePolicy: OnRootMismatch
supplementalGroups:
- 568
sysctls:
- name: net.ipv4.ip_local_port_range
value: 1024 65535

Full examples for each workload type can be found here