diff --git a/stable/prometheus-node-exporter/Chart.yaml b/stable/prometheus-node-exporter/Chart.yaml index 61ebb0edc7..478aba49cf 100644 --- a/stable/prometheus-node-exporter/Chart.yaml +++ b/stable/prometheus-node-exporter/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "0.17.0" description: A Helm chart for prometheus node-exporter name: prometheus-node-exporter -version: 0.6.2 +version: 1.0.0 home: https://github.com/prometheus/node_exporter/ sources: - https://github.com/prometheus/node_exporter/ diff --git a/stable/prometheus-node-exporter/README.md b/stable/prometheus-node-exporter/README.md index 74caa90d3d..4bd4b4120b 100644 --- a/stable/prometheus-node-exporter/README.md +++ b/stable/prometheus-node-exporter/README.md @@ -50,6 +50,7 @@ The following table lists the configurable parameters of the Node Exporter chart | `service.type` | Service type | `ClusterIP` | | | `service.port` | The service port | `9100` | | | `service.targetPort` | The target port of the container | `9100` | | +| `service.nodePort` | The node port of the service | | | | `service.annotations` | Kubernetes service annotations | `{prometheus.io/scrape: "true"}` | | | `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-node-exporter/templates/service.yaml b/stable/prometheus-node-exporter/templates/service.yaml index 3bb47956dc..cffe547b10 100644 --- a/stable/prometheus-node-exporter/templates/service.yaml +++ b/stable/prometheus-node-exporter/templates/service.yaml @@ -11,6 +11,9 @@ spec: type: {{ .Values.service.type }} ports: - port: {{ .Values.service.port }} + {{- if ( and (eq .Values.service.type "NodePort" ) (not (empty .Values.service.nodePort)) ) }} + nodePort: {{ .Values.service.nodePort }} + {{- end }} targetPort: {{ .Values.service.targetPort }} protocol: TCP name: metrics diff --git a/stable/prometheus-node-exporter/values.yaml b/stable/prometheus-node-exporter/values.yaml index 7d3fc76a09..3169424347 100644 --- a/stable/prometheus-node-exporter/values.yaml +++ b/stable/prometheus-node-exporter/values.yaml @@ -10,6 +10,7 @@ service: type: ClusterIP port: 9100 targetPort: 9100 + nodePort: annotations: prometheus.io/scrape: "true"