crc-org / crc

CRC is a tool to help you run containers. It manages a local OpenShift 4.x cluster, Microshift or a Podman VM optimized for testing and development purposes
https://crc.dev
Apache License 2.0
1.25k stars 236 forks source link

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

Open praveenkumar opened 1 year ago

praveenkumar commented 1 year ago

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

cfergeau commented 1 year ago

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.

anjannath commented 11 months ago

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