From 16879ca3dbd4919f77cefb3c712154ac7549cb6c Mon Sep 17 00:00:00 2001 From: Art3mK Date: Mon, 4 Mar 2019 21:56:15 +0200 Subject: [PATCH] [stable/traefik]: add configurable host ports for deployments (#11692) * [stable/traefik]: add configurable host ports for deployments Signed-off-by: Art3mK * [stable/traefik] provide defaults for host ports Signed-off-by: Art3mK --- stable/traefik/Chart.yaml | 2 +- stable/traefik/README.md | 3 +++ stable/traefik/templates/deployment.yaml | 6 +++--- stable/traefik/values.yaml | 3 +++ 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/stable/traefik/Chart.yaml b/stable/traefik/Chart.yaml index a186f8f2ea..cd26e47635 100644 --- a/stable/traefik/Chart.yaml +++ b/stable/traefik/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: traefik -version: 1.62.0 +version: 1.62.1 appVersion: 1.7.9 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 50b0a28022..4e09c8dfc0 100644 --- a/stable/traefik/README.md +++ b/stable/traefik/README.md @@ -201,8 +201,11 @@ The following table lists the configurable parameters of the Traefik chart and t | `deployment.podAnnotations` | Annotations for the Traefik pod definition | None | | `deployment.podLabels` | Labels for the Traefik pod definition | None | | `deployment.hostPort.httpEnabled` | Whether to enable hostPort binding to host for http. | `false` | +| `deployment.hostPort.httpPort` | Desired host port used for http requests. | `80` | | `deployment.hostPort.httpsEnabled` | Whether to enable hostPort binding to host for https. | `false` | +| `deployment.hostPort.httpsPort` | Desired host port used for https requests. | `443` | | `deployment.hostPort.dashboardEnabled` | Whether to enable hostPort binding to host for dashboard. | `false` | +| `deployment.hostPort.dashboardPort` | Desired host port used for accessing dashboard. | `8080` | | `sendAnonymousUsage` | Send anonymous usage statistics. | `false` | | `tracing.enabled` | Whether to enable request tracing | `false` | | `tracing.backend` | Tracing backend to use, either `jaeger` or `zipkin` or `datadog` | None | diff --git a/stable/traefik/templates/deployment.yaml b/stable/traefik/templates/deployment.yaml index 4f562c731a..f4b263672a 100644 --- a/stable/traefik/templates/deployment.yaml +++ b/stable/traefik/templates/deployment.yaml @@ -126,7 +126,7 @@ spec: - name: http containerPort: 80 {{- if .Values.deployment.hostPort.httpEnabled }} - hostPort: 80 + hostPort: {{ default 80 .Values.deployment.hostPort.httpPort }} {{- end }} protocol: TCP - name: httpn @@ -135,14 +135,14 @@ spec: - name: https containerPort: 443 {{- if .Values.deployment.hostPort.httpsEnabled }} - hostPort: 443 + hostPort: {{ default 443 .Values.deployment.hostPort.httpsPort }} {{- end }} protocol: TCP {{- if .Values.dashboard.enabled }} - name: dash containerPort: 8080 {{- if .Values.deployment.hostPort.dashboardEnabled }} - hostPort: 8080 + hostPort: {{ default 8080 .Values.deployment.hostPort.dashboardPort }} {{- end }} protocol: TCP {{- end }} diff --git a/stable/traefik/values.yaml b/stable/traefik/values.yaml index 5e41b74f8e..a0c639d670 100644 --- a/stable/traefik/values.yaml +++ b/stable/traefik/values.yaml @@ -370,6 +370,9 @@ deployment: httpEnabled: false httpsEnabled: false dashboardEnabled: false + # httpPort: 80 + # httpsPort: 443 + # dashboardPort: 8080 sendAnonymousUsage: false tracing: enabled: false