-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Labels
Description
Kubernetes StatefulSet itself doesn't allow volumes to be added to StatefulSets after their initial creation.
Trying to add a volume, results in this error:
Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden
The same limitation is encountered via operator.
- create StatefulSet by setting:
spec:
statefulSet: {}
- try to add a volume to it
spec.
statefulSet:
storage:
size: 100Mi
mountPath: /logs
Tasks:
- understand the reasons behind StatefulSet not supporting
- if it's not an anti-pattern to add volume afterwards, support adding it via operator. StatefulSet probably have to be deleted and recreated (meaning there will be some downtime)