[bitnami/contour] Add envoy prometheus rules template (#17795)

* add contour envoy prometheus rules template

Signed-off-by: clayton-gonsalves <clayton.gonsalves@reddit.com>

* add license header

Signed-off-by: clayton-gonsalves <clayton.gonsalves@reddit.com>

* address review comments

Signed-off-by: clayton-gonsalves <clayton.gonsalves@reddit.com>

* Update Chart.yaml

Signed-off-by: Clayton Gonsalves <101868649+clayton-gonsalves@users.noreply.github.com>

* Update Chart.yaml

Signed-off-by: Cori Avila <42420333+corico44@users.noreply.github.com>

---------

Signed-off-by: clayton-gonsalves <clayton.gonsalves@reddit.com>
Signed-off-by: Clayton Gonsalves <101868649+clayton-gonsalves@users.noreply.github.com>
Signed-off-by: Cori Avila <42420333+corico44@users.noreply.github.com>
Co-authored-by: Cori Avila <42420333+corico44@users.noreply.github.com>
This commit is contained in:
Clayton Gonsalves
2023-08-25 14:30:25 +02:00
committed by GitHub
parent e650e4aa67
commit 92bdf99462
2 changed files with 28 additions and 1 deletions

View File

@@ -32,4 +32,4 @@ maintainers:
name: contour
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/contour
version: 12.4.0
version: 12.5.0

View File

@@ -0,0 +1,27 @@
{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and .Values.metrics.prometheusRule.enabled .Values.envoy.enabled .Values.metrics.enabled}}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: {{ include "common.names.fullname" . }}
namespace: {{ default .Release.Namespace .Values.metrics.prometheusRule.namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: metrics
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.metrics.prometheusRule.additionalLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.metrics.prometheusRule.additionalLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
groups:
- name: {{ include "common.names.fullname" . }}
rules: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.prometheusRule.rules "context" $ ) | nindent 6 }}
{{- end }}