rook / kubectl-rook-ceph

Krew plugin to run kubectl commands with rook-ceph
Apache License 2.0
74 stars 26 forks source link

core: add rados commands options #270

Closed OdedViner closed 3 months ago

OdedViner commented 3 months ago

Description of your changes: Add rados command option to kubectl-rook-ceph Krew plugin.

Which issue is resolved by this Pull Request: Resolves #268

Checklist:

Procedure: 1.Create minikube on my local machine: minikube start --disk-size=10g --extra-disks=1 --driver kvm2

2.Create Opertaor via conf files from rook repository https://github.com/rook/rook $ cd deploy/examples/ $ kubectl create -f crds.yaml -f common.yaml -f operator.yaml $ kubectl get pods -n rook-ceph NAME READY STATUS RESTARTS AGE rook-ceph-operator-757cdc49bb-qqffn 1/1 Running 0 89s

3.Create cluster-test: $ cd deploy/examples/ $ kubectl create -f cluster-test.yaml configmap/rook-config-override created cephcluster.ceph.rook.io/my-cluster created cephblockpool.ceph.rook.io/builtin-mgr created

$ kubectl get cephcluster -A NAMESPACE NAME DATADIRHOSTPATH MONCOUNT AGE PHASE MESSAGE HEALTH EXTERNAL FSID rook-ceph my-cluster /var/lib/rook 1 54m Ready Cluster created successfully HEALTH_OK abdff5ae-c7cd-41dd-8cd1-661c1db844f8

4.Debug the code with visual studio /.vscode/launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch",
            "type": "go",
            "request": "launch",
            "mode": "debug",
            "program": "${file}",
            "env": {},
            "args": ["rados", "status"]
        }
    ]
}
Starting: /home/oviner/go/bin/dlv dap --listen=127.0.0.1:37601 --log-dest=3 from /home/oviner/DEV_REPOS/kubectl-rook-ceph/cmd
DAP server listening at: 127.0.0.1:37601
Type 'dlv help' for list of commands.
Warning: rook version 'rook: v1.14.0-alpha.0.11.g79adfe74f' is running a pre-release version of Rook.

Info: running 'rados' command with args: [df]
POOL_NAME     USED  OBJECTS  CLONES  COPIES  MISSING_ON_PRIMARY  UNFOUND  DEGRADED  RD_OPS     RD  WR_OPS      WR  USED COMPR  UNDER COMPR
.mgr       452 KiB        2       0       2                   0        0         0       6  9 KiB       4  42 KiB         0 B          0 B

total_objects    2
total_used       27 MiB
total_avail      10 GiB
total_space      10 GiB
Process 179702 has exited with status 0
Detaching
subhamkrai commented 3 months ago

please update commit structure https://github.com/rook/rook/blob/master/Documentation/Contributing/development-flow.md#commit-structure

@OdedViner ^^

OdedViner commented 3 months ago

you also need to add docs changes in https://github.com/rook/kubectl-rook-ceph/blob/master/README.md#commands and https://github.com/rook/kubectl-rook-ceph/blob/master/README.md#documentation

Done

subhamkrai commented 3 months ago

you also need to add docs changes in https://github.com/rook/kubectl-rook-ceph/blob/master/README.md#commands and https://github.com/rook/kubectl-rook-ceph/blob/master/README.md#documentation

Done

you missed adding the https://github.com/rook/kubectl-rook-ceph/blob/master/README.md#documentation