Uploaded image for project: 'Kiali'
  1. Kiali
  2. KIALI-1464

labels need to come from pods not the deployments

    Details

    • Type: Bug
    • Status: Released (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 0.8.0
    • Component/s: None
    • Labels:
      None

      Description

      I just noticed this while running Istio 1.1. The graph generation code is looking at deployments for the labels (app/version) when it should be looking at the pods (or at least it should look at the deployments template metadata labels, not the deployment's own labels). This is because the Istio telemetry "app" and "version" data comes from the pod labels so we need to be consistent with that.

      We were assuming that Deployment labels will match the labels that its pods will get, but this is not always true (there is no requirement that deployment labels must match those of its pods).

      For example, Istio 1.1 has the following defined:

      kind: Deployment
      metadata:
        labels:
          app: istio-mixer
          chart: mixer-1.0.0
          heritage: Tiller
          istio: mixer
          release: istio
          version: 1.0.0
        name: istio-policy
        namespace: istio-system
      spec:
        selector:
          matchLabels:
            app: policy
            istio: mixer
            istio-mixer-type: policy
        template:
          metadata:
            labels:
              app: policy
              istio: mixer
              istio-mixer-type: policy
      

      Notice the istio-policy Deployment itself has labels app=istio-mixer and version=1.0.0, but the pods it manages has app=policy and NO version label. So the labels of the Deployment itself have no bearing on what the pod labels are. But it is the pod labels that Istio telemetry captures (so in Prometheus, for the istio-policy pods, you'd see app of "policy" and version of "unknown".)

      In Kiali, we are looking at the Deployment labels rather than the pod labels. We need to fix this. We will probably need to look at the Deployment's template metadata since many times the kiali server is looking up Deployments specifically, not pods, but the Deployment template metadata is where the deployment pods get their labels.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                agutierr Alberto Jesus Gutierrez Juanes
                Reporter:
                mazz John Mazzitelli
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: