From 0488c623ee045c90ac3d34a6e7803b3da83a2f62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1ty=C3=A1s=20Somfai?= Date: Wed, 23 Jan 2019 18:25:44 +0100 Subject: [PATCH] [stable/traefik] dashboard serviceType (#10788) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * added dashboard.serviceType value to be able to deploy to GKE Signed-off-by: Ole Rößner * added dashboard.serviceType value to be able to deploy to GKE Signed-off-by: Ole Rößner * added dashboard.serviceType value to be able to deploy to GKE Signed-off-by: Ole Rößner * removed executable flag from yaml files Signed-off-by: Matyas Somfai * added a default value for dashboard.serviceType; modified the service to use a named port; fixed a link in the readme Signed-off-by: Matyas Somfai --- stable/traefik/Chart.yaml | 2 +- stable/traefik/README.md | 3 ++- stable/traefik/templates/dashboard-ingress.yaml | 2 +- stable/traefik/templates/dashboard-service.yaml | 4 +++- stable/traefik/values.yaml | 1 + 5 files changed, 8 insertions(+), 4 deletions(-) mode change 100755 => 100644 stable/traefik/Chart.yaml mode change 100755 => 100644 stable/traefik/values.yaml diff --git a/stable/traefik/Chart.yaml b/stable/traefik/Chart.yaml old mode 100755 new mode 100644 index 3e55f3e153..05b477c57c --- a/stable/traefik/Chart.yaml +++ b/stable/traefik/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: traefik -version: 1.59.1 +version: 1.59.2 appVersion: 1.7.7 description: A Traefik based Kubernetes ingress controller with Let's Encrypt support keywords: diff --git a/stable/traefik/README.md b/stable/traefik/README.md index cec539c089..9b34a1c359 100644 --- a/stable/traefik/README.md +++ b/stable/traefik/README.md @@ -161,6 +161,7 @@ The following table lists the configurable parameters of the Traefik chart and t | `kvprovider.etcd.useAPIV3` | Use V3 or use V2 API of ETCD | `false` | | `dashboard.enabled` | Whether to enable the Traefik dashboard | `false` | | `dashboard.domain` | Domain for the Traefik dashboard | `traefik.example.com` | +| `dashboard.serviceType` | ServiceType for the Traefik dashboard Service | `ClusterIP` | | `dashboard.service.annotations` | Annotations for the Traefik dashboard Service definition, specified as a map | None | | `dashboard.ingress.annotations` | Annotations for the Traefik dashboard Ingress definition, specified as a map | None | | `dashboard.ingress.labels` | Labels for the Traefik dashboard Ingress definition, specified as a map | None | @@ -287,7 +288,7 @@ Then you are good to migrate your old certs into the kvprovider and run traefik ### Dashboard Basic Auth -[Basic auth](https://docs.traefik.io/toml/#api-backend) can be specified via `dashboard.auth.basic` as a map of usernames to passwords as below. +[Basic auth](https://docs.traefik.io/configuration/entrypoints/#authentication) can be specified via `dashboard.auth.basic` as a map of usernames to passwords as below. See the linked Traefik documentation for accepted passwords encodings. It is advised to single quote passwords to avoid issues with special characters: diff --git a/stable/traefik/templates/dashboard-ingress.yaml b/stable/traefik/templates/dashboard-ingress.yaml index b863a9d736..7d399971e7 100644 --- a/stable/traefik/templates/dashboard-ingress.yaml +++ b/stable/traefik/templates/dashboard-ingress.yaml @@ -26,7 +26,7 @@ spec: paths: - backend: serviceName: {{ template "traefik.fullname" . }}-dashboard - servicePort: 80 + servicePort: dashboard-http {{- if .Values.dashboard.ingress.tls }} tls: {{ toYaml .Values.dashboard.ingress.tls | indent 4 }} diff --git a/stable/traefik/templates/dashboard-service.yaml b/stable/traefik/templates/dashboard-service.yaml index 945be6d1a1..3b1ee289fc 100644 --- a/stable/traefik/templates/dashboard-service.yaml +++ b/stable/traefik/templates/dashboard-service.yaml @@ -15,10 +15,12 @@ metadata: {{- end }} {{- end }} spec: + type: {{ .Values.dashboard.serviceType | default ("ClusterIP") }} selector: app: {{ template "traefik.name" . }} release: {{ .Release.Name }} ports: - - port: 80 + - name: dashboard-http + port: 80 targetPort: 8080 {{- end }} diff --git a/stable/traefik/values.yaml b/stable/traefik/values.yaml old mode 100755 new mode 100644 index 00d50afd29..a9d2da9c10 --- a/stable/traefik/values.yaml +++ b/stable/traefik/values.yaml @@ -271,6 +271,7 @@ acme: dashboard: enabled: false domain: traefik.example.com + # serviceType: ClusterIP service: {} # annotations: # key: value