Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions deployments/helm-chart/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,7 @@ Expand image name.
{{- printf "%s:%s" .Values.controller.image.repository (include "nginx-ingress.tag" .) -}}
{{- end -}}
{{- end -}}

{{- define "nginx-ingress.prometheus.serviceName" -}}
{{- printf "%s-%s" (include "nginx-ingress.fullname" .) "prometheus-service" -}}
{{- end -}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{- if and .Values.prometheus.create .Values.prometheus.service.create}}
apiVersion: v1
kind: Service
metadata:
name: {{ include "nginx-ingress.prometheus.serviceName" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "nginx-ingress.labels" . | nindent 4 }}
{{- if .Values.prometheus.service.labels -}}
{{- toYaml .Values.prometheus.service.labels | nindent 4 }}
{{- end }}
spec:
clusterIP: None
ports:
- name: prometheus
protocol: TCP
port: {{ .Values.prometheus.port }}
targetPort: {{ .Values.prometheus.port }}
selector:
{{- include "nginx-ingress.selectorLabels" . | nindent 4 }}
{{- end }}
26 changes: 25 additions & 1 deletion deployments/helm-chart/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1504,6 +1504,26 @@
"examples": [
"http"
]
},
"service": {
"type": "object",
"default": {},
"properties": {
"create": {
"type": "boolean",
"default": false,
"title": "The create",
"examples": [
true
]
},
"labels": {
"type": "object",
"default": {},
"title": "The labels Schema",
"$ref": "https://raw.githubusercontent.com/nginxinc/kubernetes-json-schema/master/v1.27.4/_definitions.json#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta/properties/labels"
}
}
}
},
"examples": [
Expand Down Expand Up @@ -1755,7 +1775,11 @@
"create": true,
"port": 9113,
"secret": "",
"scheme": "http"
"scheme": "http",
"service": {
"create": false,
"labels": {}
}
},
"serviceInsight": {
"create": true,
Expand Down
33 changes: 20 additions & 13 deletions deployments/helm-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -382,19 +382,6 @@ controller:
## Secret must exist in the same namespace as the helm release.
imagePullSecretName: ""

serviceMonitor:
## Creates a serviceMonitor to expose statistics on the kubernetes pods.
create: false

## Kubernetes object labels to attach to the serviceMonitor object.
labels: {}

## A set of labels to allow the selection of endpoints for the ServiceMonitor.
selectorMatchLabels: {}

## A list of endpoints allowed as part of this ServiceMonitor.
endpoints: []

reportIngressStatus:
## Updates the address field in the status of Ingress resources with an external address of the Ingress Controller.
## You must also specify the source of the external address either through an external service via controller.reportIngressStatus.externalService,
Expand Down Expand Up @@ -452,6 +439,19 @@ controller:
## Configure root filesystem as read-only and add volumes for temporary data.
readOnlyRootFilesystem: false

serviceMonitor:
## Creates a serviceMonitor to expose statistics on the kubernetes pods.
create: false

## Kubernetes object labels to attach to the serviceMonitor object.
labels: {}

## A set of labels to allow the selection of endpoints for the ServiceMonitor.
selectorMatchLabels: {}

## A list of endpoints allowed as part of this ServiceMonitor.
endpoints: []

rbac:
## Configures RBAC.
create: true
Expand All @@ -469,6 +469,13 @@ prometheus:
## Configures the HTTP scheme used.
scheme: http

service:
## Creates a ClusterIP Service to expose Prometheus metrics internally
## Requires prometheus.create=true
create: false

labels: {}

serviceInsight:
## Expose NGINX Plus Service Insight endpoint.
create: false
Expand Down