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

Add VolumeClaim scheduler, Volume controller and VolumeClaim controller #301

Merged
merged 1 commit into from
Feb 17, 2022

Conversation

afritzler
Copy link
Member

@afritzler afritzler commented Feb 5, 2022

Proposed Changes

  • Schedule VolumeClaim to reference a matching Volume
  • Add Volume controller to handle Volume phases
  • Add VolumeClaim controller to handle VolumeClaim phases

Test cases:

VolumeClaim scheduling

  • Matching Volume and VolumeClaim based on Resource requests
  • Do not match if StorageClasses are different
  • Do not match if the Resource requests of the VolumeClaim are higher than offered by the Volume
  • Match a VolumeClaim if two Volumes with different Resources are available

Volume

  • Bind volume to matching claim
  • Unbind volume if the claim disappears

VolumeClaim

  • Bind a claim to a matching volume
  • Mark a claim as lost if the volume gets deleted

Fixes #294

@afritzler
Copy link
Member Author

The unit tests are a bit verbose at the moment. They probably need some refactoring/cleanup.

@afritzler afritzler added the enhancement New feature or request label Feb 5, 2022
@afritzler afritzler force-pushed the enh/volume_claim_creation branch 3 times, most recently from 1a8b688 to dbd8cd1 Compare February 6, 2022 19:01
@github-actions github-actions bot added size/XXL and removed size/XL labels Feb 14, 2022
@afritzler afritzler changed the title Add VolumeClaim scheduler Add VolumeClaim scheduler, Volume controller and VolumeClaim controller Feb 14, 2022
main.go Outdated Show resolved Hide resolved
@afritzler afritzler force-pushed the enh/volume_claim_creation branch from 9ae0fb4 to ddff8b6 Compare February 15, 2022 20:16
@adracus adracus force-pushed the enh/volume_claim_creation branch from ddff8b6 to ffd9600 Compare February 17, 2022 18:10
@adracus adracus merged commit c04e3f0 into main Feb 17, 2022
@adracus adracus deleted the enh/volume_claim_creation branch February 17, 2022 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Volume controller should create VolumeClaim and self reference
2 participants