crc icon indicating copy to clipboard operation
crc copied to clipboard

Follow up for relevant field in the status command and in API

Open praveenkumar opened this issue 2 years ago • 2 comments

As of now the crc status provide following output for UX side and from api side.

$ ./crc status
CRC VM:          Running
OpenShift:      Running (v4.12.9)
RAM Usage:       6.159GB of 8.913GB
Disk Usage:      14.647GB of 30.1GB (Inside the CRC VM)
Cache Usage:     208.9GB
Cache Directory: /home/prkumar/.crc/cache

$ curl -X GET --unix-socket ~/.crc/crc-http.sock http:/c/api/status | jq .
{
  "CrcStatus": "Running",
  "OpenshiftStatus": "Running",
  "OpenshiftVersion": "4.12.9",
  "DiskUse": 4647440384,
  "DiskSize": 16095641600,
  "RAMUse": 1162375168,
  "RAMSize": 3912953856,
  "Preset": "openshift"
}

Ideally version is taken from the bundle but it might be just clusterVersion which will work for microshift,openshift and OKD side instead having more filed around all different preset.

We also need to make sure tray doesn't break until we switch to podman desktop tray side.

Discussion: https://github.com/crc-org/crc/pull/3594#discussion_r1164065349

praveenkumar avatar Apr 13 '23 09:04 praveenkumar

Ideally version is taken from the bundle but it might be just clusterVersion which will work for microshift,openshift and OKD side instead having more filed around all different preset.

We could add ClusterVersion/ClusterStatus and deprecate OpenshiftStatus/OpenshiftVersion, or we could always use OpenshiftStatus/OpenshiftVersion. Either option works for me.

cfergeau avatar Apr 13 '23 09:04 cfergeau

Since now we have https://github.com/crc-org/crc-extension we can remove the Tray and also alter the API as needed for the extension

anjannath avatar Oct 18 '23 10:10 anjannath