prometheusrule.yaml 1.1 KB

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