Chart: Add controller.metrics.prometheusRule.annotations
. (#11849)
This commit is contained in:
parent
5d457c7daa
commit
3cde7770dd
4 changed files with 18 additions and 0 deletions
|
@ -372,6 +372,7 @@ As of version `1.26.0` of this chart, by simply not providing any clusterIP valu
|
||||||
| controller.metrics.port | int | `10254` | |
|
| controller.metrics.port | int | `10254` | |
|
||||||
| controller.metrics.portName | string | `"metrics"` | |
|
| controller.metrics.portName | string | `"metrics"` | |
|
||||||
| controller.metrics.prometheusRule.additionalLabels | object | `{}` | |
|
| controller.metrics.prometheusRule.additionalLabels | object | `{}` | |
|
||||||
|
| controller.metrics.prometheusRule.annotations | object | `{}` | Annotations to be added to the PrometheusRule. |
|
||||||
| controller.metrics.prometheusRule.enabled | bool | `false` | |
|
| controller.metrics.prometheusRule.enabled | bool | `false` | |
|
||||||
| controller.metrics.prometheusRule.rules | list | `[]` | |
|
| controller.metrics.prometheusRule.rules | list | `[]` | |
|
||||||
| controller.metrics.service.annotations | object | `{}` | |
|
| controller.metrics.service.annotations | object | `{}` | |
|
||||||
|
|
|
@ -14,6 +14,9 @@ metadata:
|
||||||
{{- if .Values.controller.metrics.prometheusRule.additionalLabels }}
|
{{- if .Values.controller.metrics.prometheusRule.additionalLabels }}
|
||||||
{{- toYaml .Values.controller.metrics.prometheusRule.additionalLabels | nindent 4 }}
|
{{- toYaml .Values.controller.metrics.prometheusRule.additionalLabels | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.controller.metrics.prometheusRule.annotations }}
|
||||||
|
annotations: {{ toYaml .Values.controller.metrics.prometheusRule.annotations | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
{{- if .Values.controller.metrics.prometheusRule.rules }}
|
{{- if .Values.controller.metrics.prometheusRule.rules }}
|
||||||
groups:
|
groups:
|
||||||
|
|
|
@ -15,3 +15,15 @@ tests:
|
||||||
- equal:
|
- equal:
|
||||||
path: metadata.name
|
path: metadata.name
|
||||||
value: RELEASE-NAME-ingress-nginx-controller
|
value: RELEASE-NAME-ingress-nginx-controller
|
||||||
|
|
||||||
|
- it: should create a PrometheusRule with annotations if `controller.metrics.prometheusRule.annotations` is set
|
||||||
|
set:
|
||||||
|
controller.metrics.enabled: true
|
||||||
|
controller.metrics.prometheusRule.enabled: true
|
||||||
|
controller.metrics.prometheusRule.annotations:
|
||||||
|
my-little-annotation: test-value
|
||||||
|
asserts:
|
||||||
|
- equal:
|
||||||
|
path: metadata.annotations
|
||||||
|
value:
|
||||||
|
my-little-annotation: test-value
|
||||||
|
|
|
@ -899,6 +899,8 @@ controller:
|
||||||
prometheusRule:
|
prometheusRule:
|
||||||
enabled: false
|
enabled: false
|
||||||
additionalLabels: {}
|
additionalLabels: {}
|
||||||
|
# -- Annotations to be added to the PrometheusRule.
|
||||||
|
annotations: {}
|
||||||
# namespace: ""
|
# namespace: ""
|
||||||
rules: []
|
rules: []
|
||||||
# # These are just examples rules, please adapt them to your needs
|
# # These are just examples rules, please adapt them to your needs
|
||||||
|
|
Loading…
Reference in a new issue