Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workload Entry graph nodes display only "latest" version #4206

Closed
nrfox opened this issue Jul 23, 2021 · 5 comments
Closed

Workload Entry graph nodes display only "latest" version #4206

nrfox opened this issue Jul 23, 2021 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@nrfox
Copy link
Contributor

nrfox commented Jul 23, 2021

Describe the bug
When a WorkloadEntry generated from istioctl workload entry configure ... appears on the graph, the version displayed is always "latest" despite properly labeling the WorkloadGroup and WorkloadEntry objects with e.g. version: v1.

Versions used
Kiali: 1.36
Istio: 1.10
Kubernetes flavour and version: 1.21

To Reproduce
Steps to reproduce the behavior:

  1. Add a WorkloadEntry VM to the mesh with a version label and send traffic to it
  2. Navigate to the graph and observe the node with "latest" as its version.

Expected behavior
Expected to see the graph node for the WorkloadEntry workload to display the proper version.

Note telemetry has the wrong source_canonical_revision="latest" label but the right version="v1" label.

The cause for this seems to be that when the workload entry VM files are created with istioctl workload entry configure, the "service.istio.io/canonical-version" label gets generated but not the "service.istio.io/canonical-revision" label.

mesh.yaml

...
ISTIO_METAJSON_LABELS: '{"app":"ratings","service.istio.io/canonical-name":"ratings","service.istio.io/canonical-version":"v1","version":"v1"}'

This may be more of an upstream issue but I wanted to post the workaround here in case others run into this same issue.

Workaround
A workaround is to add the "service.istio.io/canonical-revision" to your WorkloadGroup/WorkloadEntry objects

apiVersion: networking.istio.io/v1alpha3
kind: WorkloadGroup
metadata:
  name: details-v1
  namespace: bookinfo
spec:
  metadata:
    labels:
      app: details
      version: v1
      service.istio.io/canonical-revision: v1

It might be possible for Kiali to use both source_canonical_revision and service_istio_io_canonical_revision as service_istio_io_canonical_revision is correctly labeled with the right version?

@nrfox nrfox added the bug Something isn't working label Jul 23, 2021
@jshaughn
Copy link
Collaborator

To me this seems like an Istio reporting bug and not a Kiali bug. The canonical_revision should not be "latest" when there is a version label set to "v1". The canonical_revision should be set to the value of, in this order of preference:

service.istio.io/canonical-revision
app.kubernetes.io/version
version
"latest"

Maybe @bianpengyuan has some input here?

If the workaround works that's a good alternative until the issue is resolved. I'm going to label this waiting-external until we know what Istio says about this...

@jshaughn jshaughn added the waiting external It requires additional info to progress. For example, it can require a fix in other project. label Jul 23, 2021
@jshaughn
Copy link
Collaborator

This is waiting on an Istio fix: istio/istio#34395. When we get the fix we can re-test and likely close this issue.

@jshaughn
Copy link
Collaborator

jshaughn commented Oct 4, 2021

Istio fix has been merged. This can be tested against Istio 1.12 when a build is available.

@jshaughn jshaughn removed the waiting external It requires additional info to progress. For example, it can require a fix in other project. label Oct 4, 2021
@jshaughn jshaughn added this to Backlog in Sprint 64 (v1.42) via automation Oct 4, 2021
@lucasponce lucasponce removed this from Backlog in Sprint 64 (v1.42) Oct 25, 2021
@lucasponce lucasponce added this to Backlog in Sprint 65 (v1.43) via automation Oct 25, 2021
@nrfox
Copy link
Contributor Author

nrfox commented Nov 10, 2021

Confirmed that this is fixed when using istio 1.12-beta.2. This issue can either be closed now or after 1.12 GA has been released.

@jshaughn
Copy link
Collaborator

This is fixed in Istio 1.12, it is not a Kiali issue.

Sprint 65 (v1.43) automation moved this from Backlog to Done Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Development

No branches or pull requests

2 participants