Skip to content

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 force-pushed the direct-csi-list-drives branch from e4807e9 to 5e3a12b Compare March 12, 2021 20:28
@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.

3 participants