consider using labels instead of annotations #821
Labels
area:auto-instrumentation
Issues for auto-instrumentation
area:collector
Issues for deploying collector
Hi, I would like to pick up on the labeling/annotation topic raised by @pavolloffay here again. I recommend to read his comment first.
Recently we had a problem in the Jaeger-operator that the operator itself (rolled out via deployment) had to go through the deployment webhook provided by itself. The question came up, if it makes sense to let every deployment pass this stage. Using labels we could pre-filter objects by using e.g. an objectSelector. Unfortunately this only works with labels and not with annotations.
As a solution we exclude deployments with the label
app.kubernetes.io/name: jaeger-operator
from the webhook. However, it is solved more efficient in e.g. Istio and Kuma. There the webhook is based on labels like in this project. By using a namespace and object selector, only pods with an injection label, in a labeled namespace and without an injected label will be considered.Why is this here a thing?
As far as I understand, each pod passes through the webhook handler. This could prevent the creation and update of any pods in case of an error. A nice side effect would be that objects can be filtered immediately for api queries.
Looking forward to your thoughts.
The text was updated successfully, but these errors were encountered: