Skip to content
Snippets Groups Projects
Commit e75e920d authored by ricoberger's avatar ricoberger
Browse files

Add support for the Prometheus plugin

parent 6acd37d1
No related branches found
No related tags found
No related merge requests found
......@@ -18,6 +18,8 @@ kubectl port-forward --namespace kubenav svc/kubenav 14122
### Configure Access to Multiple Clusters
> **Attention:** When kubenav runs inside a Kubernetes cluster with the `--kubeconfig` flag and the Prometheus plugin enabled (`--plugin.prometheus.enabled`) it will only use the Prometheus instance, which is running in the same cluster.
The deployment shown in this repository deploys kubenav with the `--incluster` flag. This means kubenav has only access to the cluster were it is deployed in. To deploy kubenav with access to multiple cluster you have to mount a Kubeconfig file into the kubenav container and add the `--kubeconfig` flag.
The following example shows the changes you have to made to the `deployment.yaml` file to access multiple clusters from the same kubenav instance:
......@@ -73,14 +75,15 @@ helm upgrade --install --namespace kubenav kubenav kubenav/kubenav
| ----- | ----------- | ------- |
| `replicaCount` | Number of replicas which should be created. | `1` |
| `image.repository` | The repository of the Docker image. | `kubenav/kubenav` |
| `image.tag` | The tag of the Docker image which should be used. | `4a5f72c1` |
| `image.tag` | The tag of the Docker image which should be used. | `d74a11da` |
| `image.pullPolicy` | The pull policy for the Docker image, | `IfNotPresent` |
| `imagePullSecrets` | Secrets which can be used to pull the Docker image. | `[]` |
| `nameOverride` | Expand the name of the chart. | `""` |
| `fullnameOverride` | Override the name of the app. | `""` |
| `deployment.mode` | Set the mode how kubenav should be deployed. This must be `incluster` or `kubeconfig`. | `incluster` |
| `deployment.clusterName` | The name which should be in the frontend, when the `incluster` mode is used. | `kubenav` |
| `deployment.kubeconfig` | When the `kubeconfig` mode is used. This must be a base64 encoded Kubeconfig file. | `""` |
| `plugins.prometheus.enabled` | Enables the Prometheus plugin. | `false` |
| `plugins.prometheus.address` | The address of Prometheus. | `""` |
| `rbac.create` | Create the cluster role and cluster role binding. | `true` |
| `rbac.name` | The name of the cluster role and cluster role binding, which should be created/used by kubenav. | `kubenav` |
| `rbac.name` | The permissions which kubenav should have. This must be `admin` or `viewer`. | `admin` |
......
......@@ -2,5 +2,5 @@ apiVersion: v2
name: kubenav
description: kubenav is the navigator for your Kubernetes clusters right in your pocket.
type: application
version: 0.1.1
version: 0.1.2
appVersion: 2.2.0
......@@ -32,7 +32,10 @@ spec:
- --kubeconfig=/kubenav/kubeconfig/kubeconfig
{{- else }}
- --incluster
- --incluster.name={{ .Values.deployment.clusterName }}
{{- end }}
{{- if .Values.plugins.prometheus.enabled }}
- --plugin.prometheus.enabled
- --plugin.prometheus.address={{ .Values.plugins.prometheus.address }}
{{- end }}
ports:
- name: http
......
......@@ -4,7 +4,7 @@ replicaCount: 1
image:
repository: kubenav/kubenav
tag: 4a5f72c1
tag: d74a11da
pullPolicy: IfNotPresent
imagePullSecrets: []
......@@ -15,11 +15,14 @@ deployment:
# Specifies whether kubenav should in the incluster mode or with a mounted Kubeconfig.
# This must be "incluster" or "kubeconfig"
mode: incluster
# The cluster name which should be displayed in the frontend, when using the "incluster" mode.
clusterName: kubenav
# When the "kubeconfig" mode is used the kubeconfig value must contain a base64 encoded Kubeconfig file.
kubeconfig:
plugins:
prometheus:
enabled: false
address:
rbac:
# Specifies whether a cluster role and cluster role binding should be created.
create: true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment