Skip to content

Commit

Permalink
Add namespace value nginx ingress (helm#10980)
Browse files Browse the repository at this point in the history
* add servicemonitor namespace value

Signed-off-by: git config --global --edit <[email protected]>

* update readme and chart version

Signed-off-by: git config --global --edit <[email protected]>
  • Loading branch information
dmitriy-lukyanchikov authored and k8s-ci-robot committed Feb 15, 2019
1 parent 5586b43 commit ea08884
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stable/nginx-ingress/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: nginx-ingress
version: 1.3.0
version: 1.3.1
appVersion: 0.22.0
home: https://github.com/kubernetes/ingress-nginx
description: An nginx Ingress controller that uses ConfigMap to store the nginx configuration.
Expand Down
1 change: 1 addition & 0 deletions stable/nginx-ingress/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ Parameter | Description | Default
`controller.metrics.service.type` | type of Prometheus metrics service to create | `ClusterIP`
`controller.metrics.serviceMonitor.enabled` | Set this to `true` to create ServiceMonitor for Prometheus operator | `false`
`controller.metrics.serviceMonitor.additionalLabels` | Additional labels that can be used so ServiceMonitor will be discovered by Prometheus | `{}`
`controller.metrics.serviceMonitor.namespace` | namespace where servicemonitor resource should be created | `the same namespace as nginx ingress`
`controller.customTemplate.configMapName` | configMap containing a custom nginx template | `""`
`controller.customTemplate.configMapKey` | configMap key containing the nginx template | `""`
`controller.headers` | configMap key:value pairs containing the [custom headers](https://github.com/kubernetes/ingress-nginx/tree/master/docs/examples/customization/custom-headers) for Nginx | `{}`
Expand Down
3 changes: 3 additions & 0 deletions stable/nginx-ingress/templates/controller-servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "nginx-ingress.controller.fullname" . }}
{{- if .Values.controller.metrics.serviceMonitor.namespace }}
namespace: {{ .Values.controller.metrics.serviceMonitor.namespace }}
{{- end }}
labels:
app: {{ template "nginx-ingress.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
Expand Down
1 change: 1 addition & 0 deletions stable/nginx-ingress/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ controller:
serviceMonitor:
enabled: false
additionalLabels: {}
namespace: ""

lifecycle: {}

Expand Down

0 comments on commit ea08884

Please sign in to comment.