-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
monitoring: create prometheus rules with helm chart
The prometheus rules had been previously created if the cephcluster CR setting monitoring.enabled was set to true. The rules were not customizable and therefore not flexible enough. Now the rules are installed by the helm chart. To customize the rules, a post-processor can be applied to the helm chart. Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
- Loading branch information
Showing
23 changed files
with
933 additions
and
497 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
890 changes: 890 additions & 0 deletions
890
deploy/charts/rook-ceph-cluster/prometheus/localrules.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
deploy/charts/rook-ceph-cluster/templates/prometheusrules.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{{- if .Values.monitoring.createPrometheusRules }} | ||
--- | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: PrometheusRule | ||
metadata: | ||
labels: | ||
prometheus: rook-prometheus | ||
role: alert-rules | ||
name: prometheus-ceph-rules | ||
namespace: {{ default .Release.Namespace .Values.monitoring.rulesNamespaceOverride }} | ||
spec: | ||
# Import the raw prometheus rules since they have descriptions that should not be processed with the helm templates | ||
{{- $root := . }} | ||
{{- if .Values.cephClusterSpec.external.enable }} | ||
{{- range $path, $bytes := .Files.Glob "prometheus/externalrules.yaml" }} | ||
{{ $root.Files.Get $path }} | ||
{{- end }} | ||
{{- else }} | ||
{{- range $path, $bytes := .Files.Glob "prometheus/localrules.yaml" }} | ||
{{ $root.Files.Get $path }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.