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 list direct-csi drives and volumes api #643

Merged
merged 2 commits into from
Mar 18, 2021

Conversation

cesnietor
Copy link
Collaborator

@cesnietor cesnietor commented Mar 11, 2021

Example of api will be GET on /api/v1/direct-csi/drives :
Payload response e.g.

{
    "drives": [
        {
            "drive": "/dev/nbd0",
            "message": "EOF",
            "node": "kind-control-plane",
            "status": "Unavailable*"
        },
        {
            "allocated": 67108864,
            "capacity": 67108864,
            "drive": "/dev/ram1",
            "node": "kind-control-plane",
            "status": "Available",
            "volumes": 2
        },
        {
            "allocated": 23519305728,
            "capacity": 42948624384,
            "drive": "/dev/vda1",
            "node": "kind-worker2",
            "status": "Available",
            "volumes": 2
        },
        ...

Example of api will be GET on /api/v1/direct-csi/volumes :
Payload response e.g.

{
    "volumes": [
          {
            "volume": "/dev/nbd0",
            "capacity": 213123123,
            "node": "kind-control-plane",
            "drive": "/daas/asdas"
        }
     ]
}

to test this, this needs to be deployed on a k8s and with direct-csi installed as defined in https://github.com/minio/direct-csi/blob/master/docs/installation.md

kubectl krew install direct-csi
kubectl direct-csi install --crd

Note: right now the implementation is duplicated from direct-csi list drives command, this needs to be improved in the future to use direct-csi itself with a public function.

@cesnietor cesnietor self-assigned this Mar 11, 2021
@cesnietor cesnietor force-pushed the direct-csi-list-drives branch 2 times, most recently from 74b91b6 to e4807e9 Compare March 11, 2021 22:49
Add direct-csi volumes list api
@cesnietor cesnietor changed the title Add list direct-csi drives api Add list direct-csi drives and volumes api Mar 12, 2021
@dvaldivia dvaldivia merged commit e780f24 into minio:master Mar 18, 2021
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

3 participants