forked from elastic/cloud-on-k8s
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add resize volume functionality to Logstash operator (elastic#7519)
This adds support for expanding Logstash volumes by editing the storage requests in spec.VolumeClaimTemplate, based on the existing implenentation in Elasticsearch implemented in elastic#3752. The same constraints hold - * Volume size can only be increased, not decreased * Storage class must specify allowVolumeExpansion: true * Filesystem resize without pod recreation is only possible if the storage driver allows it This is based on the Elasticsearch implementation An update of the storage request in the volumeClaimTemplate will * Update the storage requests spec of all existing PVCs: they are immediately resized by the storage driver, if inline expansion is supported. Otherwise Pods need to be recreated. * Delete the StatefulSet, but not the pod that it owns, storing recreation details in an annotation on the owning Logstash resource * Recreate the StatefulSet with the new volumeClaimTemplate spec * Remove the recreation annotation from the Logstash resource This also reworks the webhook validation to validate that storage updates fulfill the requirements (only increasing storage, using a valid storage class that allows storage expansion). This required moving the webhook validation into the controller package to allow use of the k8sclient without a dependency cycle, and requires some rework in webhook registration --------- Co-authored-by: Karen Metts <[email protected]> Co-authored-by: Peter Brachwitz <[email protected]>
- Loading branch information
1 parent
2812125
commit 6d681b3
Showing
78 changed files
with
3,258 additions
and
1,503 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.