From 665fbdc5764d2e3b608d6bf677ab62909ecb2c91 Mon Sep 17 00:00:00 2001 From: Justin McCarty Date: Fri, 31 Jan 2020 09:00:20 -0500 Subject: [PATCH] Add annotation support to pushgateway service (#20351) * Add annotation support to pushgateway service Signed-off-by: Justin McCarty * Correct value for service annotations Signed-off-by: Justin McCarty --- stable/prometheus-pushgateway/Chart.yaml | 2 +- stable/prometheus-pushgateway/README.md | 1 + stable/prometheus-pushgateway/templates/service.yaml | 2 ++ stable/prometheus-pushgateway/values.yaml | 3 +++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/stable/prometheus-pushgateway/Chart.yaml b/stable/prometheus-pushgateway/Chart.yaml index 44a08c7014..181dad20b8 100644 --- a/stable/prometheus-pushgateway/Chart.yaml +++ b/stable/prometheus-pushgateway/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "1.0.1" description: A Helm chart for prometheus pushgateway name: prometheus-pushgateway -version: 1.2.13 +version: 1.2.14 home: https://github.com/prometheus/pushgateway sources: - https://github.com/prometheus/pushgateway diff --git a/stable/prometheus-pushgateway/README.md b/stable/prometheus-pushgateway/README.md index 9be3f3dfa4..b88d60692b 100644 --- a/stable/prometheus-pushgateway/README.md +++ b/stable/prometheus-pushgateway/README.md @@ -56,6 +56,7 @@ The following table lists the configurable parameters of the pushgateway chart a | `service.port` | The service port | `9091` | | `service.nodePort` | The optional service node port when `service.type` is `NodePort` | `` | | `service.targetPort` | The target port of the container | `9091` | +| `serviceAnnotations` | Annotations for the service | `{}` | | `serviceLabels` | Labels for service | `{}` | | `serviceAccount.create` | Specifies whether a service account should be created. | `true` | | `serviceAccount.name` | Service account to be used. If not set and `serviceAccount.create` is `true`, a name is generated using the fullname template | | diff --git a/stable/prometheus-pushgateway/templates/service.yaml b/stable/prometheus-pushgateway/templates/service.yaml index 16dff2d866..545b593165 100644 --- a/stable/prometheus-pushgateway/templates/service.yaml +++ b/stable/prometheus-pushgateway/templates/service.yaml @@ -2,6 +2,8 @@ apiVersion: v1 kind: Service metadata: name: {{ template "prometheus-pushgateway.fullname" . }} + annotations: +{{ .Values.serviceAnnotations | toYaml | indent 4 }} labels: {{ template "prometheus-pushgateway.defaultLabels" merge (dict "extraLabels" .Values.serviceLabels) . }} spec: diff --git a/stable/prometheus-pushgateway/values.yaml b/stable/prometheus-pushgateway/values.yaml index d9ff624b71..55d0bf8b4d 100644 --- a/stable/prometheus-pushgateway/values.yaml +++ b/stable/prometheus-pushgateway/values.yaml @@ -17,6 +17,9 @@ podAnnotations: {} # Optional pod labels podLabels: {} +# Optional service annotations +serviceAnnotations: {} + # Optional service labels serviceLabels: {}