Skip to content

Commit

Permalink
Feature: allows to set resources for the JMX Exporter container. Reso…
Browse files Browse the repository at this point in the history
…lves #202
  • Loading branch information
rotem-ad committed Sep 9, 2024
1 parent 349eca2 commit 8da38d9
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
12 changes: 12 additions & 0 deletions charts/trino/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,18 @@ Fast distributed SQL query engine for big data analytics that helps you explore
help: 'ThreadCount (java.lang<type=Threading><>ThreadCount)'
type: UNTYPED
* `jmx.exporter.securityContext` - object, default: `{}`
* `jmx.exporter.resources` - object, default: `{}`

It is recommended not to specify default resources and to leave this as a conscious choice for the user. This also increases chances charts run on environments with little resources, such as Minikube. If you do want to specify resources, use the following example, and adjust it as necessary.
Example:
```yaml
limits:
cpu: 100m
memory: 128Mi
requests:
cpu: 100m
memory: 128Mi
```
* `serviceMonitor.enabled` - bool, default: `false`

Set to true to create resources for the [prometheus-operator](https://github.com/prometheus-operator/prometheus-operator).
Expand Down
2 changes: 2 additions & 0 deletions charts/trino/templates/deployment-coordinator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ spec:
volumeMounts:
- mountPath: /etc/jmx-exporter/
name: jmx-exporter-config-volume
resources:
{{- toYaml .Values.jmx.exporter.resources | nindent 12 }}
{{- end }}
{{- if .Values.sidecarContainers.coordinator }}
{{- toYaml .Values.sidecarContainers.coordinator | nindent 8 }}
Expand Down
16 changes: 16 additions & 0 deletions charts/trino/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,22 @@ jmx:
# value: '$2'
# help: 'ThreadCount (java.lang<type=Threading><>ThreadCount)'
# type: UNTYPED
resources: {}
# jmx.exporter.resources -- It is recommended not to specify default resources
# and to leave this as a conscious choice for the user. This also increases
# chances charts run on environments with little resources, such as Minikube.
# If you do want to specify resources, use the following example, and adjust
# it as necessary.
# @raw
# Example:
# ```yaml
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
# ```

serviceMonitor:
# serviceMonitor.enabled -- Set to true to create resources for the [prometheus-operator](https://github.com/prometheus-operator/prometheus-operator).
Expand Down

0 comments on commit 8da38d9

Please sign in to comment.