prometheusrule.yaml 1.1 KB

123456789101112131415161718192021
  1. {{- if and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled }}
  2. apiVersion: monitoring.coreos.com/v1
  3. kind: PrometheusRule
  4. metadata:
  5. name: {{ template "common.names.fullname" . }}
  6. namespace: {{ default .Release.Namespace .Values.metrics.prometheusRule.namespace | quote }}
  7. labels: {{- include "common.labels.standard" . | nindent 4 }}
  8. {{- if .Values.metrics.prometheusRule.additionalLabels }}
  9. {{- include "common.tplvalues.render" (dict "value" .Values.metrics.prometheusRule.additionalLabels "context" $) | nindent 4 }}
  10. {{- end }}
  11. {{- if .Values.commonLabels }}
  12. {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
  13. {{- end }}
  14. {{- if .Values.commonAnnotations }}
  15. annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
  16. {{- end }}
  17. spec:
  18. groups:
  19. - name: {{ include "common.names.fullname" . }}
  20. rules: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.prometheusRule.rules "context" $ ) | nindent 8 }}
  21. {{- end }}