-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option to enable JMX exporter on workers
- Loading branch information
1 parent
36a4833
commit fd8ba50
Showing
14 changed files
with
275 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
10 changes: 6 additions & 4 deletions
10
charts/trino/templates/servicemonitor.yaml → ...templates/servicemonitor-coordinator.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,24 @@ | ||
{{- 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: | ||
name: {{ template "trino.fullname" . }} | ||
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }} |
Oops, something went wrong.