From 56cbf37288050783ae28dcbd1485744b60ba638d Mon Sep 17 00:00:00 2001 From: "heitorrbarros@gmail.com" Date: Fri, 15 Mar 2024 17:33:55 -0300 Subject: [PATCH 1/4] feat: API Design --- charts/trino/values.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/charts/trino/values.yaml b/charts/trino/values.yaml index 04e0d19c..f2b4d3a3 100644 --- a/charts/trino/values.yaml +++ b/charts/trino/values.yaml @@ -14,6 +14,10 @@ imagePullSecrets: - name: registry-credentials server: + jmx: + enabled: true + registryPort: 9080 + serverPort: 9081 workers: 2 node: environment: production From c1468cb74152784ade1eedde834cd0c70a536315 Mon Sep 17 00:00:00 2001 From: "heitorrbarros@gmail.com" Date: Fri, 15 Mar 2024 17:35:03 -0300 Subject: [PATCH 2/4] feat: Add required configurations --- charts/trino/templates/configmap-coordinator.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/charts/trino/templates/configmap-coordinator.yaml b/charts/trino/templates/configmap-coordinator.yaml index ba88283e..997e3b54 100644 --- a/charts/trino/templates/configmap-coordinator.yaml +++ b/charts/trino/templates/configmap-coordinator.yaml @@ -38,6 +38,9 @@ data: -XX:+UnlockDiagnosticVMOptions # Reduce starvation of threads by GClocker, recommend to set about the number of cpu cores (JDK-8192647) -XX:GCLockerRetryAllocationCount=32 + {{- if .Values.jmx.enabled }} + -Dcom.sun.management.jmxremote.rmi.port={{ .Values.jmx.serverPort }} + {{- end }} {{- range $configValue := .Values.coordinator.additionalJVMConfig }} {{ $configValue }} {{- end }} @@ -67,6 +70,10 @@ 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 }} + {{- end }} {{ .Values.server.coordinatorExtraConfig | indent 4 }} {{- if .Values.accessControl }}{{- if eq .Values.accessControl.type "configmap" }} From 6fad4ab380ae2288198471c8a10c3ed0dae3b9b2 Mon Sep 17 00:00:00 2001 From: "heitorrbarros@gmail.com" Date: Fri, 15 Mar 2024 17:35:21 -0300 Subject: [PATCH 3/4] feat: Expose jmx ports --- charts/trino/templates/deployment-coordinator.yaml | 8 ++++++++ charts/trino/templates/service.yaml | 10 ++++++++++ 2 files changed, 18 insertions(+) diff --git a/charts/trino/templates/deployment-coordinator.yaml b/charts/trino/templates/deployment-coordinator.yaml index 844be4e7..a4a2e28a 100644 --- a/charts/trino/templates/deployment-coordinator.yaml +++ b/charts/trino/templates/deployment-coordinator.yaml @@ -142,6 +142,14 @@ spec: - name: http containerPort: {{ .Values.service.port }} protocol: TCP + {{-if .Values.jmx.enabled }} + - name: jmx-registry + containerPort: {{ .Values.jmx.registryPort }} + protocol: TCP + - name: jmx-server + containerPort: {{ .Values.jmx.serverPort }} + protocol: TCP + {{- end }} {{- range $key, $value := .Values.coordinator.additionalExposedPorts }} - name: {{ $value.name }} containerPort: {{ $value.port }} diff --git a/charts/trino/templates/service.yaml b/charts/trino/templates/service.yaml index cfb0b2f3..acb1b2cc 100644 --- a/charts/trino/templates/service.yaml +++ b/charts/trino/templates/service.yaml @@ -14,6 +14,16 @@ spec: targetPort: http protocol: TCP name: http + {{- if .Values.jmx.enabled }} + - port: {{ .Values.jmx.registryPort }} + targetPort: jmx-registry + protocol: TCP + name: jmx-registry + - port: {{ .Values.jmx.serverPort }} + targetPort: jmx-server + protocol: TCP + name: jmx-server + {{- end }} {{- range $key, $value := .Values.coordinator.additionalExposedPorts }} - port: {{ $value.servicePort }} name: {{ $value.name }} From 5a414491fd3c1f1d55dff404c353ddd4238ed7e3 Mon Sep 17 00:00:00 2001 From: "heitorrbarros@gmail.com" Date: Fri, 15 Mar 2024 17:35:37 -0300 Subject: [PATCH 4/4] chore: Increase chart version --- charts/trino/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/trino/Chart.yaml b/charts/trino/Chart.yaml index 1dba6a27..99ae67b7 100644 --- a/charts/trino/Chart.yaml +++ b/charts/trino/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.19.0 +version: 0.20.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to