From af96abbe108d273269bbad1e02b6f4dae1a4e224 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Wed, 16 Oct 2019 15:51:40 +0100 Subject: [PATCH] [stable/traefik] allow labels and annotations to be specified (#16917) * [stable/traefik] allow labels and annotations to be specified Signed-off-by: Nick Roberts (nickrobertssky) * [stable/traefik] bump chart version Signed-off-by: Nick Roberts (nickrobertssky) * [stable/traefik] add new values to readme Signed-off-by: Nick Roberts (nickrobertssky) * [stable/traefik] fix issue when labels no specified Signed-off-by: Nick Roberts (nickrobertssky) --- stable/traefik/Chart.yaml | 2 +- stable/traefik/README.md | 2 ++ stable/traefik/templates/deployment.yaml | 7 +++++++ stable/traefik/values.yaml | 5 +++++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/stable/traefik/Chart.yaml b/stable/traefik/Chart.yaml index b5a62acfb3..db8ab4a674 100644 --- a/stable/traefik/Chart.yaml +++ b/stable/traefik/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: traefik -version: 1.78.2 +version: 1.78.3 appVersion: 1.7.14 description: A Traefik based Kubernetes ingress controller with Let's Encrypt support diff --git a/stable/traefik/README.md b/stable/traefik/README.md index 7e24ad1ac1..c1885daad4 100644 --- a/stable/traefik/README.md +++ b/stable/traefik/README.md @@ -213,6 +213,8 @@ The following table lists the configurable parameters of the Traefik chart and t | `metrics.statsd.enabled` | Whether to enable pushing metrics to Statsd. | `false` | | `metrics.statsd.address` | Statsd host in the format : | `localhost:8125` | | `metrics.statsd.pushInterval` | How often to push metrics to Statsd. | `10s` | +| `deployment.podAnnotations` | Annotations for the Traefik deployment. | None | +| `deployment.podLabels` | Labels for the Traefik deployment. | None | | `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` | diff --git a/stable/traefik/templates/deployment.yaml b/stable/traefik/templates/deployment.yaml index 2784babaa8..243522d886 100644 --- a/stable/traefik/templates/deployment.yaml +++ b/stable/traefik/templates/deployment.yaml @@ -11,6 +11,13 @@ metadata: chart: {{ template "traefik.chart" . }} release: {{ .Release.Name | quote }} heritage: {{ .Release.Service | quote }} + {{- if .Values.deployment.labels }} + {{- toYaml .Values.deployment.labels | nindent 4 }} + {{- end }} + {{- with .Values.deployment.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} spec: replicas: {{ default 1 .Values.replicas }} selector: diff --git a/stable/traefik/values.yaml b/stable/traefik/values.yaml index 7d644e6116..f029b5cb20 100644 --- a/stable/traefik/values.yaml +++ b/stable/traefik/values.yaml @@ -429,6 +429,11 @@ metrics: # address: localhost:8125 # pushinterval: 10s deployment: + # labels to add to the deployment + # labels: + # key: value + # annotations: + # key: value # labels to add to the pod container metadata # podLabels: # key: value