mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/kubernetes-dashboard] - Add support for gce-ingress integration (#9179)
* Fix gce-ingress integration for kubernetes-dashboard To make the gce-ingress working: - The service needs to have a named port along with annotation for the protocol mapping the port name with HTTPS in that case - The ingress requires both / and /* to be forwarded to the backend to be able to serve all the dashboard paths and sub paths Signed-off-by: Maxime Belanger <mbelanger@dialogue.co> * Simplify the change and add comments instead Signed-off-by: Maxime Belanger <maxime.b.belanger@gmail.com> * Major changes - Now supports `paths` in place of `path` - Add documentation for GCE ingress support instead of adding some logic Signed-off-by: Maxime Belanger <maxime.b.belanger@gmail.com> * Port naming according to enableInsecureLogin value Signed-off-by: Maxime Belanger <maxime.b.belanger@gmail.com> * Add a migration documentation and fix some .md linting issues Signed-off-by: Maxime Belanger <maxime.b.belanger@gmail.com>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
53a53e5523
commit
855917f0b4
@@ -1,5 +1,5 @@
|
||||
name: kubernetes-dashboard
|
||||
version: 0.10.2
|
||||
version: 1.0.0
|
||||
appVersion: 1.10.1
|
||||
description: General-purpose web UI for Kubernetes clusters
|
||||
keywords:
|
||||
|
||||
@@ -2,11 +2,10 @@
|
||||
|
||||
[Kubernetes Dashboard](https://github.com/kubernetes/dashboard) is a general purpose, web-based UI for Kubernetes clusters. It allows users to manage applications running in the cluster and troubleshoot them, as well as manage the cluster itself.
|
||||
|
||||
|
||||
## TL;DR;
|
||||
## TL;DR
|
||||
|
||||
```console
|
||||
$ helm install stable/kubernetes-dashboard
|
||||
helm install stable/kubernetes-dashboard
|
||||
```
|
||||
|
||||
## Introduction
|
||||
@@ -18,7 +17,7 @@ This chart bootstraps a [Kubernetes Dashboard](https://github.com/kubernetes/das
|
||||
To install the chart with the release name `my-release`:
|
||||
|
||||
```console
|
||||
$ helm install stable/kubernetes-dashboard --name my-release
|
||||
helm install stable/kubernetes-dashboard --name my-release
|
||||
```
|
||||
|
||||
The command deploys kubernetes-dashboard on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
|
||||
@@ -28,12 +27,13 @@ The command deploys kubernetes-dashboard on the Kubernetes cluster in the defaul
|
||||
To uninstall/delete the `my-release` deployment:
|
||||
|
||||
```console
|
||||
$ helm delete my-release
|
||||
helm delete my-release
|
||||
```
|
||||
|
||||
The command removes all the Kubernetes components associated with the chart and deletes the release.
|
||||
|
||||
## Access control
|
||||
|
||||
It is critical for the Kubernetes cluster to correctly setup access control of Kubernetes Dashboard. See this [guide](https://github.com/kubernetes/dashboard/wiki/Access-control) for best practises.
|
||||
|
||||
It is highly recommended to use RBAC with minimal privileges needed for Dashboard to run.
|
||||
@@ -58,7 +58,7 @@ The following table lists the configurable parameters of the kubernetes-dashboar
|
||||
| `service.internalPort` | Dashboard internal port | 443 |
|
||||
| `ingress.annotations` | Specify ingress class | `kubernetes.io/ingress.class: nginx` |
|
||||
| `ingress.enabled` | Enable ingress controller resource | `false` |
|
||||
| `ingress.path` | Path to match against incoming requests. Must begin with a '/' | `/` |
|
||||
| `ingress.paths` | Paths to match against incoming requests. Both `/` and `/*` are required to work on gce ingress. | `[/]` |
|
||||
| `ingress.hosts` | Dashboard Hostnames | `nil` |
|
||||
| `ingress.tls` | Ingress TLS configuration | `[]` |
|
||||
| `resources` | Pod resource requests & limits | `limits: {cpu: 100m, memory: 100Mi}, requests: {cpu: 100m, memory: 100Mi}` |
|
||||
@@ -72,14 +72,14 @@ The following table lists the configurable parameters of the kubernetes-dashboar
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||
|
||||
```console
|
||||
$ helm install stable/kubernetes-dashboard --name my-release \
|
||||
helm install stable/kubernetes-dashboard --name my-release \
|
||||
--set=service.externalPort=8080,resources.limits.cpu=200m
|
||||
```
|
||||
|
||||
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,
|
||||
|
||||
```console
|
||||
$ helm install stable/kubernetes-dashboard --name my-release -f values.yaml
|
||||
helm install stable/kubernetes-dashboard --name my-release -f values.yaml
|
||||
```
|
||||
|
||||
> **Tip**: You can use the default [values.yaml](values.yaml)
|
||||
@@ -87,6 +87,11 @@ $ helm install stable/kubernetes-dashboard --name my-release -f values.yaml
|
||||
## Using the dashboard with 'kubectl proxy'
|
||||
|
||||
When running 'kubectl proxy', the address `localhost:8001/ui` automatically expands to `http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/`. For this to reach the dashboard, the name of the service must be 'kubernetes-dashboard', not any other value as set by Helm. You can manually specify this using the value 'fullnameOverride':
|
||||
|
||||
```
|
||||
fullnameOverride: 'kubernetes-dashboard'
|
||||
```
|
||||
|
||||
### Ugrade from 0.x.x to 1.x.x
|
||||
|
||||
Upgrade from 0.x.x version to 1.x.x version is seamless if you use default `ingress.path` value. If you have non-default `ingress.path` values with version 0.x.x, you need to add your custom path in `ingress.paths` list value as shown as examples in `values.yaml`.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
{{- $serviceName := include "kubernetes-dashboard.fullname" . -}}
|
||||
{{- $servicePort := .Values.service.externalPort -}}
|
||||
{{- $path := .Values.ingress.path -}}
|
||||
{{- $paths := .Values.ingress.paths -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
@@ -22,19 +22,23 @@ spec:
|
||||
- host: {{ $host }}
|
||||
http:
|
||||
paths:
|
||||
- path: {{ $path }}
|
||||
{{- range $p := $paths }}
|
||||
- path: {{ $p }}
|
||||
backend:
|
||||
serviceName: {{ $serviceName }}
|
||||
servicePort: {{ $servicePort }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- else }}
|
||||
- http:
|
||||
paths:
|
||||
- path: {{ $path }}
|
||||
{{- range $p := $paths }}
|
||||
- path: {{ $p }}
|
||||
backend:
|
||||
serviceName: {{ $serviceName }}
|
||||
servicePort: {{ $servicePort }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
{{ toYaml .Values.ingress.tls | indent 4 }}
|
||||
|
||||
@@ -21,8 +21,10 @@ spec:
|
||||
- port: {{ .Values.service.externalPort }}
|
||||
{{- if .Values.enableInsecureLogin }}
|
||||
targetPort: 9090
|
||||
name: "http"
|
||||
{{- else }}
|
||||
targetPort: 8443
|
||||
name: "https"
|
||||
{{- end }}
|
||||
{{- if hasKey .Values.service "nodePort" }}
|
||||
nodePort: {{ .Values.service.nodePort }}
|
||||
|
||||
@@ -55,8 +55,11 @@ service:
|
||||
|
||||
## Kubernetes Dashboard Service annotations
|
||||
##
|
||||
## For GCE ingress, the following annotation is required:
|
||||
## service.alpha.kubernetes.io/app-protocols: '{"https":"HTTPS"}' if enableInsecureLogin=false
|
||||
## or
|
||||
## service.alpha.kubernetes.io/app-protocols: '{"http":"HTTP"}' if enableInsecureLogin=true
|
||||
annotations: {}
|
||||
# foo.io/bar: "true"
|
||||
|
||||
## Here labels can be added to the Kubernetes Dashboard service
|
||||
##
|
||||
@@ -89,9 +92,11 @@ ingress:
|
||||
# nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
|
||||
|
||||
|
||||
## Kubernetes Dashboard Ingress path
|
||||
## Kubernetes Dashboard Ingress paths
|
||||
##
|
||||
path: /
|
||||
paths:
|
||||
- /
|
||||
# - /*
|
||||
|
||||
## Kubernetes Dashboard Ingress hostnames
|
||||
## Must be provided if Ingress is enabled
|
||||
|
||||
Reference in New Issue
Block a user