Add labels to Kubernetes objects created by OSM
Proposers
- Pedro Escaleira (IT)
Description
Kubernetes labels and annotations are usually used to append some important information to the respective objects. Labels are usually used to query any object, allowing for easier management of related objects. As for annotations, they are the more human version of labels and can contain immediate information about the object.
Therefore, I propose having custom labels and annotations for any Kubernetes objects created by OSM (KDUs and EEs installed in a cluster). This is important, for instance, in scenarios where an operator needs to understand everything that OSM has installed in his cluster (for example, he can query everything created by OSM with the simple command kubectl get all --selector=<label_name>:<label_value> --all-namespaces
. Moreover, we could add annotations that would immediately tell the operator from where those objects came (for instance, the NS/KNF/KDU ID).
Demo or definition of done
The feature can be considered done when we can launch KNFs, as well as EEs in a k8s cluster, where all objects have OSM-related labels and annotations. A Robot Test will be added or updated to check that the objects are created with those labels.