From fd8ba500b09add14c7698e1a60b2e4975278c90f Mon Sep 17 00:00:00 2001 From: Sebastian Daberdaku Date: Thu, 26 Sep 2024 12:47:21 +0200 Subject: [PATCH] Add option to enable JMX exporter on workers --- charts/trino/README.md | 44 +++++++++++++++ .../templates/configmap-coordinator.yaml | 11 ++-- .../templates/configmap-jmx-exporter.yaml | 22 +++++++- charts/trino/templates/configmap-worker.yaml | 8 +++ .../templates/deployment-coordinator.yaml | 33 +++++------ charts/trino/templates/deployment-worker.yaml | 33 +++++++++++ ...{service.yaml => service-coordinator.yaml} | 6 +- charts/trino/templates/service-worker.yaml | 27 +++++++++ ...r.yaml => servicemonitor-coordinator.yaml} | 10 ++-- .../templates/servicemonitor-worker.yaml | 24 ++++++++ charts/trino/templates/tests/test-jmx.yaml | 56 +++++++++++++++---- charts/trino/values.yaml | 44 +++++++++++++++ test-values.yaml | 4 +- test.sh | 1 + 14 files changed, 275 insertions(+), 48 deletions(-) rename charts/trino/templates/{service.yaml => service-coordinator.yaml} (79%) create mode 100644 charts/trino/templates/service-worker.yaml rename charts/trino/templates/{servicemonitor.yaml => servicemonitor-coordinator.yaml} (52%) create mode 100644 charts/trino/templates/servicemonitor-worker.yaml diff --git a/charts/trino/README.md b/charts/trino/README.md index 04a8243e..29eea1ad 100644 --- a/charts/trino/README.md +++ b/charts/trino/README.md @@ -697,6 +697,30 @@ Fast distributed SQL query engine for big data analytics that helps you explore cpu: 100m memory: 128Mi ``` +* `jmx.coordinator` - object, default: `{}` + + Override JMX configurations for the Trino coordinator. + Example + ```yaml + coordinator: + enabled: true + exporter: + enable: true + configProperties: |- + hostPort: localhost:{{- .Values.jmx.registryPort }} + startDelaySeconds: 0 + ssl: false + ``` +* `jmx.worker` - object, default: `{}` + + Override JMX configurations for the Trino workers. + Example + ```yaml + worker: + enabled: true + exporter: + enable: true + ``` * `serviceMonitor.enabled` - bool, default: `false` Set to true to create resources for the [prometheus-operator](https://github.com/prometheus-operator/prometheus-operator). @@ -706,6 +730,26 @@ Fast distributed SQL query engine for big data analytics that helps you explore * `serviceMonitor.interval` - string, default: `"30s"` The serviceMonitor web endpoint interval +* `serviceMonitor.coordinator` - object, default: `{}` + + Override ServiceMonitor configurations for the Trino coordinator. + Example + ```yaml + coordinator: + enabled: true + labels: + prometheus: my-prometheus + ``` +* `serviceMonitor.worker` - object, default: `{}` + + Override ServiceMonitor configurations for the Trino workers. + Example + ```yaml + worker: + enabled: true + labels: + prometheus: my-prometheus + ``` * `commonLabels` - object, default: `{}` Labels that get applied to every resource's metadata diff --git a/charts/trino/templates/configmap-coordinator.yaml b/charts/trino/templates/configmap-coordinator.yaml index 667ab0e3..b1d4153a 100644 --- a/charts/trino/templates/configmap-coordinator.yaml +++ b/charts/trino/templates/configmap-coordinator.yaml @@ -1,3 +1,4 @@ +{{- $coordinatorJmx := merge .Values.jmx.coordinator (omit .Values.jmx "coordinator" "worker") -}} apiVersion: v1 kind: ConfigMap metadata: @@ -43,8 +44,8 @@ data: {{- range $configValue := .Values.coordinator.additionalJVMConfig }} {{ $configValue }} {{- end }} - {{- if .Values.jmx.enabled }} - -Dcom.sun.management.jmxremote.rmi.port={{ .Values.jmx.serverPort }} + {{- if $coordinatorJmx.enabled }} + -Dcom.sun.management.jmxremote.rmi.port={{- $coordinatorJmx.serverPort }} {{- end }} config.properties: | @@ -72,9 +73,9 @@ data: http-server.https.port={{ .Values.server.config.https.port }} http-server.https.keystore.path={{ .Values.server.config.https.keystore.path }} {{- end }} - {{- if .Values.jmx.enabled }} - jmx.rmiregistry.port={{ .Values.jmx.registryPort }} - jmx.rmiserver.port={{ .Values.jmx.serverPort }} + {{- if $coordinatorJmx.enabled }} + jmx.rmiregistry.port={{- $coordinatorJmx.registryPort }} + jmx.rmiserver.port={{- $coordinatorJmx.serverPort }} {{- end }} {{- if .Values.server.coordinatorExtraConfig }} {{- .Values.server.coordinatorExtraConfig | nindent 4 }} diff --git a/charts/trino/templates/configmap-jmx-exporter.yaml b/charts/trino/templates/configmap-jmx-exporter.yaml index cc6fe1a4..e11f3478 100644 --- a/charts/trino/templates/configmap-jmx-exporter.yaml +++ b/charts/trino/templates/configmap-jmx-exporter.yaml @@ -1,13 +1,29 @@ -{{- if .Values.jmx.exporter.enabled }} +{{- $coordinatorJmx := merge .Values.jmx.coordinator (omit .Values.jmx "coordinator" "worker") -}} +{{- if $coordinatorJmx.exporter.enabled }} apiVersion: v1 kind: ConfigMap metadata: - name: {{ template "trino.fullname" . }}-jmx-exporter-config + name: {{ template "trino.fullname" . }}-jmx-exporter-config-coordinator namespace: {{ .Release.Namespace }} labels: {{- include "trino.labels" . | nindent 4 }} app.kubernetes.io/component: jmx data: jmx-exporter-config.yaml: |- - {{- tpl .Values.jmx.exporter.configProperties . | nindent 4 }} + {{- tpl $coordinatorJmx.exporter.configProperties . | nindent 4 }} +{{- end }} +{{- $workerJmx := merge .Values.jmx.worker (omit .Values.jmx "coordinator" "worker") -}} +{{- if $workerJmx.exporter.enabled }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "trino.fullname" . }}-jmx-exporter-config-worker + namespace: {{ .Release.Namespace }} + labels: + {{- include "trino.labels" . | nindent 4 }} + app.kubernetes.io/component: jmx +data: + jmx-exporter-config.yaml: |- + {{- tpl $workerJmx.exporter.configProperties . | nindent 4 }} {{- end }} diff --git a/charts/trino/templates/configmap-worker.yaml b/charts/trino/templates/configmap-worker.yaml index 23fb7432..4a10dca9 100644 --- a/charts/trino/templates/configmap-worker.yaml +++ b/charts/trino/templates/configmap-worker.yaml @@ -1,3 +1,4 @@ +{{- $workerJmx := merge .Values.jmx.worker (omit .Values.jmx "coordinator" "worker") -}} {{- if gt (int .Values.server.workers) 0 }} apiVersion: v1 kind: ConfigMap @@ -44,6 +45,9 @@ data: {{- range $configValue := .Values.worker.additionalJVMConfig }} {{ $configValue }} {{- end }} + {{- if $workerJmx.enabled }} + -Dcom.sun.management.jmxremote.rmi.port={{- $workerJmx.serverPort }} + {{- end }} config.properties: | coordinator=false @@ -57,6 +61,10 @@ data: {{- range $configValue := .Values.additionalConfigProperties }} {{ $configValue }} {{- end }} + {{- if $workerJmx.enabled }} + jmx.rmiregistry.port={{- $workerJmx.registryPort }} + jmx.rmiserver.port={{- $workerJmx.serverPort }} + {{- end }} {{- if .Values.server.workerExtraConfig }} {{- .Values.server.workerExtraConfig | nindent 4 }} {{- end }} diff --git a/charts/trino/templates/deployment-coordinator.yaml b/charts/trino/templates/deployment-coordinator.yaml index 5b6cede4..401f1f76 100644 --- a/charts/trino/templates/deployment-coordinator.yaml +++ b/charts/trino/templates/deployment-coordinator.yaml @@ -1,3 +1,4 @@ +{{- $coordinatorJmx := merge .Values.jmx.coordinator (omit .Values.jmx "coordinator" "worker") -}} apiVersion: apps/v1 kind: Deployment metadata: @@ -79,10 +80,10 @@ spec: path: group.db {{- end }} {{- end }} - {{- if .Values.jmx.exporter.enabled }} + {{- if $coordinatorJmx.exporter.enabled }} - name: jmx-exporter-config-volume configMap: - name: {{ template "trino.fullname" . }}-jmx-exporter-config + name: {{ template "trino.fullname" . }}-jmx-exporter-config-coordinator {{- end }} {{- range .Values.configMounts }} - name: {{ .name }} @@ -168,16 +169,14 @@ spec: - name: http containerPort: {{ .Values.service.port }} protocol: TCP - {{- with .Values.jmx }} - {{- if .enabled }} + {{- if $coordinatorJmx.enabled }} - name: jmx-registry - containerPort: {{ .registryPort }} + containerPort: {{ $coordinatorJmx.registryPort }} protocol: TCP - name: jmx-server - containerPort: {{ .serverPort }} + containerPort: {{ $coordinatorJmx.serverPort }} protocol: TCP {{- end }} - {{- end }} {{- range $key, $value := .Values.coordinator.additionalExposedPorts }} - name: {{ $value.name }} containerPort: {{ $value.port }} @@ -204,31 +203,25 @@ spec: {{- toYaml .Values.coordinator.lifecycle | nindent 12 }} resources: {{- toYaml .Values.coordinator.resources | nindent 12 }} - {{- with .Values.jmx.exporter }} - {{- if .enabled }} + {{- if $coordinatorJmx.exporter.enabled }} - name: jmx-exporter - image: {{ .image }} - imagePullPolicy: {{ .pullPolicy }} - {{- with .securityContext }} + image: {{ $coordinatorJmx.exporter.image }} + imagePullPolicy: {{ $coordinatorJmx.exporter.pullPolicy }} securityContext: - {{- toYaml . | nindent 12 }} - {{- end }} + {{- toYaml $coordinatorJmx.exporter.securityContext | nindent 12 }} args: - - "{{ .port }}" + - "{{ $coordinatorJmx.exporter.port }}" - /etc/jmx-exporter/jmx-exporter-config.yaml volumeMounts: - mountPath: /etc/jmx-exporter/ name: jmx-exporter-config-volume - {{- with .resources }} resources: - {{- toYaml . | nindent 12 }} - {{- end }} + {{- toYaml $coordinatorJmx.exporter.resources | nindent 12 }} ports: - name: jmx-exporter - containerPort: {{ .port }} + containerPort: {{ $coordinatorJmx.exporter.port }} protocol: TCP {{- end }} - {{- end }} {{- if .Values.sidecarContainers.coordinator }} {{- toYaml .Values.sidecarContainers.coordinator | nindent 8 }} {{- end }} diff --git a/charts/trino/templates/deployment-worker.yaml b/charts/trino/templates/deployment-worker.yaml index 3f3cfa06..aab20fee 100644 --- a/charts/trino/templates/deployment-worker.yaml +++ b/charts/trino/templates/deployment-worker.yaml @@ -1,3 +1,4 @@ +{{- $workerJmx := merge .Values.jmx.worker (omit .Values.jmx "coordinator" "worker") -}} {{- if gt (int .Values.server.workers) 0 }} apiVersion: apps/v1 kind: Deployment @@ -55,6 +56,11 @@ spec: - name: schemas-volume configMap: name: {{ template "trino.fullname" . }}-schemas-volume-worker + {{- if $workerJmx.exporter.enabled }} + - name: jmx-exporter-config-volume + configMap: + name: {{ template "trino.fullname" . }}-jmx-exporter-config-worker + {{- end }} {{- range .Values.configMounts }} - name: {{ .name }} configMap: @@ -127,6 +133,14 @@ spec: - name: http containerPort: {{ .Values.service.port }} protocol: TCP + {{- if $workerJmx.enabled }} + - name: jmx-registry + containerPort: {{ $workerJmx.registryPort }} + protocol: TCP + - name: jmx-server + containerPort: {{ $workerJmx.serverPort }} + protocol: TCP + {{- end }} {{- range $key, $value := .Values.worker.additionalExposedPorts }} - name: {{ $value.name }} containerPort: {{ $value.port }} @@ -153,6 +167,25 @@ spec: {{- toYaml .Values.worker.lifecycle | nindent 12 }} resources: {{- toYaml .Values.worker.resources | nindent 12 }} + {{- if $workerJmx.exporter.enabled }} + - name: jmx-exporter + image: {{ $workerJmx.exporter.image }} + imagePullPolicy: {{ $workerJmx.exporter.pullPolicy }} + securityContext: + {{- toYaml $workerJmx.exporter.securityContext | nindent 12 }} + args: + - "{{ $workerJmx.exporter.port }}" + - /etc/jmx-exporter/jmx-exporter-config.yaml + volumeMounts: + - mountPath: /etc/jmx-exporter/ + name: jmx-exporter-config-volume + resources: + {{- toYaml $workerJmx.exporter.resources | nindent 12 }} + ports: + - name: jmx-exporter + containerPort: {{ $workerJmx.exporter.port }} + protocol: TCP + {{- end }} {{- if .Values.sidecarContainers.worker }} {{- toYaml .Values.sidecarContainers.worker | nindent 8 }} {{- end }} diff --git a/charts/trino/templates/service.yaml b/charts/trino/templates/service-coordinator.yaml similarity index 79% rename from charts/trino/templates/service.yaml rename to charts/trino/templates/service-coordinator.yaml index 1be5d58e..46a6a0d1 100644 --- a/charts/trino/templates/service.yaml +++ b/charts/trino/templates/service-coordinator.yaml @@ -1,3 +1,4 @@ +{{- $coordinatorJmx := merge .Values.jmx.coordinator (omit .Values.jmx "coordinator" "worker") -}} apiVersion: v1 kind: Service metadata: @@ -5,6 +6,7 @@ metadata: namespace: {{ .Release.Namespace }} labels: {{- include "trino.labels" . | nindent 4 }} + app.kubernetes.io/component: coordinator annotations: {{- toYaml .Values.service.annotations | nindent 4 }} spec: @@ -17,8 +19,8 @@ spec: {{- if .Values.service.nodePort }} nodePort: {{ .Values.service.nodePort }} {{- end }} - {{- if .Values.jmx.exporter.enabled }} - - port: {{ .Values.jmx.exporter.port }} + {{- if $coordinatorJmx.exporter.enabled }} + - port: {{ $coordinatorJmx.exporter.port }} targetPort: jmx-exporter protocol: TCP name: jmx-exporter diff --git a/charts/trino/templates/service-worker.yaml b/charts/trino/templates/service-worker.yaml new file mode 100644 index 00000000..97fec58c --- /dev/null +++ b/charts/trino/templates/service-worker.yaml @@ -0,0 +1,27 @@ +{{- $workerJmx := merge .Values.jmx.worker (omit .Values.jmx "coordinator" "worker") -}} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "trino.fullname" . }}-worker + namespace: {{ .Release.Namespace }} + labels: + {{- include "trino.labels" . | nindent 4 }} + app.kubernetes.io/component: worker + annotations: + {{- toYaml .Values.service.annotations | nindent 4 }} +spec: + clusterIP: None + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + {{- if $workerJmx.exporter.enabled }} + - port: {{$workerJmx.exporter.port }} + targetPort: jmx-exporter + protocol: TCP + name: jmx-exporter + {{- end }} + selector: + {{- include "trino.selectorLabels" . | nindent 4 }} + app.kubernetes.io/component: worker diff --git a/charts/trino/templates/servicemonitor.yaml b/charts/trino/templates/servicemonitor-coordinator.yaml similarity index 52% rename from charts/trino/templates/servicemonitor.yaml rename to charts/trino/templates/servicemonitor-coordinator.yaml index e71e60b7..e7fe53ea 100644 --- a/charts/trino/templates/servicemonitor.yaml +++ b/charts/trino/templates/servicemonitor-coordinator.yaml @@ -1,4 +1,5 @@ -{{- if .Values.serviceMonitor.enabled -}} +{{- $coordinatorServiceMonitor := merge .Values.serviceMonitor.coordinator (omit .Values.serviceMonitor "coordinator" "worker") -}} +{{- if $coordinatorServiceMonitor.enabled -}} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: @@ -6,17 +7,18 @@ metadata: namespace: {{ .Release.Namespace }} labels: {{- include "trino.labels" . | nindent 4 }} - {{- if .Values.serviceMonitor.labels }} - {{- toYaml .Values.serviceMonitor.labels | nindent 4 }} + {{- if $coordinatorServiceMonitor.labels }} + {{- toYaml $coordinatorServiceMonitor.labels | nindent 4 }} {{- end }} spec: selector: matchLabels: {{- include "trino.selectorLabels" . | nindent 6 }} + app.kubernetes.io/component: coordinator namespaceSelector: matchNames: - {{ .Release.Namespace }} endpoints: - port: jmx-exporter - interval: {{ .Values.serviceMonitor.interval }} + interval: {{ $coordinatorServiceMonitor.interval }} {{- end }} diff --git a/charts/trino/templates/servicemonitor-worker.yaml b/charts/trino/templates/servicemonitor-worker.yaml new file mode 100644 index 00000000..a6e8257c --- /dev/null +++ b/charts/trino/templates/servicemonitor-worker.yaml @@ -0,0 +1,24 @@ +{{- $workerServiceMonitor := merge .Values.serviceMonitor.worker (omit .Values.serviceMonitor "coordinator" "worker") -}} +{{- if $workerServiceMonitor.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ template "trino.fullname" . }}-worker + namespace: {{ .Release.Namespace }} + labels: + {{- include "trino.labels" . | nindent 4 }} + {{- if $workerServiceMonitor.labels }} + {{- toYaml $workerServiceMonitor.labels | nindent 4 }} + {{- end }} +spec: + selector: + matchLabels: + {{- include "trino.selectorLabels" . | nindent 6 }} + app.kubernetes.io/component: worker + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} + endpoints: + - port: jmx-exporter + interval: {{ $workerServiceMonitor.interval }} +{{- end }} diff --git a/charts/trino/templates/tests/test-jmx.yaml b/charts/trino/templates/tests/test-jmx.yaml index c0a3b4e4..fa963a8a 100644 --- a/charts/trino/templates/tests/test-jmx.yaml +++ b/charts/trino/templates/tests/test-jmx.yaml @@ -1,4 +1,8 @@ -{{- if or .Values.jmx.exporter.enabled .Values.serviceMonitor.enabled }} +{{- $coordinatorJmx := merge .Values.jmx.coordinator (omit .Values.jmx "coordinator" "worker") -}} +{{- $workerJmx := merge .Values.jmx.worker (omit .Values.jmx "coordinator" "worker") -}} +{{- $coordinatorServiceMonitor := merge .Values.serviceMonitor.coordinator (omit .Values.serviceMonitor "coordinator" "worker") -}} +{{- $workerServiceMonitor := merge .Values.serviceMonitor.worker (omit .Values.serviceMonitor "coordinator" "worker") -}} +{{- if or $coordinatorJmx.exporter.enabled $coordinatorServiceMonitor.enabled $workerJmx.exporter.enabled $workerServiceMonitor.enabled -}} apiVersion: v1 kind: Pod metadata: @@ -9,19 +13,37 @@ metadata: test: jmx annotations: "helm.sh/hook": test + "helm.sh/hook-delete-policy": hook-succeeded spec: containers: - {{- if .Values.jmx.exporter.enabled }} - - name: trino-jmx + {{- if $coordinatorJmx.exporter.enabled }} + - name: trino-jmx-coordinator image: {{ include "trino.image" . }} command: ["/bin/bash", "-c"] args: - - curl -s {{ include "trino.fullname" . }}.{{ .Release.Namespace }}:5556/metrics | grep -q trino + - curl -s {{ include "trino.fullname" . }}.{{ .Release.Namespace }}:{{ $coordinatorJmx.exporter.port }}/metrics | grep -q trino {{- end }} - {{- if .Values.serviceMonitor.enabled }} - - name: service-monitor + {{- if $workerJmx.exporter.port }} + - name: trino-jmx-worker + image: {{ include "trino.image" . }} + command: ["/bin/bash", "-c"] + args: + - curl -s {{ include "trino.fullname" . }}-worker.{{ .Release.Namespace }}:{{ $workerJmx.exporter.port }}/metrics | grep -q trino + {{- end }} + {{- if $coordinatorServiceMonitor.enabled }} + - name: service-monitor-coordinator + image: python:3-slim + command: [ "python", "/tests/test.py" ] + args: ["{{ include "trino.fullname" . }}"] + volumeMounts: + - name: tests + mountPath: /tests + {{- end }} + {{- if $workerServiceMonitor.enabled }} + - name: service-monitor-worker image: python:3-slim command: ["python", "/tests/test.py"] + args: ["{{ include "trino.fullname" . }}-worker"] volumeMounts: - name: tests mountPath: /tests @@ -40,28 +62,38 @@ metadata: {{- include "trino.labels" . | nindent 4 }} app.kubernetes.io/component: test test: jmx + annotations: + "helm.sh/hook": test + "helm.sh/hook-delete-policy": hook-succeeded data: test.py: | from urllib.request import urlopen from urllib.error import URLError, HTTPError import json + import logging + import sys + import time - url = "http://prometheus-operator-kube-p-prometheus:9090/api/v1/targets?scrapePool=serviceMonitor/{{ .Release.Namespace }}/{{ include "trino.fullname" . }}/0&state=active" + logger = logging.getLogger(__name__) + target_service = sys.argv[1] + url = f"http://prometheus-operator-kube-p-prometheus:9090/api/v1/targets?scrapePool=serviceMonitor/{{ .Release.Namespace }}/{target_service}/0&state=active" while True: try: with urlopen(url) as response: data = json.load(response) except (URLError, HTTPError) as e: - print("Error fetching targets, Prometheus service might not be ready: ", e) - continue + logger.warning("Error fetching targets, Prometheus service might not be ready: ", e) + time.sleep(10) # Retry after 10 seconds + continue try: service_name = data["data"]["activeTargets"][0]["discoveredLabels"]["__meta_kubernetes_service_name"] except (KeyError, IndexError) as e: - print("Invalid Prometheus response: ", e) + logger.warning("Invalid Prometheus response: ", e) + time.sleep(10) # Retry after 10 seconds continue - if service_name == "{{ include "trino.fullname" . }}": - print("Found expected service in Prometheus targets") + if service_name == target_service: + logger.info(f"Found expected service '{service_name}' in Prometheus targets!") break {{- end }} diff --git a/charts/trino/values.yaml b/charts/trino/values.yaml index 745d50d4..c155dcfa 100644 --- a/charts/trino/values.yaml +++ b/charts/trino/values.yaml @@ -829,6 +829,30 @@ jmx: # cpu: 100m # memory: 128Mi # ``` + coordinator: {} + # jmx.coordinator -- Override JMX configurations for the Trino coordinator. + # @raw + # Example + # ```yaml + # coordinator: + # enabled: true + # exporter: + # enable: true + # configProperties: |- + # hostPort: localhost:{{- .Values.jmx.registryPort }} + # startDelaySeconds: 0 + # ssl: false + # ``` + worker: {} + # jmx.worker -- Override JMX configurations for the Trino workers. + # @raw + # Example + # ```yaml + # worker: + # enabled: true + # exporter: + # enable: true + # ``` serviceMonitor: # serviceMonitor.enabled -- Set to true to create resources for the [prometheus-operator](https://github.com/prometheus-operator/prometheus-operator). @@ -838,6 +862,26 @@ serviceMonitor: prometheus: kube-prometheus # serviceMonitor.interval -- The serviceMonitor web endpoint interval interval: "30s" + coordinator: {} + # serviceMonitor.coordinator -- Override ServiceMonitor configurations for the Trino coordinator. + # @raw + # Example + # ```yaml + # coordinator: + # enabled: true + # labels: + # prometheus: my-prometheus + # ``` + worker: {} + # serviceMonitor.worker -- Override ServiceMonitor configurations for the Trino workers. + # @raw + # Example + # ```yaml + # worker: + # enabled: true + # labels: + # prometheus: my-prometheus + # ``` # -- Labels that get applied to every resource's metadata commonLabels: {} diff --git a/test-values.yaml b/test-values.yaml index 5634acf0..d26ab063 100644 --- a/test-values.yaml +++ b/test-values.yaml @@ -154,14 +154,14 @@ jmx: port: 5556 configProperties: | startDelaySeconds: 0 - hostPort: 127.0.0.1:9080 + hostPort: 127.0.0.1:{{- .Values.jmx.registryPort }} rules: - pattern: 'trino.memory*' - pattern: 'trino.execution*' serviceMonitor: enabled: true - selector: + labels: prometheus: default interval: "30s" diff --git a/test.sh b/test.sh index 6f039413..afd3e5f4 100755 --- a/test.sh +++ b/test.sh @@ -94,6 +94,7 @@ if printf '%s\0' "${TEST_NAMES[@]}" | grep -qwz complete_values; then helm upgrade --install prometheus-operator prometheus-community/kube-prometheus-stack -n "$NAMESPACE" \ --version "60.0.2" \ --set prometheus.prometheusSpec.serviceMonitorSelectorNilUsesHelmValues=false \ + --set prometheus.prometheusSpec.serviceMonitorSelector.matchLabels.prometheus=default \ --set grafana.enabled=false kubectl rollout status --watch deployments -l release=prometheus-operator -n "$NAMESPACE" fi