cloudfoundry / cf-for-k8s

The open source deployment manifest for Cloud Foundry on Kubernetes
Apache License 2.0
300 stars 115 forks source link

Add version and app labels to workloads #617

Open joscha-alisch opened 3 years ago

joscha-alisch commented 3 years ago

Is your feature request related to a problem? Please describe. Istio and related monitoring components such as kiali consider pods to be a proper istio-app if they have the "app" and "version" labels set. Currently, some features don't work, because workloads are missing these labels.

This is an example from the Kiali UI where the pods don't show up as proper istio apps.

kiali UI

Describe the solution you'd like It would be good if these two labels could be set. Maybe the app label could be "org_name/space_name/app_name" as to not have overlapping app names. If that information is not available wherever you create those statefulsets, I guess the name of the statefulset would also suffice (i.e. app-name-HASH)

cf-gitbot commented 3 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/176674626

The labels on this github issue will be updated when the story is started.

jamespollard8 commented 3 years ago

Hey @joscha-alisch, thanks for this submission.

Could you please elaborate on what value is added by making apps "proper istio apps"? Do you know if tools other than Kiali also depend on these labels and to what extent?

cc my pair @jspawar

joscha-alisch commented 3 years ago

Hi @jamespollard8, @jspawar , I am not sure which other tools make use of those labels, with Kiali it was just very obvious. You can find this in the official Istio docs here: https://istio.io/latest/docs/ops/deployment/requirements/#pod-requirements

Pods with app and version labels: We recommend adding an explicit app label and version label to the specification of the pods deployed using a Kubernetes Deployment. The app and version labels add contextual information to the metrics and telemetry that Istio collects.

The app label: Each deployment should have a distinct app label with a meaningful value. The app label is used to add contextual information in distributed tracing.

The version label: This label indicates the version of the application corresponding to the particular deployment.

Hope that helps!

Birdrock commented 3 years ago

Hi @joscha-alisch - I've added this to our feature requests. We'll update this if we prioritize this work.

cc @jspawar