forked from datahub-project/datahub
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Kubernetes): Add JMX exporter containers to all DataHub componen…
…ts (datahub-project#2251) Co-authored-by: Ricardo Bernardino <[email protected]>
- Loading branch information
1 parent
a5b206a
commit 9a94794
Showing
24 changed files
with
355 additions
and
4 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
17 changes: 17 additions & 0 deletions
17
contrib/kubernetes/datahub/charts/datahub-frontend/templates/config-jmx-exporter.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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{{- if .Values.exporters.jmx.enabled }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ include "datahub-frontend.fullname" . }}-config-jmx-exporter | ||
labels: | ||
{{- include "datahub-frontend.labels" . | nindent 4 }} | ||
data: | ||
config.yml: |- | ||
hostPort: localhost:{{ .Values.env.JMXPORT }} | ||
lowercaseOutputName: {{ .Values.exporters.jmx.config.lowercaseOutputName }} | ||
lowercaseOutputLabelNames: {{ .Values.exporters.jmx.config.lowercaseOutputLabelNames }} | ||
rules: | ||
{{ .Values.exporters.jmx.config.rules | toYaml | indent 6 }} | ||
ssl: false | ||
startDelaySeconds: {{ .Values.exporters.jmx.config.startDelaySeconds }} | ||
{{- 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
17 changes: 17 additions & 0 deletions
17
contrib/kubernetes/datahub/charts/datahub-gms/templates/config-jmx-exporter.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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{{- if .Values.exporters.jmx.enabled }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ include "datahub-gms.fullname" . }}-config-jmx-exporter | ||
labels: | ||
{{- include "datahub-gms.labels" . | nindent 4 }} | ||
data: | ||
config.yml: |- | ||
hostPort: localhost:{{ .Values.env.JMXPORT }} | ||
lowercaseOutputName: {{ .Values.exporters.jmx.config.lowercaseOutputName }} | ||
lowercaseOutputLabelNames: {{ .Values.exporters.jmx.config.lowercaseOutputLabelNames }} | ||
rules: | ||
{{ .Values.exporters.jmx.config.rules | toYaml | indent 6 }} | ||
ssl: false | ||
startDelaySeconds: {{ .Values.exporters.jmx.config.startDelaySeconds }} | ||
{{- 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
21 changes: 21 additions & 0 deletions
21
contrib/kubernetes/datahub/charts/datahub-jmxexporter/Chart.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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
apiVersion: v2 | ||
name: datahub-jmxexporter | ||
description: A Helm chart for Kubernetes | ||
|
||
# A chart can be either an 'application' or a 'library' chart. | ||
# | ||
# Application charts are a collection of templates that can be packaged into versioned archives | ||
# to be deployed. | ||
# | ||
# Library charts provide useful utilities or functions for the chart developer. They're included as | ||
# a dependency of application charts to inject those utilities and functions into the rendering | ||
# pipeline. Library charts do not define any templates and therefore cannot be deployed. | ||
type: library | ||
|
||
# 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. | ||
version: 0.2.1 | ||
|
||
# This is the version number of the application being deployed. This version number should be | ||
# incremented each time you make changes to the application. | ||
appVersion: 0.3.1 |
32 changes: 32 additions & 0 deletions
32
contrib/kubernetes/datahub/charts/datahub-jmxexporter/templates/_container.tpl
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,32 @@ | ||
{{- define "datahub-jmxexporter.container" -}} | ||
{{- if .Values.exporters.jmx.enabled }} | ||
- name: jmx-exporter | ||
image: "{{ .Values.exporters.jmx.image.repository }}:{{ .Values.exporters.jmx.image.tag }}" | ||
imagePullPolicy: {{ .Values.exporters.jmx.image.pullPolicy }} | ||
args: ["{{ .Values.exporters.jmx.ports.jmxxp.containerPort}}", "/opt/jmx_exporter/config.yml"] | ||
ports: | ||
{{- range $key, $port := .Values.exporters.jmx.ports }} | ||
- name: {{ $key }} | ||
{{ toYaml $port | indent 14 }} | ||
{{- end }} | ||
livenessProbe: | ||
{{ toYaml .Values.exporters.jmx.livenessProbe | indent 12 }} | ||
readinessProbe: | ||
{{ toYaml .Values.exporters.jmx.readinessProbe | indent 12 }} | ||
env: | ||
- name: SERVICE_PORT | ||
value: {{ .Values.exporters.jmx.ports.jmxxp.containerPort | quote }} | ||
{{- with .Values.exporters.jmx.env }} | ||
{{- range $key, $value := . }} | ||
- name: {{ $key | upper | replace "." "_" }} | ||
value: {{ $value | quote }} | ||
{{- end }} | ||
{{- end }} | ||
resources: | ||
{{ toYaml .Values.exporters.jmx.resources | indent 12 }} | ||
volumeMounts: | ||
- name: config-jmx-exporter | ||
mountPath: /opt/jmx_exporter/config.yml | ||
subPath: config.yml | ||
{{- end }} | ||
{{- 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
17 changes: 17 additions & 0 deletions
17
contrib/kubernetes/datahub/charts/datahub-mae-consumer/templates/config-jmx-exporter.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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{{- if .Values.exporters.jmx.enabled }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ include "datahub-mae-consumer.fullname" . }}-config-jmx-exporter | ||
labels: | ||
{{- include "datahub-mae-consumer.labels" . | nindent 4 }} | ||
data: | ||
config.yml: |- | ||
hostPort: localhost:{{ .Values.env.JMXPORT }} | ||
lowercaseOutputName: {{ .Values.exporters.jmx.config.lowercaseOutputName }} | ||
lowercaseOutputLabelNames: {{ .Values.exporters.jmx.config.lowercaseOutputLabelNames }} | ||
rules: | ||
{{ .Values.exporters.jmx.config.rules | toYaml | indent 6 }} | ||
ssl: false | ||
startDelaySeconds: {{ .Values.exporters.jmx.config.startDelaySeconds }} | ||
{{- 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
17 changes: 17 additions & 0 deletions
17
contrib/kubernetes/datahub/charts/datahub-mce-consumer/templates/config-jmx-exporter.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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{{- if .Values.exporters.jmx.enabled }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ include "datahub-mce-consumer.fullname" . }}-config-jmx-exporter | ||
labels: | ||
{{- include "datahub-mce-consumer.labels" . | nindent 4 }} | ||
data: | ||
config.yml: |- | ||
hostPort: localhost:{{ .Values.env.JMXPORT }} | ||
lowercaseOutputName: {{ .Values.exporters.jmx.config.lowercaseOutputName }} | ||
lowercaseOutputLabelNames: {{ .Values.exporters.jmx.config.lowercaseOutputLabelNames }} | ||
rules: | ||
{{ .Values.exporters.jmx.config.rules | toYaml | indent 6 }} | ||
ssl: false | ||
startDelaySeconds: {{ .Values.exporters.jmx.config.startDelaySeconds }} | ||
{{- end }} |
Oops, something went wrong.