You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 3, 2020. It is now read-only.
Currently the pods are classified by "application" and "component". What would be required to instead go by "deployment" and "namespace"? Would this be a larger change?
Or would it "just" mean a change of get_application_from_labels and get component_from_labels into deployments and namespaces?
The text was updated successfully, but these errors were encountered:
I now added the option customize the Pod mapping (#160, released in v20.4.4), i.e. you can map anything into "application" or "component" via a custom Python hook function (--map-pod-hook=hooks.map_pod):
defmap_pod(pod, mapped_pod: dict):
# use the Pod's namespace as "application" (does not really make much sense...)mapped_pod["application"] =pod.namespace# use the controller name (e.g. ReplicaSet name) for "component"owner_names= []
forrefinpod.metadata.get("ownerReferences", []):
owner_names.append(ref["name"])
mapped_pod["component"] =",".join(sorted(owner_names))
You would need to add this function into a new file hooks.py and add the file to kube-resource-report (e.g. by creating a new Dockerfile or mounting the file as a volume).
Currently the pods are classified by "application" and "component". What would be required to instead go by "deployment" and "namespace"? Would this be a larger change?
Or would it "just" mean a change of get_application_from_labels and get component_from_labels into deployments and namespaces?
The text was updated successfully, but these errors were encountered: