Skip to content

Conversation

@GenLN
Copy link

@GenLN GenLN commented Jan 26, 2026

Description

Currently, when a user increases the storage size in the dataVolumeClaimTemplate of a VitessCluster CRD, the operator correctly updates the underlying PVC, but it does not trigger a rolling restart of the vttablet pods.

In many Kubernetes environments and storage classes, a pod restart is required for the file system to recognize the new capacity of the volume. Without this restart, the MySQL process inside vttablet might continue to see the old disk size.

Changes

  • Added AddString method to pkg/operator/desiredstatehash/desiredstatehash.go to allow hashing of simple string values.
  • Updated pkg/operator/vttablet/pod.go to include the storage request size from DataVolumePVCSpec in the tablet's desired state hash.

This change ensures that whenever the storage size is modified, the operator will perform a safe rolling restart (using the standard Vitess drain logic) to apply the changes.

Signed-off-by: genln <jelica.josip@gmail.com>
Copy link
Collaborator

@mattlord mattlord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @GenLN ! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants