[bitnami/tomcat] monitoring fixes (#8863)

* jmx exporter fixes

Signed-off-by: Peter Kassak <48527944+cache-sk@users.noreply.github.com>

* requested changes update

Signed-off-by: Peter Kassak <48527944+cache-sk@users.noreply.github.com>

* version bump

Signed-off-by: Peter Kassak <48527944+cache-sk@users.noreply.github.com>

* requested change update no. 2

Signed-off-by: Peter Kassak <48527944+cache-sk@users.noreply.github.com>
This commit is contained in:
Peter Kaššák
2022-02-04 08:34:45 +01:00
committed by GitHub
parent 86646ba729
commit 7e2bcb37db
3 changed files with 35 additions and 29 deletions
+1 -1
View File
@@ -26,4 +26,4 @@ name: tomcat
sources:
- https://github.com/bitnami/bitnami-docker-tomcat
- http://tomcat.apache.org
version: 10.1.6
version: 10.1.7
+30 -28
View File
@@ -135,35 +135,32 @@ containers:
{{- if .Values.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumeMounts "context" $) | nindent 6 }}
{{- end }}
{{- if .Values.sidecars }}
{{ include "common.tplvalues.render" ( dict "value" .Values.sidecars "context" $) }}
{{- end }}
{{- if .Values.metrics.jmx.enabled }}
- name: jmx-exporter
image: {{ template "tomcat.metrics.jmx.image" . }}
imagePullPolicy: {{ .Values.metrics.jmx.image.pullPolicy | quote }}
command:
- java
- -XX:+UnlockExperimentalVMOptions
- -XX:+UseCGroupMemoryLimitForHeap
- -XX:MaxRAMFraction=1
- -XshowSettings:vm
- -jar
- jmx_prometheus_httpserver.jar
- {{ .Values.metrics.jmx.ports.metrics | quote }}
- /etc/jmx-tomcat/jmx-tomcat-prometheus.yml
ports:
{{- range $key, $val := .Values.metrics.jmx.ports }}
- name: {{ $key }}
containerPort: {{ $val }}
{{- if .Values.metrics.jmx.enabled }}
- name: jmx-exporter
image: {{ template "tomcat.metrics.jmx.image" . }}
imagePullPolicy: {{ .Values.metrics.jmx.image.pullPolicy | quote }}
command:
- java
- -XX:+UnlockExperimentalVMOptions
- -XX:+UseCGroupMemoryLimitForHeap
- -XX:MaxRAMFraction=1
- -XshowSettings:vm
- -jar
- jmx_prometheus_httpserver.jar
- {{ .Values.metrics.jmx.ports.metrics | quote }}
- /etc/jmx-tomcat/jmx-tomcat-prometheus.yml
ports:
{{- range $key, $val := .Values.metrics.jmx.ports }}
- name: {{ $key }}
containerPort: {{ $val }}
{{- end }}
{{- if .Values.metrics.jmx.resources }}
resources: {{- toYaml .Values.metrics.jmx.resources | nindent 6 }}
{{- end }}
volumeMounts:
- name: jmx-config
mountPath: /etc/jmx-tomcat
{{- end }}
{{- if .Values.metrics.jmx.resources }}
resources: {{- toYaml .Values.metrics.jmx.resources | nindent 4 }}
{{- end }}
volumeMounts:
- name: jmx-config
mountPath: /etc/jmx-tomcat
{{- end }}
{{- if .Values.sidecars }}
{{- include "common.tplvalues.render" ( dict "value" .Values.sidecars "context" $) | nindent 2 }}
{{- end }}
@@ -178,6 +175,11 @@ volumes:
emptyDir: {}
{{- end }}
{{- end }}
{{- if and .Values.metrics.jmx.enabled (or .Values.metrics.jmx.config .Values.metrics.jmx.existingConfigmap) }}
- configMap:
name: {{ include "tomcat.metrics.jmx.configmapName" . }}
name: jmx-config
{{- end }}
{{- if .Values.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 2 }}
{{- end }}
+4
View File
@@ -8,12 +8,16 @@ metadata:
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.metrics.podMonitor.additionalLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.metrics.podMonitor.additionalLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if .Values.metrics.podMonitor.podTargetLabels }}
podTargetLabels: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.podMonitor.podTargetLabels "context" $ ) | nindent 4 }}
{{- end }}
podMetricsEndpoints:
{{- range $key, $val := .Values.metrics.jmx.ports }}
- port: {{ $key | quote }}