Files
411e85d929 [stable/wordpress] Move WP to non-root (#21099)
* [stable/wordpress] Move WP to non-root

Signed-off-by: juan131 <juan@bitnami.com>

* [stable/wordpress] Update components versions

Signed-off-by: Bitnami Containers <containers@bitnami.com>

* README fixes and issue with validation

Signed-off-by: Javier J. Salmeron Garcia <jsalmeron@vmware.com>

Co-authored-by: Bitnami Bot <containers-bot@bitnami.com>
Co-authored-by: Javier J. Salmerón-García <jsalmeron@vmware.com>
2020-02-28 05:06:39 -08:00

30 lines
1.2 KiB
YAML

{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "wordpress.fullname" . }}
{{- if .Values.metrics.serviceMonitor.namespace }}
namespace: {{ .Values.metrics.serviceMonitor.namespace }}
{{- end }}
labels: {{- include "wordpress.labels" . | nindent 4 }}
{{- if .Values.metrics.serviceMonitor.additionalLabels }}
{{- include "wordpress.tplValue" (dict "value" .Values.metrics.serviceMonitor.additionalLabels "context" $) | nindent 4 }}
{{- end }}
spec:
endpoints:
- port: metrics
interval: {{ .Values.metrics.serviceMonitor.interval }}
{{- if .Values.metrics.serviceMonitor.scrapeTimeout }}
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
{{- end }}
honorLabels: {{ .Values.metrics.serviceMonitor.honorLabels }}
{{- if .Values.metrics.serviceMonitor.relabellings }}
metricRelabelings: {{- toYaml .Values.metrics.serviceMonitor.relabellings | nindent 8 }}
{{- end }}
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
selector:
matchLabels: {{- include "wordpress.matchLabels" . | nindent 6 }}
{{- end }}