-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enhancement(vector): Add persistence.retentionPolicy
for configuring Statefulset PVC retention policy
#347
enhancement(vector): Add persistence.retentionPolicy
for configuring Statefulset PVC retention policy
#347
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good overall. Thank you for testing the changes!
Could you please add a CHANGELOG entry, bump the chart version, and change the PR title to follow conventional commits (e.g., enhancement(vector): ...
)? (ref)
charts/vector/values.yaml
Outdated
# whenScaled: Retain | ||
# ``` | ||
# @type: map | ||
persistentVolumeClaimRetentionPolicy: {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
persistence.persistentVolumeClaimRetentionPolicy
is quite lengthy and redundant. What do you think about naming this persistence.retentionPolicy
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, will do it! The reason of using the whole name is because this is the name of the variable in Kubernetes, but it might be redundant as you said 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello again! I've executed the requested actions, but according to the README, I think they should be executed on develop
after merging into main
.
- Chart is using the latest Vector version, so I didn't bumped it.
- Updated the Chart version in Chart.yaml from
0.29.0
to0.30.0
. - Updated Changelog manually: I've created a new commit (otherwise I can't reference the commit itself in the Changelog)
- I've renamed the variable name as proposed
- I've updated the tests in the description (and I've run them again to validate that it works fine)
- I've updated the commit to include the PR and to be a conventional commit (
enhance(): ...
)
Hope it's fine now! Please let me know if I should run any other action 🙏
Many thanks 😄
persistence.persistentVolumeClaimRetentionPolicy
for configuring Statefulset PVC retention policypersistence.persistentVolumeClaimRetentionPolicy
for configuring Statefulset PVC retention policy
persistence.persistentVolumeClaimRetentionPolicy
for configuring Statefulset PVC retention policypersistence.retentionPolicy
for configuring Statefulset PVC retention policy
316ce26
to
a0295de
Compare
…g Statefulset PVC retention policy (vectordotdev#347)
a0295de
to
f94671a
Compare
…olicy Signed-off-by: Jesse Szwedko <[email protected]>
Signed-off-by: Jesse Szwedko <[email protected]>
Hello! 👋
This PR adds a new variable in the
values.yaml
file:persistence.retentionPolicy
.This allow users to define which is the PVC retention policy for the created Statefulsets. Kubernetes by default sets a
Remain
policy, meaning that no PVC are removed when the Statefulset is down-scaled or removed. With this new setting, users can tell Kubernetes to remove these disks, for example for non production environment.This variable has a default set to
{}
, meaning that this setting will not be applied and Kubernetes will apply its default value, so current statefulsets will not be affected.More info about this new feature here:
https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#persistentvolumeclaim-retention
Some tests
I've run the following commands to ensure that the output is expected:
Using this setting on a K8S cluster below 1.23: Setting do not appear on the rendered statefulset.
Using this setting on a k8s cluster above 1.23: Setting appears on the rendered statefulset.
Using the default value in a k8s cluster above 1.23: Setting do not appear on the rendered statefulset.