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

Feat: Support specify disk owner #681

Merged
merged 4 commits into from Mar 16, 2023
Merged

Feat: Support specify disk owner #681

merged 4 commits into from Mar 16, 2023

Conversation

SSmallMonster
Copy link
Member

@SSmallMonster SSmallMonster commented Mar 9, 2023

What this PR does / why we need it:

To support custom storage system use disks by LocalDiskClaim

Special notes for your reviewer:

How to use?
  1. Apply LocalDiskClaim and specify its owner (For admin)
$ cat << EOF | kubectl apply  -f -
apiVersion: hwameistor.io/v1alpha1
kind: LocalDiskClaim
metadata:
  name: localdiskclaim-sample
spec:
  nodeName: 172-30-46-10
  owner: local-storage
  description:
    diskType: HDD
EOF
  1. Watch and consume the LocalDiskClaim when its status is Bound (For owner)
your logic here in code
  1. Update status to Consumed when disk backing the LocalDiskClaim is consumed(For owner)
your logic here in code
  1. Observe the LocalDiskClaim and it will be deleted soon (For admin)
$ kubectl get ldc localdiskclaim-sample -w

Does this PR introduce a user-facing change?

See above

@codecov-commenter
Copy link

codecov-commenter commented Mar 9, 2023

Codecov Report

Merging #681 (9cd6916) into main (51e00a2) will decrease coverage by 0.12%.
The diff coverage is 6.25%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main     #681      +/-   ##
==========================================
- Coverage   30.70%   30.59%   -0.12%     
==========================================
  Files          25       25              
  Lines        1547     1556       +9     
==========================================
+ Hits          475      476       +1     
- Misses       1007     1015       +8     
  Partials       65       65              
Impacted Files Coverage Δ
...nager/controller/localdisk/localdisk_controller.go 25.95% <0.00%> (+0.39%) ⬆️
...roller/localdiskclaim/localdiskclaim_controller.go 31.18% <0.00%> (-0.69%) ⬇️
pkg/local-disk-manager/filter/filter_disk.go 76.38% <0.00%> (-8.23%) ⬇️
.../local-disk-manager/handler/localdisk/localdisk.go 21.35% <50.00%> (+0.56%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@SSmallMonster SSmallMonster merged commit 7e54f4a into hwameistor:main Mar 16, 2023
1 of 2 checks passed
@FloatXD FloatXD mentioned this pull request Mar 24, 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.

None yet

2 participants