From 182c0c5618d73c180d736491bb8ec420b018aebf Mon Sep 17 00:00:00 2001 From: Steve Wilkerson Date: Fri, 12 Jan 2018 08:28:48 -0600 Subject: [PATCH] Remove unneeded context in prometheus service annotation Removes an unused context declaration from the prometheus service annotation template in helm-toolkit, and removes all references to it Change-Id: I57612c1504cf046f367ee10d26ef3062ebe528d3 --- .../templates/snippets/_prometheus_service_annotations.tpl | 1 - .../templates/service-controller-manager.yaml | 2 +- .../templates/service-kube-metrics.yaml | 2 +- prometheus-kube-state-metrics/templates/service-scheduler.yaml | 2 +- prometheus-node-exporter/templates/service.yaml | 2 +- prometheus-openstack-exporter/templates/service.yaml | 2 +- prometheus/templates/service.yaml | 2 +- 7 files changed, 6 insertions(+), 7 deletions(-) diff --git a/helm-toolkit/templates/snippets/_prometheus_service_annotations.tpl b/helm-toolkit/templates/snippets/_prometheus_service_annotations.tpl index a9ef94b937..e2305ae165 100644 --- a/helm-toolkit/templates/snippets/_prometheus_service_annotations.tpl +++ b/helm-toolkit/templates/snippets/_prometheus_service_annotations.tpl @@ -25,7 +25,6 @@ limitations under the License. {{- define "helm-toolkit.snippets.prometheus_service_annotations" -}} {{- $endpoint := index . 0 -}} -{{- $context := index . 1 -}} prometheus.io/scrape: {{ $endpoint.scrape | quote }} prometheus.io/scheme: {{ $endpoint.scheme.default | quote }} prometheus.io/path: {{ $endpoint.path.default | quote }} diff --git a/prometheus-kube-state-metrics/templates/service-controller-manager.yaml b/prometheus-kube-state-metrics/templates/service-controller-manager.yaml index a3fcecf6af..6e19486d3e 100644 --- a/prometheus-kube-state-metrics/templates/service-controller-manager.yaml +++ b/prometheus-kube-state-metrics/templates/service-controller-manager.yaml @@ -25,7 +25,7 @@ metadata: labels: {{ tuple $envAll "controller-manager" "metrics" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} annotations: -{{ tuple $endpoint $envAll | include "helm-toolkit.snippets.prometheus_service_annotations" | indent 4 }} +{{ tuple $endpoint | include "helm-toolkit.snippets.prometheus_service_annotations" | indent 4 }} spec: selector: component: kube-controller-manager diff --git a/prometheus-kube-state-metrics/templates/service-kube-metrics.yaml b/prometheus-kube-state-metrics/templates/service-kube-metrics.yaml index c361413e57..c1991e822e 100644 --- a/prometheus-kube-state-metrics/templates/service-kube-metrics.yaml +++ b/prometheus-kube-state-metrics/templates/service-kube-metrics.yaml @@ -25,7 +25,7 @@ metadata: labels: {{ tuple $envAll "kube-state-metrics" "metrics" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} annotations: -{{ tuple $endpoint $envAll | include "helm-toolkit.snippets.prometheus_service_annotations" | indent 4 }} +{{ tuple $endpoint | include "helm-toolkit.snippets.prometheus_service_annotations" | indent 4 }} spec: ports: - name: http diff --git a/prometheus-kube-state-metrics/templates/service-scheduler.yaml b/prometheus-kube-state-metrics/templates/service-scheduler.yaml index 2b2e6c8d86..e921209c9e 100644 --- a/prometheus-kube-state-metrics/templates/service-scheduler.yaml +++ b/prometheus-kube-state-metrics/templates/service-scheduler.yaml @@ -25,7 +25,7 @@ metadata: labels: {{ tuple $envAll "kube-scheduler" "metrics" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} annotations: -{{ tuple $endpoint $envAll | include "helm-toolkit.snippets.prometheus_service_annotations" | indent 4 }} +{{ tuple $endpoint | include "helm-toolkit.snippets.prometheus_service_annotations" | indent 4 }} spec: selector: component: kube-scheduler diff --git a/prometheus-node-exporter/templates/service.yaml b/prometheus-node-exporter/templates/service.yaml index 6eeec9012b..1a0a9b69af 100644 --- a/prometheus-node-exporter/templates/service.yaml +++ b/prometheus-node-exporter/templates/service.yaml @@ -25,7 +25,7 @@ metadata: labels: {{ tuple $envAll "node_exporter" "metrics" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} annotations: -{{ tuple $endpoint $envAll | include "helm-toolkit.snippets.prometheus_service_annotations" | indent 4 }} +{{ tuple $endpoint | include "helm-toolkit.snippets.prometheus_service_annotations" | indent 4 }} spec: type: ClusterIP clusterIP: None diff --git a/prometheus-openstack-exporter/templates/service.yaml b/prometheus-openstack-exporter/templates/service.yaml index e498d13bf1..678e4a7950 100644 --- a/prometheus-openstack-exporter/templates/service.yaml +++ b/prometheus-openstack-exporter/templates/service.yaml @@ -25,7 +25,7 @@ metadata: labels: {{ tuple $envAll "openstack-exporter" "metrics" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} annotations: -{{ tuple $endpoint $envAll | include "helm-toolkit.snippets.prometheus_service_annotations" | indent 4 }} +{{ tuple $endpoint | include "helm-toolkit.snippets.prometheus_service_annotations" | indent 4 }} spec: ports: - name: http diff --git a/prometheus/templates/service.yaml b/prometheus/templates/service.yaml index 5caa577130..dd8e4985dc 100644 --- a/prometheus/templates/service.yaml +++ b/prometheus/templates/service.yaml @@ -25,7 +25,7 @@ metadata: labels: {{ tuple $envAll "prometheus" "metrics" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} annotations: -{{ tuple $endpoint $envAll | include "helm-toolkit.snippets.prometheus_service_annotations" | indent 4 }} +{{ tuple $endpoint | include "helm-toolkit.snippets.prometheus_service_annotations" | indent 4 }} spec: ports: - name: prom-metrics