Skip to content

StatefulSet

Appears in

  • .Values.workload.$name

Notes

Value of workload.$name.podSpec.restartPolicy can only be Always for this type of workload


replicas

Define the number of replicas

Keyworkload.$name.replicas
Typeint
Required
Helm tpl
Default1

Example

workload:
workload-name:
replicas: 1

revisionHistoryLimit

Define the number of history revisions

Keyworkload.$name.revisionHistoryLimit
Typeint
Required
Helm tpl
Default3

Example

workload:
workload-name:
revisionHistoryLimit: 3

strategy

Define the strategy of the workload

Keyworkload.$name.strategy
Typestring
Required
Helm tpl
DefaultRollingUpdate

Valid Values:

  • OnDelete
  • RollingUpdate

Example

workload:
workload-name:
strategy: RollingUpdate

rollingUpdate

Define the rollingUpdate options

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

Example

workload:
workload-name:
rollingUpdate:
maxUnavailable: 1
maxSurge: 1

rollingUpdate.maxUnavailable

Define the maxUnavailable

Keyworkload.$name.rollingUpdate.maxUnavailable
Typeint
Required
Helm tpl
Defaultunset

Example

workload:
workload-name:
rollingUpdate:
maxUnavailable: 1

rollingUpdate.partition

Define the partition

Keyworkload.$name.rollingUpdate.partition
Typeint
Required
Helm tpl
Defaultunset

Example

workload:
workload-name:
rollingUpdate:
partition: 1

Notes:

View common keys of workload in workload Documentation.

Value of workload.[workload-name].podSpec.restartPolicy can only be Always for this type of workload


Full Examples

workload:
workload-name:
enabled: true
primary: true
type: StatefulSet
replicas: 1
revisionHistoryLimit: 3
strategy: RollingUpdate
rollingUpdate:
maxUnavailable: 1
partition: 1
podSpec: {}
other-workload-name:
enabled: true
primary: false
type: StatefulSet
replicas: 1
revisionHistoryLimit: 3
strategy: RollingUpdate
rollingUpdate:
maxUnavailable: 1
partition: 1
podSpec: {}