Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
6 changes: 5 additions & 1 deletion charts/nginx-gateway-fabric/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ The following table lists the configurable parameters of the NGINX Gateway Fabri
| `nginx.usage.resolver` | The nameserver used to resolve the NGINX Plus usage reporting endpoint. Used with NGINX Instance Manager. | string | `""` |
| `nginx.usage.secretName` | The name of the Secret containing the JWT for NGINX Plus usage reporting. Must exist in the same namespace that the NGINX Gateway Fabric control plane is running in (default namespace: nginx-gateway). | string | `"nplus-license"` |
| `nginx.usage.skipVerify` | Disable client verification of the NGINX Plus usage reporting server certificate. | bool | `false` |
| `nginxGateway` | The nginxGateway section contains configuration for the NGINX Gateway Fabric control plane deployment. | object | `{"affinity":{},"autoscaling":{"enable":false},"config":{"logging":{"level":"info"}},"configAnnotations":{},"extraVolumeMounts":[],"extraVolumes":[],"gatewayClassAnnotations":{},"gatewayClassName":"nginx","gatewayControllerName":"gateway.nginx.org/nginx-gateway-controller","gwAPIExperimentalFeatures":{"enable":false},"gwAPIInferenceExtension":{"enable":false,"endpointPicker":{"disableTLS":false,"skipVerify":true}},"image":{"pullPolicy":"Always","repository":"ghcr.io/nginx/nginx-gateway-fabric","tag":"edge"},"kind":"deployment","labels":{},"leaderElection":{"enable":true,"lockName":""},"lifecycle":{},"metrics":{"enable":true,"port":9113,"secure":false},"name":"","nodeSelector":{},"podAnnotations":{},"priorityClassName":"","productTelemetry":{"enable":true},"readinessProbe":{"enable":true,"initialDelaySeconds":3,"port":8081},"replicas":1,"resources":{},"service":{"annotations":{},"labels":{}},"serviceAccount":{"annotations":{},"imagePullSecret":"","imagePullSecrets":[],"name":""},"snippetsFilters":{"enable":false},"terminationGracePeriodSeconds":30,"tolerations":[],"topologySpreadConstraints":[]}` |
| `nginxGateway` | The nginxGateway section contains configuration for the NGINX Gateway Fabric control plane deployment. | object | `{"affinity":{},"autoscaling":{"enable":false},"config":{"logging":{"level":"info"}},"configAnnotations":{},"extraVolumeMounts":[],"extraVolumes":[],"gatewayClassAnnotations":{},"gatewayClassName":"nginx","gatewayControllerName":"gateway.nginx.org/nginx-gateway-controller","gwAPIExperimentalFeatures":{"enable":false},"gwAPIInferenceExtension":{"enable":false,"endpointPicker":{"disableTLS":false,"skipVerify":true}},"image":{"pullPolicy":"Always","repository":"ghcr.io/nginx/nginx-gateway-fabric","tag":"edge"},"kind":"deployment","labels":{},"leaderElection":{"enable":true,"lockName":""},"lifecycle":{},"metrics":{"enable":true,"port":9113,"secure":false,"service":{"annotations":{},"create":false,"labels":{}},"serviceMonitor":{"create":false,"endpoints":[{"name":"metrics"}]}},"name":"","nodeSelector":{},"podAnnotations":{},"priorityClassName":"","productTelemetry":{"enable":true},"readinessProbe":{"enable":true,"initialDelaySeconds":3,"port":8081},"replicas":1,"resources":{},"service":{"annotations":{},"labels":{}},"serviceAccount":{"annotations":{},"imagePullSecret":"","imagePullSecrets":[],"name":""},"snippetsFilters":{"enable":false},"terminationGracePeriodSeconds":30,"tolerations":[],"topologySpreadConstraints":[]}` |
| `nginxGateway.affinity` | The affinity of the NGINX Gateway Fabric control plane pod. | object | `{}` |
| `nginxGateway.autoscaling` | Autoscaling configuration for the NGINX Gateway Fabric control plane. | object | `{"enable":false}` |
| `nginxGateway.autoscaling.enable` | Enable or disable Horizontal Pod Autoscaler for the control plane. | bool | `false` |
Expand All @@ -272,6 +272,10 @@ The following table lists the configurable parameters of the NGINX Gateway Fabri
| `nginxGateway.metrics.enable` | Enable exposing metrics in the Prometheus format. | bool | `true` |
| `nginxGateway.metrics.port` | Set the port where the Prometheus metrics are exposed. | int | `9113` |
| `nginxGateway.metrics.secure` | Enable serving metrics via https. By default metrics are served via http. Please note that this endpoint will be secured with a self-signed certificate. | bool | `false` |
| `nginxGateway.metrics.service.annotations` | The annotations of the NGINX Gateway Fabric metrics service. | object | `{}` |
| `nginxGateway.metrics.service.create` | Creates a service to expose metrics. | bool | `false` |
| `nginxGateway.metrics.service.labels` | The labels of the NGINX Gateway Fabric metrics service. | object | `{}` |
| `nginxGateway.metrics.serviceMonitor.create` | Creates a serviceMonitor to expose metrics on the kubernetes pods. | bool | `false` |
| `nginxGateway.name` | The name of the NGINX Gateway Fabric deployment - if not present, then by default uses release name given during installation. | string | `""` |
| `nginxGateway.nodeSelector` | The nodeSelector of the NGINX Gateway Fabric control plane pod. | object | `{}` |
| `nginxGateway.podAnnotations` | Set of custom annotations for the NGINX Gateway Fabric pods. | object | `{}` |
Expand Down
26 changes: 26 additions & 0 deletions charts/nginx-gateway-fabric/templates/service-metrics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{{- if and .Values.nginxGateway.metrics.enable .Values.nginxGateway.metrics.service.create }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "nginx-gateway.fullname" . }}-metrics
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/component: {{ include "nginx-gateway.fullname" . }}-metrics
{{- include "nginx-gateway.labels" . | nindent 4 }}
{{- if .Values.nginxGateway.metrics.service.labels }}
{{ toYaml .Values.nginxGateway.metrics.service.labels | indent 4 }}
{{- end }}
{{- if .Values.nginxGateway.metrics.service.annotations }}
annotations:
{{ toYaml .Values.nginxGateway.metrics.service.annotations | indent 4 }}
{{- end }}
spec:
type: ClusterIP
selector:
{{- include "nginx-gateway.selectorLabels" . | nindent 4 }}
ports:
- name: metrics
port: {{ .Values.nginxGateway.metrics.port }}
protocol: TCP
targetPort: {{ .Values.nginxGateway.metrics.port }}
{{- end }}
18 changes: 18 additions & 0 deletions charts/nginx-gateway-fabric/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{- if and .Values.nginxGateway.metrics.enable .Values.nginxGateway.metrics.serviceMonitor.create }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "nginx-gateway.fullname" . }}-metrics
namespace: {{ .Release.Namespace }}
labels:
{{- include "nginx-gateway.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
app.kubernetes.io/component: {{ include "nginx-gateway.fullname" . }}-metrics
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
endpoints:
{{- toYaml .Values.nginxGateway.metrics.serviceMonitor.endpoints | nindent 4 }}
{{- end }}
63 changes: 63 additions & 0 deletions charts/nginx-gateway-fabric/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,69 @@
"required": [],
"title": "secure",
"type": "boolean"
},
"service": {
"properties": {
"annotations": {
"description": "The annotations of the NGINX Gateway Fabric metrics service.",
"required": [],
"title": "annotations",
"type": "object"
},
"create": {
"default": false,
"description": "Creates a service to expose metrics.",
"required": [],
"title": "create",
"type": "boolean"
},
"labels": {
"description": "The labels of the NGINX Gateway Fabric metrics service.",
"required": [],
"title": "labels",
"type": "object"
}
},
"required": [],
"title": "service",
"type": "object"
},
"serviceMonitor": {
"properties": {
"create": {
"default": false,
"description": "Creates a serviceMonitor to expose metrics on the kubernetes pods.",
"required": [],
"title": "create",
"type": "boolean"
},
"endpoints": {
"description": "A list of endpoints allowed as part of this ServiceMonitor.",
"items": {
"anyOf": [
{
"properties": {
"name": {
"default": "metrics",
"required": [],
"title": "name",
"type": "string"
}
},
"required": [],
"type": "object"
}
],
"required": []
},
"required": [],
"title": "endpoints",
"type": "array"
}
},
"required": [],
"title": "serviceMonitor",
"type": "object"
}
},
"required": [],
Expand Down
18 changes: 18 additions & 0 deletions charts/nginx-gateway-fabric/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,24 @@ nginxGateway:
# Please note that this endpoint will be secured with a self-signed certificate.
secure: false

service:
# -- Creates a service to expose metrics.
create: false

# -- The annotations of the NGINX Gateway Fabric metrics service.
annotations: {}

# -- The labels of the NGINX Gateway Fabric metrics service.
labels: {}

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

# A list of endpoints allowed as part of this ServiceMonitor.
endpoints:
- name: metrics

gwAPIExperimentalFeatures:
# -- Enable the experimental features of Gateway API which are supported by NGINX Gateway Fabric. Requires the Gateway
# APIs installed from the experimental channel.
Expand Down