-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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 some format to the ListImages, such as templates or JSON #11165
Comments
Can we pick this once #11406 is done? |
You don't have to wait for the default to change. |
For this issue one adds something to the ListImagesOptions, and then implements it for all the different CRI in their ListImages. // ListImagesOptions are the options to use for listing images
type ListImagesOptions struct {
// Format is the output format
Format string
} // ListImages returns a list of images managed by this container runtime
ListImages(ListImagesOptions) ([]string, error) Finally add it to the cmd. |
@afbjorklund I like to work on this |
/assign |
But, in docker, there is no option to show output as |
It is a bit hidden: You should probably pick one format internally (json), and then maybe add yaml to the output... There is no need to use different output for the internal implementation, so just stick with JSON. The idea was to have one json document per string (line). Currently ListImages outputs the image id.
Instead, the output should be a JSON document:
Probably skip the "uid" and "username", no ? Maybe convert the size from string to integer. When this feature is available in the API, it can be parsed and converted to output in the CLI. Note that you would have to convert the output from Docker, in order to match the one from CRI.
|
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
@tharun208 are you still working on this ? |
I started working on this. |
Follow-up to #10933
Currently ListImages API returns the images in a fixed text format...
minikube image ls
NOTE: That "busybox" image came from the cache:
As suggested, it could be useful with other formats: #11007 (review)
crictl
offers three different formats:table (default)
minikube ssh -- sudo crictl images --output table k8s.gcr.io/pause
json
yaml
minikube ssh -- sudo crictl images --output yaml k8s.gcr.io/pause
The text was updated successfully, but these errors were encountered: