From a91608f4e9bb7d74f4a0180d451474320347973c Mon Sep 17 00:00:00 2001 From: Snorre Lothar von Gohren Edwin Date: Tue, 8 Aug 2017 21:18:20 +0200 Subject: [PATCH] [stable/traefik] Add loadBalancerIP to the Traefik service template (#1607) * Added loadBalancerIP too the traefik service template. This can be set through a value called googleStaticIP, which is None by default. This was needed to make it possible to set up your loadbalancer with helm and assigning an already reserverd static ip in GCP. Im not sure if this works on other clouds, therefor have I called it googleStaticIP. Updated README with proper values * Made value and template cloud specific * changed it to loadbalancerIP * Bump version for feature * another version bump --- stable/traefik/Chart.yaml | 2 +- stable/traefik/README.md | 2 ++ stable/traefik/templates/service.yaml | 3 +++ stable/traefik/values.yaml | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/stable/traefik/Chart.yaml b/stable/traefik/Chart.yaml index a35348dffa..02d71089c8 100755 --- a/stable/traefik/Chart.yaml +++ b/stable/traefik/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: traefik -version: 1.8.0 +version: 1.9.0 appVersion: 1.3.4 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 464700dd7d..2eabe253e8 100644 --- a/stable/traefik/README.md +++ b/stable/traefik/README.md @@ -88,6 +88,7 @@ The following tables lists the configurable parameters of the Traefik chart and | `image` | Traefik image name | `traefik` | | `imageTag` | The version of the official Traefik image to use | `1.3.1` | | `serviceType` | A valid Kubernetes service type | `LoadBalancer` | +| `loadBalancerIP` | An available static IP you have reserved on your cloud platform | None | | `replicas` | The number of replicas to run; __NOTE:__ Full Traefik clustering with leader election is not yet supported, which can affect any configured Let's Encrypt setup; see Clustering section | `1` | | `cpuRequest` | Initial share of CPU requested per Traefik pod | `100m` | | `memoryRequest` | Initial share of memory requested per Traefik pod | `20Mi` | @@ -121,6 +122,7 @@ The following tables lists the configurable parameters of the Traefik chart and | `accessLogs.filePath` | The path to the log file. Logs to stdout if omitted | None | | `accessLogs.format` | What format the log entries should be in. Either `common` or `json` | `common` | + Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example: ```bash diff --git a/stable/traefik/templates/service.yaml b/stable/traefik/templates/service.yaml index 0d0259e314..dda376644c 100644 --- a/stable/traefik/templates/service.yaml +++ b/stable/traefik/templates/service.yaml @@ -20,6 +20,9 @@ metadata: {{- end }} spec: type: {{ .Values.serviceType }} + {{- if .Values.loadBalancerIP }} + loadBalancerIP: {{ .Values.loadBalancerIP }} + {{- end }} selector: app: {{ template "fullname" . }} ports: diff --git a/stable/traefik/values.yaml b/stable/traefik/values.yaml index 23e40b1ce0..a3a5daf478 100644 --- a/stable/traefik/values.yaml +++ b/stable/traefik/values.yaml @@ -2,6 +2,7 @@ image: traefik imageTag: 1.3.4 serviceType: LoadBalancer +loadBalancerIP: replicas: 1 cpuRequest: 100m memoryRequest: 20Mi