mirror of
https://github.com/rancher/steve.git
synced 2025-04-28 03:10:32 +00:00
This change enables steve to work with three new query parameters: "include": only include the named fields from the kubernetes object. Subfields are denoted with ".". Subfields within arrays are ignored. Multiple fields can be included by repeating the parameter. Example: GET /v1/configmaps?include=kind&include=apiVersion => { "type": "collection", "links": { "self": "http://server/v1/configmaps" }, "createTypes": { "configmap": "http://server/v1/configmaps" }, "actions": {}, "resourceType": "configmap", "revision": "327238", "data": [ { "id": "c-m-w466b2vg/kube-root-ca.crt", "type": "configmap", "links": { "remove": "http://server/v1/configmaps/c-m-w466b2vg/kube-root-ca.crt", "self": "http://server/v1/configmaps/c-m-w466b2vg/kube-root-ca.crt", "update": "http://server/v1/configmaps/c-m-w466b2vg/kube-root-ca.crt", "view": "http://server/api/v1/namespaces/c-m-w466b2vg/configmaps/kube-root-ca.crt" }, "apiVersion": "v1", "kind": "ConfigMap" }, } ... } "exclude": exclude the named fields from the kubernetes object. Subfields are denoted with ".". Subfields within arrays are ignored. Multiple fields can be excluded by repeating the parameter. Example: GET /v1/configmaps?exclude=data&exclude=metadata.managedFields => { "type": "collection", "links": { "self": "http://server/v1/configmaps" }, "createTypes": { "configmap": "http://server/v1/configmaps" }, "actions": {}, "resourceType": "configmap", "revision": "328086", "data": [ { "id": "c-m-w466b2vg/kube-root-ca.crt", "type": "configmap", "links": { "remove": "http://server/v1/configmaps/c-m-w466b2vg/kube-root-ca.crt", "self": "http://server/v1/configmaps/c-m-w466b2vg/kube-root-ca.crt", "update": "http://server/v1/configmaps/c-m-w466b2vg/kube-root-ca.crt", "view": "http://server/api/v1/namespaces/c-m-w466b2vg/configmaps/kube-root-ca.crt" }, "apiVersion": "v1", "kind": "ConfigMap", "metadata": { "creationTimestamp": "2022-04-11T22:05:27Z", "fields": [ "kube-root-ca.crt", 1, "25h" ], "name": "kube-root-ca.crt", "namespace": "c-m-w466b2vg", "relationships": null, "resourceVersion": "36948", "state": { "error": false, "message": "Resource is always ready", "name": "active", "transitioning": false }, "uid": "1c497934-52cb-42ab-a613-dedfd5fb207b" } }, ... } "excludeValues": replace the values of an object with empty strings, leaving the keys in place. Useful for showing a summary of an object with large values, such as the data in a ConfigMap. Only works on fields that are object. Multiple fields can have values excluded by repeating the parameter. Example: GET /v1/configmaps?excludeValues=data => { "type": "collection", ... "data": [ { ... "data": { "ca.crt": "" }, ... }, ... ] } |
||
---|---|---|
pkg | ||
.dockerignore | ||
.gitignore | ||
Dockerfile | ||
go.mod | ||
go.sum | ||
LICENSE | ||
main.go | ||
Makefile |