mirror of
https://github.com/bitnami/charts.git
synced 2026-03-27 15:27:10 +08:00
[bitnami/clickhouse] Feat Clickhouse - support for PrometheusRules (#18098)
Signed-off-by: wiktor2200 <wiktor2200@users.noreply.github.com> Co-authored-by: Andrés Bono <andresbono@vmware.com>
This commit is contained in:
@@ -33,4 +33,4 @@ maintainers:
|
||||
name: clickhouse
|
||||
sources:
|
||||
- https://github.com/bitnami/charts/tree/main/bitnami/clickhouse
|
||||
version: 3.6.2
|
||||
version: 3.6.3
|
||||
|
||||
@@ -327,6 +327,10 @@ The command removes all the Kubernetes components associated with the chart and
|
||||
| `metrics.serviceMonitor.metricRelabelings` | Specify additional relabeling of metrics | `[]` |
|
||||
| `metrics.serviceMonitor.relabelings` | Specify general relabeling | `[]` |
|
||||
| `metrics.serviceMonitor.selector` | Prometheus instance selector labels | `{}` |
|
||||
| `metrics.prometheusRule.enabled` | Create a PrometheusRule for Prometheus Operator | `false` |
|
||||
| `metrics.prometheusRule.namespace` | Namespace for the PrometheusRule Resource (defaults to the Release Namespace) | `""` |
|
||||
| `metrics.prometheusRule.additionalLabels` | Additional labels that can be used so PrometheusRule will be discovered by Prometheus | `{}` |
|
||||
| `metrics.prometheusRule.rules` | PrometheusRule definitions | `[]` |
|
||||
|
||||
### External Zookeeper paramaters
|
||||
|
||||
|
||||
31
bitnami/clickhouse/templates/prometheusrule.yaml
Normal file
31
bitnami/clickhouse/templates/prometheusrule.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled .Values.metrics.prometheusRule.rules }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: PrometheusRule
|
||||
metadata:
|
||||
name: {{ include "common.names.fullname" . }}
|
||||
{{- if .Values.metrics.prometheusRule.namespace }}
|
||||
namespace: {{ .Values.metrics.prometheusRule.namespace }}
|
||||
{{- else }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
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: {{- toYaml .Values.metrics.prometheusRule.rules | nindent 8 }}
|
||||
{{- end }}
|
||||
@@ -1065,6 +1065,28 @@ metrics:
|
||||
##
|
||||
selector: {}
|
||||
|
||||
## Prometheus Operator PrometheusRule configuration
|
||||
##
|
||||
prometheusRule:
|
||||
## @param metrics.prometheusRule.enabled Create a PrometheusRule for Prometheus Operator
|
||||
##
|
||||
enabled: false
|
||||
## @param metrics.prometheusRule.namespace Namespace for the PrometheusRule Resource (defaults to the Release Namespace)
|
||||
##
|
||||
namespace: ""
|
||||
## @param metrics.prometheusRule.additionalLabels Additional labels that can be used so PrometheusRule will be discovered by Prometheus
|
||||
##
|
||||
additionalLabels: {}
|
||||
## @param metrics.prometheusRule.rules PrometheusRule definitions
|
||||
## - alert: ClickhouseServerRestart
|
||||
## annotations:
|
||||
## message: Clickhouse-server started recently
|
||||
## expr: ClickHouseAsyncMetrics_Uptime > 1 < 180
|
||||
## for: 5m
|
||||
## labels:
|
||||
## severity: warning
|
||||
rules: []
|
||||
|
||||
## @section External Zookeeper paramaters
|
||||
##
|
||||
externalZookeeper:
|
||||
|
||||
Reference in New Issue
Block a user