Skip to content

Commit

Permalink
DX-87986: Prometheus metrics port can be configured
Browse files Browse the repository at this point in the history
Change-Id: I3894d74fd70350885d5801ccf57e50d44f0bef6a
  • Loading branch information
iambrianngo committed Apr 19, 2024
1 parent 7996faf commit 3ee0ba6
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
1 change: 1 addition & 0 deletions charts/dremio_v2/docs/Values-Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,7 @@ Type: Boolean
To enable dynamic scaling, this key must be present and set to `true`.

`executor.nodeLifecycleService.metricsPort`

Type: Integer

By default, this value is set to 9010. This is the port where the `/metrics` endpoint is available for a pod.
Expand Down
8 changes: 7 additions & 1 deletion charts/dremio_v2/templates/_helpers_executor.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -421,9 +421,15 @@ tolerations:
Executor - Prometheus Metrics Port Number
*/}}
{{ define "dremio.executor.metricsPortNumber" -}}
{{- $metricsPortNumber := 9010 -}}
{{- $context := index . 0 -}}
{{- $engineName := index . 1 -}}
{{- $engineConfiguration := default (dict) (get (default (dict) $context.Values.executor.engineOverride) $engineName) -}}
{{- $nodeLifecycleServiceConfig := coalesce $engineConfiguration.nodeLifecycleService $context.Values.executor.nodeLifecycleService $context.Values.nodeLifecycleService -}}
{{- if $nodeLifecycleServiceConfig.enabled -}}
{{- $metricsPortNumber := default 9010 $nodeLifecycleServiceConfig.metricsPort -}}
{{- $metricsPortNumber }}
{{- end -}}
{{- end -}}

{{/*
Executor - Prometheus Executor Metrics Port
Expand Down
14 changes: 14 additions & 0 deletions charts/dremio_v2/tests/dremio-executor_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,17 @@ tests:
content:
name: prometheus
containerPort: 9010
- it: Metrics port should be configurable
set:
distStorage:
type: "gcp"
executor:
nodeLifecycleService:
enabled: true
metricsPort: 777
asserts:
- contains:
path: spec.template.spec.containers[0].ports
content:
name: prometheus
containerPort: 777

0 comments on commit 3ee0ba6

Please sign in to comment.