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

Add cluster_name support for run-kiali.sh hack script #6742

Closed
jshaughn opened this issue Oct 18, 2023 · 3 comments · Fixed by #6743
Closed

Add cluster_name support for run-kiali.sh hack script #6742

jshaughn opened this issue Oct 18, 2023 · 3 comments · Fixed by #6743
Assignees
Labels
backlog Triaged Issue added to backlog enhancement This is the preferred way to describe new end-to-end features.

Comments

@jshaughn
Copy link
Collaborator

run-kiali.sh is not working well if Istio is installed with an unset cluster name. In this scenario I had to locally update hack/run-kiali-config-template.yaml with:

kubernetes_config:
  cluster_name: "Kubernetes"

run-kiali.sh should handle the default cluster name scenario, or be configurable.

@jshaughn jshaughn added enhancement This is the preferred way to describe new end-to-end features. backlog Triaged Issue added to backlog labels Oct 18, 2023
@jmazzitelli jmazzitelli self-assigned this Oct 18, 2023
jmazzitelli added a commit to jmazzitelli/kiali that referenced this issue Oct 18, 2023
@nrfox
Copy link
Contributor

nrfox commented Oct 18, 2023

I wonder if this should actually be a change in how we handle "remote cluster" deployments: https://github.com/kiali/kiali/#observing-a-remote-cluster. Is it the kiali config cluster name that is unset or the istio cluster name? iirc when the istio cluster name is unset it will default to Kubernetes. You should see that in metrics for source_cluster and destination_cluster for example.

@jshaughn
Copy link
Collaborator Author

I think what is happening is we may be querying Istio itself and it is probably returning an empty cluster_name. In general we, Kiali, then default to "Kubernetes" (as does Istio for things like telemetry), but for this run-kiali scenario we were not inserting the default. Setting the variable is working, though.

@nrfox
Copy link
Contributor

nrfox commented Oct 18, 2023

I think what is happening is we may be querying Istio itself and it is probably returning an empty cluster_name. In general we, Kiali, then default to "Kubernetes" (as does Istio for things like telemetry), but for this run-kiali scenario we were not inserting the default. Setting the variable is working, though.

That sounds like a bug then. We should still be able to detect the cluster name even when running outside the cluster and we should still default to Kubernetes when we can't. Kiali "detects the cluster name" by looking at the istiod deployment and looking for a CLUSTER_ID env var. From what I've seen, this still gets set even when you do not provide a value for cluster id in the mesh config.

jmazzitelli added a commit that referenced this issue Oct 19, 2023
…me (#6743)

* run-kiali.sh now works if Istio is installed with an unset cluster name
fixes: #6742

* set cluster name only if one is configured
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Triaged Issue added to backlog enhancement This is the preferred way to describe new end-to-end features.
Projects
Development

Successfully merging a pull request may close this issue.

3 participants