[stable/helm-exporter] Add support for using ingress (#14442)

* Add support for using ingress

Signed-off-by: Christopher Farrenden <chris.farrenden@domain.com.au>

* Use less convoluted annotation pulling

Signed-off-by: Christopher Farrenden <chris.farrenden@domain.com.au>

* Revert clusterIP conditional

Signed-off-by: Christopher Farrenden <chris.farrenden@domain.com.au>
This commit is contained in:
Chris
2019-06-05 16:28:10 -07:00
committed by Kubernetes Prow Robot
parent 3c5cc22c59
commit 459d44a5ef
4 changed files with 39 additions and 2 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "0.4.0"
description: Exports helm release stats to prometheus
name: helm-exporter
version: 0.2.4
version: 0.3.0
home: https://github.com/sstarcher/helm-exporter
sources:
- https://github.com/sstarcher/helm-exporter
+4 -1
View File
@@ -52,7 +52,10 @@ Parameter | Description | Default
`serviceMonitor.interval` | Interval at which metrics should be scraped | ``
`serviceMonitor.namespace` | The namespace where the Prometheus Operator is deployed | ``
`serviceMonitor.additionalLabels` | Additional labels to add to the ServiceMonitor | `{}`
`ingress.enabled` | Set to true if using an ingress | `false`
`ingress.annotations` | Ingress annotations | `{}`
`ingress.path` | Ingress path | `/`
`ingress.host` | Ingress hostname e.g example.com | ``
```console
$ helm install stable/helm-exporter --name my-release
```
@@ -0,0 +1,24 @@
{{- if .Values.ingress.enabled }}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ include "helm-exporter.fullname" . }}
labels:
app.kubernetes.io/name: {{ include "helm-exporter.name" . }}
helm.sh/chart: {{ include "helm-exporter.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
rules:
- host: {{ .Values.ingress.host }}
http:
paths:
- path: {{ .Values.ingress.path }}
backend:
serviceName: {{ include "helm-exporter.name" . }}
servicePort: 9571
{{- end }}
+10
View File
@@ -36,3 +36,13 @@ serviceMonitor:
interval:
namespace:
additionalLabels: {}
ingress:
# Specifies whether an Ingress should be created
enabled: false
annotations: {}
# kubernetes.io/ingress.class: nginx
path: /
# Name of host e.g example.com
host: