Code Monkey home page Code Monkey logo

kiali's Introduction

Kiali Tweet about Kiali

Apache 2.0 license

Introduction

kiali is a management console for Istio service mesh. Kiali can be quickly installed as an Istio add-on, or trusted as a part of your production environment.

Contributing

First, check the Community section on kiali.io, which provides a brief introduction on contributing, how to report issues and request features, and how to reach us.

If you would like to make code contributions, please also check the Contribution Guide.

Getting Started

The target audience of this README are developers. If you are not a developer but want to learn more about Kiali, the Kiali documentation should be more helpful. For instructions on installing Kiali, please read the Installation page.

How and where Kiali is released?

Read the RELEASING.adoc file.

Developer setup

Make sure you have the following tools:

  • The Go Programming Language

    • Currently, Kiali releases are built using a specific minimum version of Go as declared in the Makefile. Although Kiali may build correctly using other versions of Go, it’s suggested to use the version that the Makefile uses for your own development to ensure replicatable builds.

  • git

  • gcc

  • Docker or Podman

    • If you are using podman declare the environment variable DORP=podman.

  • NodeJS (Node.js >= 20 with the NPM command)

  • Yarn

  • The GNU make utility or any of it’s alternatives

Once you have the required developer tools, you can get and build the code with the following script:

# Checkout the source code
mkdir kiali_sources
cd kiali_sources
export KIALI_SOURCES=$(pwd)

git clone https://github.com/kiali/kiali.git
git clone https://github.com/kiali/kiali-operator.git
git clone https://github.com/kiali/helm-charts.git

ln -s $KIALI_SOURCES/kiali-operator kiali/operator

# Build the back-end and run the tests
cd $KIALI_SOURCES/kiali
make build test

# You can pass go test flags through the GO_TEST_FLAGS env var
# make -e GO_TEST_FLAGS="-race -v -run=\"TestCanConnectToIstiodReachable\"" test

# Build the front-end and run the tests
make build-ui-test
Note
The rest of this README assumes the directory tree created by the previous commands:
-- kiali_sources
   |- kiali
   |- kiali-operator
   \- helm-charts

Create a Kubernetes cluster and install a Service Mesh

Since Kiali is a management console for an Istio-based service mesh, you will need an Istio-like Service Mesh to try Kiali. Then, Istio Meshes are installed on Kubernetes clusters.

We provide a few unsupported scripts that can help to get started:

  • You can use the crc-openshift.sh script to create an OpenShift cluster on your local machine.

  • If you are familiar to minikube, you may try the k8s-minikube.sh script. It has the option to install Dex which is useful if you want to test with OpenID.

  • You can also use kind, run start-kind.sh script to create a single node KinD cluster with metallb enabled for testing Kiali against a real environment.

  • Finally, the install-istio-via-istioctl.sh and the install-bookinfo-demo.sh scripts can assist into installing Istio and the Bookinfo sample application in your cluster, respectively. You can try running these scripts without any arguments.

These scripts are written to rely on the minimum dependencies as possible and will try to download any required tools.

Depending on the type of cluster you are using, you should define the CLUSTER_TYPE environment variable on your shell to openshift (this is the default if not set), minikube or kind value so that the Makefiles can assist in other operations. If you are not using any of these clusters, you should set the environment variable to CLUSTER_TYPE=local.

Note
If you are using minikube it’s recommended that you enable the registry and ingress add-on. The k8s-minikube.sh script should do this for you.
Note
If you are using docker and using minikube’s registry add-on or any custom non-secure registry, make sure the Docker daemon is properly configured to use your registry.

Building the Container Image and deploying to a cluster

Assuming that:

  • you have successfully built the back-end and the front-end,

  • you also have created a Kubernetes cluster with an Istio-based Service Mesh installed on it,

  • and you are not using the CLUSTER_TYPE=local environment variable

the following commands should deploy a development build of Kiali to the cluster:

cd $KIALI_SOURCES/kiali

# Build the Kiali-server and Kiali-operator container images and push them to the cluster
make cluster-push

# If you want to only build and push the Kiali-server container images:
# make cluster-push-kiali

# If you want to only build and push the Kiali-operator container images:
# make cluster-push-operator

# Deploy the operator to the cluster
make operator-create

# Create a KialCR to instruct the operator to deploy Kiali
make kiali-create

If you are using the CLUSTER_TYPE=local environment variable, you will need to declare some additional environment variables to set the container registry where container images should be pushed and use make container-push* targets instead of cluster-push* targets. For example, if your container registry is localhost:5000:

export QUAY_NAME=localhost:5000/kiali/kiali
export CONTAINER_NAME=localhost:5000/kiali/kiali
export OPERATOR_QUAY_NAME=localhost:5000/kiali/kiali-operator
export OPERATOR_CONTAINER_NAME=localhost:5000/kiali/kiali-operator

cd $KIALI_SOURCES/kiali

# Build the Kiali-server and Kiali-operator container images and push them to the cluster
make container-build container-push

# If you want to only build and push the Kiali-server container images:
# make container-build-kiali container-push-kiali-quay

# If you want to only build and push the Kiali-operator container images:
# make container-build-operator container-push-operator-quay

# Deploy the operator to the cluster
make operator-create

# Create a KialCR to instruct the operator to deploy Kiali
make kiali-create

Reloading Kiali image

If you already have Kiali installed and you want to recreate the kiali server pod, you can run the following command:

cd $KIALI_SOURCES/kiali
make kiali-reload-image

This is to facilitate development. To quickly build a new Kiali container image and load it to the cluster, you can run:

cd $KIALI_SOURCES/kiali/frontend
yarn && yarn build

cd $KIALI_SOURCES/kiali
make clean build cluster-push-kiali kiali-reload-image
Note
There is no equivalent reload command for the operator. You would need to manually reload the operator via kubectl or oc commands.

Cluster clean-up

cd $KIALI_SOURCES/kiali

# Delete the Kiali CR to let the operator remove Kiali.
make kiali-delete

# If the previous command never ends, the following command forces removal by bypassing the operator
# make kiali-purge

# Remove the operator
# NOTE: After this completes, the `kiali-create` and `kiali-delete` targets will be ineffective
# until you run the `operator-create` target to re-deploy the Kiali operator again.
make operator-delete

Code formatting and linting

If you are changing the back-end code of Kiali, before submitting a pull request make sure your changes are properly formatted and no new linting issues are introduced by running:

# CD to the back-end source code
cd $KIALI_SOURCES/kiali

# Install linting tools
make lint-install

# Format the code and run linters
make format lint

Enable tracing

Kiali itself is instrumented with opentelemetry tracing to help provide insights and surface performance issues for the kiali server. To enable, set the server.observability.tracing.enabled and server.observability.tracing.collector_url configuration options.

apiVersion: kiali.io/v1alpha1
kind: Kiali
metadata:
  name: kiali
spec:
...
  server:
    observability:
      tracing:
        collector_url: http://jaeger-collector.istio-system:14268/api/traces
        enabled: true
...

Running Standalone

You may want to run Kiali outside of any cluster environment for debugging purposes. To do this, you will want to use the run-kiali.sh hack script located in the hack directory. See the --help output for the options you can set. The default configuration it uses is found in the config template file also located in the hack directory. Read the comments at the tops of both files for more details.

cd $KIALI_SOURCES/kiali/hack
./run-kiali.sh

Running integration tests

There are two sets of integration tests. The first are backend tests that test the Kiali API directly. These can be found at backend tests. The second are frontend Cypress tests that test Kiali through the browser. These can be found at frontend tests.

Both tests are run as part of the CI pipeline. If you’d like to run these same tests locally, you can use this script to setup your local environment and run the integration tests. Or these tests can be run against any live environment that meets the following requirements.

Requirements: - Istio - Kiali - bookinfo demo app - error rates demo app

You can use this script to install all the neccessary demo apps for testing. The script supports both openshift and non-openshift deployments.

# If you are doing frontend development, start the frontend development server, where `<kiali-url>` is the URL to the base Kiali UI location such as `http://localhost:20001/kiali`:
make -e YARN_START_URL=http://<kiali-url> yarn-start

# Start the cypress tests. The tests will run against the frontend development server by default.
# Otherwise you can pass a custom url with env vars:
#
# make -e CYPRESS_BASE_URL=http://<kiali-url> cypress-gui
make cypress-gui

Note that make cypress-gui runs the Cypress GUI that allows you to pick which individual tests to run. To run the entire test suite in headless mode, use the make target cypress-run instead.

Debugging Server Backend

VisualStudio Code

If you are using VisualStudio Code, you can install the following launcher.json that is then used to launch the Kiali Server in the debugger. Run the hack/run-kiali.sh script first to ensure the proper services are up (such as the Prometheus port-forward proxy).

{
    // To use this, first run "hack/run-kiali.sh --tmp-root-dir $HOME/tmp --enable-server false"
    // Pass in --help to that hack script for details on more options.
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch Kiali to use hack script services",
            "type": "go",
            "request": "launch",
            "mode": "debug",
            "program": "${workspaceRoot}/kiali.go",
            "cwd": "${env:HOME}/tmp/run-kiali",
            "args": ["-config", "${env:HOME}/tmp/run-kiali/run-kiali-config.yaml"],
            "env": {
                "KUBERNETES_SERVICE_HOST": "127.0.0.1",
                "KUBERNETES_SERVICE_PORT": "8001",
                "LOG_LEVEL": "trace"
            }
        }
    ]
}

Debugging GUI Frontend

You can debug the Kiali GUI directly inside of Google Chrome using the Chrome Developer Tools or using VisualStudio Code.

In order to use either one, you first must perform some initial steps.

First, run the Kiali Server backend, either normally within a cluster or via run-kiali.sh as explained earlier. Determine what the Kiali URL is before moving to the next step. For example, if you run Kiali in minikube, and you set up a port-forward that exposes it, the URL to remember will be http://localhost:20001/kiali.

Second, run the GUI frontend using make: make -e YARN_START_URL=<kiali-url> yarn-start where <kiali-url> is the URL you determined from the previous step. You may need to also pass -e PORT=3001 to override the default port where the yarn server will listen to (the default is 3000 which will conflict with Grafana if you started the Kiali Server via run-kiali.sh). Some examples:

  • If the Kiali Server is running in minikube with a port-forward exposing it, then run make -e YARN_START_URL=http://localhost:20001/kiali yarn-start.

  • If the Kiali Server is running in OpenShift with the usual Kiali Route exposing it, then run make -e YARN_START_URL=https://<Kiali-OpenShift-Route-IP>/ yarn-start.

  • If the Kiali Server is running locally via run-kiali.sh, then run make -e YARN_START_URL=http://localhost:20001/kiali -e PORT=3001 yarn-start.

The yarn-start make command will start the Kiali GUI frontend on a local endpoint - when it is ready, look at the output for the "Local" URL you use to access it. The output will look something like this:

Compiled successfully!

You can now view @kiali/kiali-ui in the browser.

  Local:            http://localhost:3001
  On Your Network:  http://192.168.1.15:3001
...

At this point, you can begin to set up your debugger tool of choice - see the next sections.

Google Chrome Developer Tools

Start Google Chrome and point the browser to the local URL for the Kiali GUI frontend started by yarn-start (in the example above, that will be http://localhost:3001).

In Google Chrome, open the Developer Tools. You can press F12 or Control-Shift-I to do this.

Within the Developer Tools, navigate to the Sources tab, then the Filesystem sub-tab, and press the + Add folder to workspace link. In the file selection dialog, select your Kiali frontend/src folder. This will inform Developer Tools where your Kiali GUI frontend source code can be found.

At this point, you need to give Google Chrome permission to access your local source code folder. Towards the top of the browser window, you will see a prompt - press the "Allow" button to give Chrome the necessary permissions it needs.

You are now ready to debug the Kiali Server frontend. You can set breakpoints, inspect variables, examine stack traces, etc. just as you can do with any typical debugging tool.

VisualStudio Code

If you are using VisualStudio Code, you can install the following launcher.json that is then used to launch Google Chrome to debug the Kiali Server GUI frontend in the debugger. The url setting is the local URL of the yarn-start server - make sure you use the one appropriate for your environment.

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch Chrome",
            "type": "chrome",
            "request": "launch",
            "url": "http://localhost:3001",
            "webRoot": "${workspaceFolder}"
        }
    ]
}

Configuration

Many configuration settings can optionally be set within the Kiali Operator custom resource (CR) file. See this example Kiali CR file that has all the configuration settings documented.

Embedding Kiali

If you want to embed Kiali in other applications, Kiali offers a simple feature called Kiosk mode. In this mode, Kiali won’t show the main header, nor the main navigation bar.

To enable Kiosk mode, you only need to add a kiosk=<platform_id> URL parameter. You will need to use the full path of the page you want to embed. For example, assuming that you access Kiali through HTTPS:

  • To embed the Overview page, use https://kiali_path/overview?kiosk=console.

  • To embed the Graph page, use https://kiali_path/graph/namespaces?kiosk=console.

  • To embed the Applications list page, use https://kiali_path/applications?kiosk=console.

If the page you want to embed uses other URL arguments, you can specify any of them to preset options. For example, if you want to embed the graph of the bookinfo namespace, use the following URL: http://kiali_path/graph/namespaces?namespaces=bookinfo&kiosk=console.

<platform_id> value in the kiosk URL parameter will be used in future use cases to add conditional logic on embedded use cases, for now, any non empty value will enable the kiosk mode.

Configure External Services

Grafana

If you have Grafana installed in a custom way that is not easily auto-detectable by Kiali, you need to change in the Kiali CR the value of the grafana > url

apiVersion: kiali.io/v1alpha1
kind: Kiali
metadata:
  name: kiali
spec:
...
    external_services:
      grafana:
        url: http://grafana-istio-system.127.0.0.1.nip.io
...

Additional Notes

Frontend development guidelines

Frontend development guidelines (styles, i18n, etc.) can be found here

Upgrading Go

The Kiali project will periodically upgrade to a newer version of Go. These are the steps that need to be performed in order for the Kiali build to use a different version of Go:

  1. Run go mod edit -go=x.y where "x" and "y" are the major/minor versions of the Go version being used.

  2. Run go mod tidy -v

  3. Run make clean build build-ui test to ensure everything builds correctly. If any problems occur, obviously you must fix them.

  4. Commit the changes to your working branch, create a PR, and make sure everything builds and works before merging the PR.

The Makefile and some Github Actions will check the go version from the go.mod file.

Procedure to check and update patternfly versions

  1. Launch command npx npm-check-updates -t latest -f '/^@patternfly/'

  2. Launch yarn install to update the yarn.lock

  3. Add to the commit package.json and yarn.lock

Running the UI outside the cluster

When developing the Kiali UI you will find it useful to run it outside of the cluster to make it easier to update the UI code and see the changes without having to re-deploy. The preferred approach for this is to use the proxy feature of React. The process is described here. Alternatively, you can use the make -e YARN_START_URL=<url> yarn-start command where <url> is to the Kiali backend.

Disabling SSL

In the provided OpenShift templates, SSL is turned on by default. If you want to turn it off, you should:

  • Remove the "tls: termination: reencrypt" option from the Kiali route

  • Remove the "identity" block, with certificate paths, from the Kiali Config Map.

  • Optionally you can also remove the annotation "service.beta.openshift.io/serving-cert-secret-name" in the Kiali Service, and the related kiali-cabundle volume that is declared and mounted in Kiali Deployment (but if you don’t, they will just be ignored).

Exposing Kiali to External Clients Using Istio Gateway

The operator will create a Route or Ingress by default (see the Kiali CR setting "deployment.ingress_enabled"). If you want to expose Kiali via Istio itself, you can create Gateway, Virtual Service, and Destination Rule resources similar to below:

---
apiVersion: networking.istio.io/v1
kind: Gateway
metadata:
  name: kiali-gateway
  namespace: istio-system
spec:
  selector:
    istio: ingressgateway
  servers:
  - port:
      number: 80
      name: http-kiali
      protocol: HTTP
    # https://istio.io/latest/docs/reference/config/networking/gateway/#ServerTLSSettings
    tls:
      httpsRedirect: false
    hosts: [<your-host>]
  - port:
      number: 443
      name: https-kiali
      protocol: HTTPS
    tls: {}
    hosts: [<your-host>]
...
---
apiVersion: networking.istio.io/v1
kind: VirtualService
metadata:
  name: kiali-virtualservice
  namespace: istio-system
spec:
  gateways:
  - kiali-gateway
  hosts: [<your-host>]
  http:
  - route:
    - destination:
        host: kiali.istio-system.svc.cluster.local
        port:
          number: 20001
      weight: 100
...
---
apiVersion: networking.istio.io/v1
kind: DestinationRule
metadata:
  name: kiali-destinationrule
  namespace: istio-system
spec:
  host: kiali
  trafficPolicy:
    tls:
      mode: DISABLE
...

Experimental

Observing a Remote Cluster

Note
The "Central IstioD" setup is currently named "Primary-remote" multi-cluster setup.
Warning
When this support was incorporated into Kiali, the "Central IstioD" setup of Istio was in an early development phase. These instructions are probably now broken.

There are certain use cases where Kiali needs to be deployed in one cluster (Control Plane) and observe a different cluster (Data Plane). Diagram

Follow these steps:

1: You should have the Istio with an External Control Plane setup running

2: Create the Kiali ClusterRole, ClusterRoleBinding, and ServiceAccount in the Data Plane cluster

3: Create a remote secret in the Control Plane, using the Data Plane ServiceAccount you just created. This allows the Control Plane to read from and modify the Data Plane

istioctl create-remote-secret --service-account kiali-service-account --context=$DataPlane --name kiali | kubectl apply -n istio-system --context=$ControlPlane -f -

4: You will now run Kiali in the Control Plane. You need to add the remote secret to the Kiali Deployment by specifying a Volume and VolumeMount. When Kiali sees /kiali-remote-secret/kiali it will use the remote cluster’s API server instead of the local API server

spec:
  template:
    spec:
      containers:
      - volumeMounts:
        - mountPath: /kiali-remote-secret
          name: kiali-remote-secret
      volumes:
      - name: kiali-remote-secret
        secret:
          defaultMode: 420
          optional: true
          secretName: istio-remote-secret-kiali

5: Kiali now needs the Istio metrics from the sidecars. You need to run Prometheus in the Control Plane and have it scrape the metrics from an envoyMetricsService. These metrics are required.

6: Kiali in the Control Plane should now be fully functional with the Data Plane

kiali's People

Contributors

abonas avatar aljesusg avatar burmanm avatar cfcosta avatar dependabot[bot] avatar ferhoyos avatar filipb avatar github-actions[bot] avatar hhovsepy avatar israel-hdez avatar jadeyliu939 avatar jmazzitelli avatar josejulio avatar josunect avatar jotak avatar jshaughn avatar leandroberetta avatar lucasponce avatar matejnesuta avatar mattmahoneyrh avatar mtho11 avatar mwringe avatar nrfox avatar pbajjuri20 avatar pilhuhn avatar scriptingshrimp avatar theute avatar vnugent avatar xeviknal avatar xunzhuo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kiali's Issues

Tracing and metrics fail to resolve

I have istio 0.7.1 installed with all of the add-ons (includes jaeger). However when I follow the instructions to install kiali I see errors to resolve grafana and jaeger services in the kiali UI. I don't see a configuration map that allows me to set the service URL. Are there built-in assumptions about the istio installation that kiali has baked in that I must use the istio install from the kiali project (I wouldn't think this would be the case).

Note, everything is installed in the istio-system namespace. I am using a 1.10.1 kubernetes install in IKS. Istio with grafana and jaeger are working fine.

Remove layout options dropdown to simple button.

https://issues.jboss.org/browse/KIALI-1172

Currently we have the layout options as a drop down (eg 'breadthfirst', 'cose', 'cola', 'dagre', 'klay'). Most users are probably not going to be familiar with these different options or the differences between them.

We are going to be simplifying the number of layouts to around 3 and want an easy way to allow a user to switch the layout type (without exposing to them what the layout type being used is).

An option which was brought up was to remove the dropdown and use a button on the toolbar instead. Something like 'switch layout'.

We are looking for input from UXD to see what is the best way to handle this.

Goals:

  • make things easier to for users, they are mostly not going to know the different names or what they mean
  • make it easier to switch layouts if there is a problem. Certain service graphs will only work with one type of layout and not another. If we detect there is a problem we would like to automatically switch to a layout that works
  • provide an option to the users so that if they don't like one layout they can try another.

Switching between app and workload graph views

The graph currently has two options for how its displayed: an app view and a workload view.

If all the workloads have the app label applied, then we show the app graph. A user in this situation may want to display the workload graph directly as well.

If any of the workloads is missing the app label, then we display the workload graph. A user in this situation would not be able to view the app graph.

We need to be able to visualise to the user what graph type they are currently using. And if they can display both provide an option to switch graph types.

kiali api not returning any data

when i'm accessing the productpage-v1 metrics using the api calls the data is not getting populated.
command : curl -u admin:admin http://169.53.36.106:31632/api/namespaces/istio-system/services/productpage-v1/metrics

output:
{"metrics":{"request_count_in":{"matrix":[]},"request_count_out":{"matrix":[]},"request_error_count_in":{"matrix":[]},"request_error_count_out":{"matrix":[]}},"histograms":{"request_duration_in":{"average":{"matrix":[]},"median":{"matrix":[]},"percentile95":{"matrix":[]},"percentile99":{"matrix":[]}},"request_duration_out":{"average":{"matrix":[]},"median":{"matrix":[]},"percentile95":{"matrix":[]},"percentile99":{"matrix":[]}},"request_size_in":{"average":{"matrix":[]},"median":{"matrix":[]},"percentile95":{"matrix":[]},"percentile99":{"matrix":[]}},"request_size_out":{"average":{"matrix":[]},"median":{"matrix":[]},"percentile95":{"matrix":[]},"percentile99":{"matrix":[]}},"response_size_in":{"average":{"matrix":[]},"median":{"matrix":[]},"percentile95":{"matrix":[]},"percentile99":{"matrix":[]}},"response_size_out":{"average":{"matrix":[]},"median":{"matrix":[]},"percentile95":{"matrix":[]},"percentile99":{"matrix":[]}}}}

Does anyone have documentation related to api calls?

Credential exposure in error responses

Prior to setting the appropriate ClusterRoles, I was receiving permission denied to some of the dashboard views. In debugging this, I found that Kiali appears to be leaking the userid/password to the client. Probably need to scrub/cleanse error responses in this case.

ServiceListComponent.tsx:237 {"config":{"transformRequest":{},"transformResponse":{},"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"headers":{"Accept":"application/json, text/plain, /","Content-Type":"application/json;charset=utf-8","Authorization":"Basic YWRtaW46YWRtaW4="},"method":"get","url":"/api/namespaces/default/services","data":"{}","params":{},"auth":{"username":"admin","password":"admin"}},"request":{},"response":{"data":{"error":"deployments.apps is forbidden: User "system:serviceaccount:istio-system:kiali" cannot list deployments.apps in the namespace "default""},"status":500,"statusText":"Internal Server Error","headers":{"date":"Fri, 18 May 2018 19:03:56 GMT","content-length":"150","content-type":"application/json"},"config":{"transformRequest":{},"transformResponse":{},"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"headers":{"Accept":"application/json, text/plain, /","Content-Type":"application/json;charset=utf-8","Authorization":"Basic YWRtaW46YWRtaW4="},"method":"get","url":"/api/namespaces/default/services","data":"{}","params":{},"auth":{"username":"admin","password":"admin"}},"request":{}}}

Empty Service Graph

screen shot 2018-05-28 at 7 01 20 pm

unable to see service graph data for any namespace except istio-system. not much help in kiali pod logs. i can see data in istio service graph and as well as grafana.

Any clues where to check?

multi tenant support

is there a plan to support multi-tenant features ? Also use openshift authentication proxy in future?

Accessibility

Hi, I'm not from the development team and I was looking at the project kiali/kiali-ui in general, I realized that there is nothing relevant in the project regarding accessibility, like HTML attributes (aria-label, aria-required), if the HTML is really semantic, accessibility tests, anyway, is something will be seen in the future?

make openshift-deploy fails due to namespaces "istio-system" not found

make openshift-deploy
Undeploying from OpenShift
oc delete all,secrets,sa,templates,configmaps,daemonsets,clusterroles,clusterrolebindings --selector=app=sws -n istio-system
No resources found
Deploying to OpenShift
oc create -f deploy/openshift/sws-configmap.yaml -n istio-system
Error from server (NotFound): error when creating "deploy/openshift/sws-configmap.yaml": namespaces "istio-system" not found
make: *** [Makefile:89: openshift-deploy] Error 1

Dropdowns or Button Groups?

There doesn't seem to be a consensus in the group over when to use Dropdowns and when to use Button Groups.

DropDowns
dropdown

ButtonGroup
toolbar

One factor here being that Button Groups require one click and show all their options while Drop Downs Require Two clicks - one to display the options and one to select.

kiali failed to load graph if it was not installed in istio-system

I installed istio in the namespace of istio-system and installed kiali in the namespace of default, and found that the kiali failed to load graph, the following is log from kiali pod, seems kiali failed to lookup prometheus via kube-dns.

I0530 02:18:04.393334       1 graph.go:87] DEBUG: Build graph for namespace [kube-public]
I0530 02:18:04.393443       1 graph.go:597] DEBUG: Executing query round(sum(rate(istio_request_count{source_service!~".*\\.kube-public\\..*",destination_service=~".*\\.kube-public\\..*",response_code=~"[2345][0-9][0-9]"} [60s])) by (source_service),0.001)&time=2018-05-30 02:18:04 (now=2018-05-30 02:18:04, 1527646684)
E0530 02:18:04.427628       1 graph.go:631] Get http://prometheus:9090/api/v1/query?query=round%28sum%28rate%28istio_request_count%7Bsource_service%21~%22.%2A%5C%5C.kube-public%5C%5C..%2A%22%2Cdestination_service%3D~%22.%2A%5C%5C.kube-public%5C%5C..%2A%22%2Cresponse_code%3D~%22%5B2345%5D%5B0-9%5D%5B0-9%5D%22%7D+%5B60s%5D%29%29+by+%28source_service%29%2C0.001%29&time=2018-05-30T02%3A18%3A04Z: dial tcp: lookup prometheus on 40.0.0.10:53: no such host: goroutine 88 [running]:
runtime/debug.Stack(0xc4205421a0, 0x198, 0xc4200d28e0)
	/home/travis/.gimme/versions/go1.9.4.linux.amd64/src/runtime/debug/stack.go:24 +0xa7
github.com/kiali/kiali/handlers.handlePanic(0x186fdc0, 0xc4201222a0)
	/home/travis/gopath/src/github.com/kiali/kiali/handlers/graph.go:631 +0xa6
panic(0xfa64a0, 0xc4200d28e0)
	/home/travis/.gimme/versions/go1.9.4.linux.amd64/src/runtime/panic.go:491 +0x283
github.com/kiali/kiali/handlers.checkError(0x185a180, 0xc4202fa540)
	/home/travis/gopath/src/github.com/kiali/kiali/handlers/graph.go:614 +0xaa
github.com/kiali/kiali/handlers.promQuery(0xc42053e000, 0xbd, 0x0, 0xed2a000dc, 0x18e5ee0, 0x1866a40, 0xc4202c27d0, 0x0, 0x0, 0x0)
	/home/travis/gopath/src/github.com/kiali/kiali/handlers/graph.go:600 +0x457
github.com/kiali/kiali/handlers.buildNamespaceTrees(0xc4200f1214, 0xb, 0xc42017e400, 0x5, 0x8, 0xdf8475800, 0x1143bef, 0x13, 0xc4202c2800, 0x1, ...)
	/home/travis/gopath/src/github.com/kiali/kiali/handlers/graph.go:185 +0x3b8
github.com/kiali/kiali/handlers.graphNamespaces(0xc42017e400, 0x5, 0x8, 0xdf8475800, 0x1143bef, 0x13, 0xc4202c2800, 0x1, 0x1, 0x5b0e09dc, ...)
	/home/travis/gopath/src/github.com/kiali/kiali/handlers/graph.go:88 +0x2b4
github.com/kiali/kiali/handlers.graphNamespace(0x186fdc0, 0xc4201222a0, 0xc4204c3400, 0xc420337830)
	/home/travis/gopath/src/github.com/kiali/kiali/handlers/graph.go:72 +0x96
github.com/kiali/kiali/handlers.GraphNamespace(0x186fdc0, 0xc4201222a0, 0xc4204c3400)
	/home/travis/gopath/src/github.com/kiali/kiali/handlers/graph.go:66 +0xa3
net/http.HandlerFunc.ServeHTTP(0x11af868, 0x186fdc0, 0xc4201222a0, 0xc4204c3400)
	/home/travis/.gimme/versions/go1.9.4.linux.amd64/src/net/http/server.go:1918 +0x44
github.com/kiali/kiali/vendor/github.com/gorilla/mux.(*Router).ServeHTTP(0xc42028f260, 0x186fdc0, 0xc4201222a0, 0xc4204c3400)
	/home/travis/gopath/src/github.com/kiali/kiali/vendor/github.com/gorilla/mux/mux.go:159 +0xed
github.com/kiali/kiali/server.(*serverAuthProxyHandler).handler(0xc4204017c0, 0x186fdc0, 0xc4201222a0, 0xc4204c4f00)
	/home/travis/gopath/src/github.com/kiali/kiali/server/server.go:98 +0x390
github.com/kiali/kiali/server.(*serverAuthProxyHandler).(github.com/kiali/kiali/server.handler)-fm(0x186fdc0, 0xc4201222a0, 0xc4204c4f00)
	/home/travis/gopath/src/github.com/kiali/kiali/server/server.go:37 +0x48
net/http.HandlerFunc.ServeHTTP(0xc420365570, 0x186fdc0, 0xc4201222a0, 0xc4204c4f00)
	/home/travis/.gimme/versions/go1.9.4.linux.amd64/src/net/http/server.go:1918 +0x44
net/http.(*ServeMux).ServeHTTP(0x18e5740, 0x186fdc0, 0xc4201222a0, 0xc4204c4f00)
	/home/travis/.gimme/versions/go1.9.4.linux.amd64/src/net/http/server.go:2254 +0x130
net/http.serverHandler.ServeHTTP(0xc4204daa90, 0x186fdc0, 0xc4201222a0, 0xc4204c4f00)
	/home/travis/.gimme/versions/go1.9.4.linux.amd64/src/net/http/server.go:2619 +0xb4
net/http.(*conn).serve(0xc42039a640, 0x1870ac0, 0xc42004c3c0)
	/home/travis/.gimme/versions/go1.9.4.linux.amd64/src/net/http/server.go:1801 +0x71d
created by net/http.(*Server).Serve
	/home/travis/.gimme/versions/go1.9.4.linux.amd64/src/net/http/server.go:2720 +0x288

image

I deployed kiali with YAML templates from https://github.com/gyliu513/work/tree/master/k8s/charts/kiali , kiali works fine if it was installed in the namespace of istio-system but does not work for other namespaces.

Badges

We need to formally discuss the badges on the cy graph. What badges do we want to display? Today, there are three types of badges:

  1. The "lightning bolt" badge to indicate a circuit breaker has been defined (note: this does not denote if the CB is open or closed - it only denotes there is a CB definition that exists).

  2. The "git branch" badge to indicate a route rule is defined.

  3. The "dotted-line-cube" badge to indicate there is no istio sidecar.

Our cy graph will now be app/workload based (due to changes in Istio 1.0 telemetry). Read the pdf document and the thread I started found here for details: https://groups.google.com/d/msg/kiali-dev/zVVxLtkj_uo/n0o_Q9-qBQAJ

Since we are not service based now, we need to re-think the badges. For example:

  1. A "no sidecar" badge is only relevant for workload nodes (if a workload node has a "no-sidecar" badge, it means that workload is missing the istio proxy). Since an "app" node could represent multiple workloads, what does a "no-sidecar" badge mean when its on an app node? The only thing it could mean is that "one or more of the workloads belonging to this app is missing a side car". Is the badge OK if that is the meaning we give it? Or do we say, "only put no-sidecar badges on workload nodes".

  2. Since destination rules (circuit breakers, route rules, etc) are only on services, what does it mean to have a circuit breaker badge or route rule badge on an app or workload node? Since apps/workloads could have multiple services in front, seeing a circuit breaker badge on an app/workload node can only mean "one or more services associated with this app (or workload) has a circuit breaker." Do we still want to have these kinds of badges when these concepts belong to services, not really to apps or workloads?

  3. Perhaps we want to re-think the entire badging concept - maybe we only want a single badge (say, a yellow-triangle to indicate "warning") and if a node has such a badge it indicates some kind of error condition (what error it is could be displayed elsewhere - perhaps in the side panel.). Such conditions that could cause a warning badge to show up could be things like "incoming requests are failing at a rate higher than 10%", "there is no side-car on the workload (or one of the workloads in the app)", etc.

In short, WHAT badges do we really want to show, and on what nodes should they be applicable (app or workload node, or both kinds?).

Don't hardcode istio namespace

"istio-system" is hardcoded in several places and prevents using anything else.

Allow user to setup istio namespace by environment variable.

Also i will suggest that by default Kiali uses the namespace in which it is installed to get Istio services instead of "istio-system".

zoom component changes

The zoom component in the top left of the graph takes up space. Is it useful as-is?

I understand the usefulness of the re-fit button (which, IMO, is awesome and the best feature of this component). I understand the zoom bar is needed for those users without a mouse-with-wheel, otherwise, they have no way of zooming.

But the large pan circle - is that useful enough to take up valuable real estate on the graph? A simple mouse drag (or, a tablet tap/drag) can pan just as easily. And using the pan-circle pans slowly (perhaps we should speed that up?).

Can we think about how we can re-design (or remove) the large pan circle OR can we provide a button to show/hide the entire component (this has the added benefit of freeing up the real estate that the entire component uses).

Istio Mixer Rules design

We are in the process of align some UX changes and the Istio Rules present some questions about how to render them.

Today we have this provisional/preliminar raw design:
image

A Istio Rule model is an entity having:

  • A "match" field, which is a string that can be an expression, it is optional.
  • A list of "actions" (1 to N).

Each "action" has also:

  • A "handler" field, with a string as value.
  • A list of "instances", each "instances" is also a string as value (1 to N).

Clicking on each handler or instance will navigate to a new page showing the content in an AceEditor.

I don't have a clear picture about how to model in UX terms.

A first approach could be to iterate each "action" as a list item, and inside of the list item, to map the "instances" as a table.

I'm going to start with that approach, but I would like to get some suggestions or recommendation.

No additional fields/columns, just the info described but with the cardinality on "actions" and "instances".

Feature request: Configurable Context Root

Hi,

I'm deploying Istio together with various addons like Grafana/Jager .. and Kiali . Because I didn't want to host all those addons on different hostnames on context root, I tried to deploy Kiali behind an Ingress controller (in this case Traefik) under /kiali. Obviously, because Kiali is listening on context root, I only get 404s.

Is there any way to configure the context root on which Kiali is listening on?

cluster-openshift.sh should default to "darwin" for Mac users

The hack script https://github.com/kiali/kiali/blob/master/hack/cluster-openshift.sh assumes you want the Linux binary of istiooc. See: https://github.com/kiali/kiali/blob/master/hack/cluster-openshift.sh#L176

Mac users are required to override this by always passing in the --istiooc-platform darwin command line option.

Would be nice for Mac users to have cluster-openshift.sh default to darwin without requiring them to explicitly declare that option.

UI: Keep selection of namespaces active

I would like to select namespaces by arrows on keyboard. At the moment when I select a namespace the focus goes away and I have to click back on namespace to activate the dropdown.

The duration dropdown behaves fine. I can use arrows to select durations and the focus stays on the dropdown.

Landing page card view

This is an issue to replace kiali/kiali-design#5 that was closed.
Summarizing our discussion on the topic:

  1. there will be a new landing page (not graph, not services list) that will be in a form of a cards view.
  2. Each card represents a namespace (aka openshift project)
  3. In a card there will be several parts of information:
    a. namespace/project name
    b. number of services in a namespace
    c. if there are X services in error/warning - an indication with icon next to number of affected services (2 error, 3 warning, etc)
    if all services are green - a green V mark indicating all are good.
  4. User can stand on "X services in error.warning" and see in tooltip their names.
  5. User can click on "X services in error/warning" and navigate to services list filtered by this status (error/warning) and namespace name.

Advanced/next steps:
6. potential navigation to graph, if yes - how?
7. potential 2 landing pages - one with services health, one with workloads (or one page which is configurable by user selection)
8. alternative views for cases where there are too many cards (grid/list view instead of cards)

@cshinn @serenamarie125 have I missed anything? please add if so :)

Alignment and layout redesign for the graphs in metrics page

related JIRAs:
https://issues.jboss.org/browse/KIALI-1160
https://issues.jboss.org/browse/KIALI-741

The metrics page has several graphs, and having different data amounts and different data and legend types influences the graph size.
So with a lot of data grouping we get the issue that the legend is becoming too big and takes room of the graph.
And when some graphs have little data/no data, and others have data, the graphs next to each other stop being aligned.
I'm attaching 2 examples to illustrate both issues, but there's more info and screenshots in the JIRAs.
We need a design that solves the above issues and makes the metrics page graphs well aligned and balanced with the different legend sizes.
unalignedgraphs
biglegend

Could not fetch Istio objects list.

istioConfig report error
Could not fetch Istio objects list. Error: [ gateways.networking.istio.io is forbidden: User "system:serviceaccount:istio-system:kiali" cannot list gateways.networking.istio.io in the namespace "default" ]

KIALI-1065 Redesign the link to view yaml and the main entities display as a table

There is an issue describing that the link to edit the yaml is not clear what it will do: https://issues.jboss.org/browse/KIALI-731

And also a lot of discussion in the PR over what change should be done (if any) here: kiali/kiali-ui#417

It comes down to the link in the screenshot below and if its clear that clicking this link will take you to the yaml view:
image

Should we have something to indicate that this takes you to a yaml view? or is the link enough (with perhaps some hover tooltip to let you know what it is).

I would say go the OpenShift way of doing things, but even OpenShift doesn't provide this functionality (you can click on an 'action' button to edit the yaml, but there is no view option in OpenShift)

add security visualization

Add security details' visualization to:
a) the service itself
b) the pipe between 2 services
If not secured, mark as such.

Feature Request: Support for animated visual representation of traffic.

As discussed here. It makes it much easier to see the amount of traffic vs line thickness.

Something in the vain of Visceral. It is possible with Visceral but is a lot of effort to make it Istio friendly. A Visceral demo can be found here.

I really like the idea of having a dashboard for all observability in the service mesh. Keep up the good work!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.