Skip to content
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

Helm: keep the data PersistentVolumeClaim after uninstall #7123

Merged
merged 1 commit into from
Nov 10, 2023

Conversation

SpecLad
Copy link
Contributor

@SpecLad SpecLad commented Nov 10, 2023

Motivation and context

Currently, Helm will delete the PVC when you uninstall your CVAT release, which makes it easy to unintentionally lose data. Add a helm.sh/resource-policy annotation to prevent that from happening.

This makes the data PVC consistent with the other PVCs created as part of the Helm chart (ones belonging to PostgreSQL, KeyDB and Clickhouse), which are also not deleted upon uninstall, albeit for a different reason: they are created by the corresponding StatefulSets, and StatefulSets retain their volumes when they are deleted.

How has this been tested?

I installed and uninstalled the chart, and verified that the PVC stayed behind.

Checklist

  • I submit my changes into the develop branch
  • I have created a changelog fragment
  • [ ] I have updated the documentation accordingly
  • [ ] I have added tests to cover my changes
  • [ ] I have linked related issues (see GitHub docs)
  • [ ] I have increased versions of npm packages if it is necessary
    (cvat-canvas,
    cvat-core,
    cvat-data and
    cvat-ui)

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.

Currently, Helm will delete the PVC when you uninstall your CVAT release,
which makes it easy to unintentionally lose data. Add a
`helm.sh/resource-policy` annotation to prevent that from happening.

This makes the data PVC consistent with the other PVCs created as part of
the Helm chart (ones belonging to PostgreSQL, KeyDB and Clickhouse), which
are also not deleted upon uninstall, albeit for a different reason: they are
created by the corresponding StatefulSets, and StatefulSets retain their
volumes when they are deleted.
@SpecLad SpecLad marked this pull request as ready for review November 10, 2023 11:52
Copy link

codecov bot commented Nov 10, 2023

Codecov Report

Merging #7123 (8dafd55) into develop (5392763) will increase coverage by 0.15%.
Report is 9 commits behind head on develop.
The diff coverage is 68.34%.

@@             Coverage Diff             @@
##           develop    #7123      +/-   ##
===========================================
+ Coverage    82.43%   82.58%   +0.15%     
===========================================
  Files          361      362       +1     
  Lines        39310    39264      -46     
  Branches      3591     3578      -13     
===========================================
+ Hits         32405    32426      +21     
+ Misses        6905     6838      -67     
Components Coverage Δ
cvat-ui 77.76% <100.00%> (+0.33%) ⬆️
cvat-server 86.95% <67.18%> (-0.07%) ⬇️

@SpecLad SpecLad merged commit 6eb3ef4 into cvat-ai:develop Nov 10, 2023
43 checks passed
@SpecLad SpecLad deleted the helm-keep-pvc branch November 10, 2023 16:41
This was referenced Nov 22, 2023
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