Skip to content

Conversation

@chengjoey
Copy link
Contributor

@chengjoey chengjoey commented Jul 22, 2025

Ⅰ. Describe what this PR does

  1. add kep for volumeClaimTemplate ads
  2. create pvc and update volumeMount before create pod
  3. add validation for ads volumeClaimTemplate

Ⅱ. Does this pull request fix one issue?

feat: #2112

Ⅲ. Describe how to verify it

unit-test\e2e-test

Ⅳ. Special notes for reviews

TODO: add PersistentVolumeClaimRetentionPolicy

@kruise-bot kruise-bot requested review from veophi and zmberg July 22, 2025 09:27
@kruise-bot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign veophi for approval by writing /assign @veophi in a comment. For more information see:The Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kruise-bot kruise-bot added the size/XL size/XL: 500-999 label Jul 22, 2025
@chengjoey chengjoey force-pushed the feat/ads-volumeTemplate branch from db4390f to b6c3b54 Compare July 22, 2025 10:03
@codecov
Copy link

codecov bot commented Jul 22, 2025

Codecov Report

❌ Patch coverage is 30.40541% with 103 lines in your changes missing coverage. Please review.
✅ Project coverage is 44.56%. Comparing base (6547800) to head (b6c3b54).
⚠️ Report is 25 commits behind head on master.

Files with missing lines Patch % Lines
pkg/controller/daemonset/daemonset_util.go 20.51% 57 Missing and 5 partials ⚠️
pkg/util/object_manager.go 0.00% 27 Missing ⚠️
pkg/controller/daemonset/daemonset_controller.go 16.66% 10 Missing ⚠️
...bhook/daemonset/validating/daemonset_validation.go 86.20% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2115      +/-   ##
==========================================
+ Coverage   44.28%   44.56%   +0.27%     
==========================================
  Files         316      319       +3     
  Lines       31859    32365     +506     
==========================================
+ Hits        14110    14424     +314     
- Misses      16339    16511     +172     
- Partials     1410     1430      +20     
Flag Coverage Δ
unittests 44.56% <30.40%> (+0.27%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

### Implementation Details/Notes/Constraints

We should consider whether to delete the PVC when a node is deleted, and whether to delete the PVC when the ads is deleted.
We can add a `PersistentVolumeClaimRetentionPolicy`, with optional values of `Retain` and `Delete`, the default being `Retain`.
Copy link
Member

Choose a reason for hiding this comment

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

i think the default policy should be delete, since there is no easy way to reuse the pvc if the node is deleted.

Copy link
Member

Choose a reason for hiding this comment

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

in addition, we have to introduce a label to match pod and related pvc. In cloneset, pod and pvc with the same apps.kruise.io/cloneset-instance-id will be mounted.

Copy link
Member

Choose a reason for hiding this comment

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

can we have a discussion in the community call this week ?

@kruise-bot
Copy link

@chengjoey: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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

Labels

needs-rebase size/XL size/XL: 500-999

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants