helm: only add monitoring to cluster if specified
If the monitoring settings are not specified in the values.yaml,
avoid a helm chart install error by skipping the monitoring
section of the cephcluster CR altogether.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit a3d65b3f93)
This commit is contained in:
1 parent
c6179f0196
commit
46e442917d
2 files changed
+4
No files matched your search
@@ -4,6 +4,7 @@ kind: CephCluster
|
||||
metadata:
|
||||
name: {{ default .Release.Namespace .Values.clusterName }}
|
||||
spec:
|
||||
{{- if .Values.monitoring }}
|
||||
monitoring:
|
||||
enabled: {{ .Values.monitoring.enabled | default false }}
|
||||
{{- if .Values.monitoring.externalMgrEndpoints }}
|
||||
@@ -13,5 +14,6 @@ spec:
|
||||
{{- if .Values.monitoring.externalMgrPrometheusPort }}
|
||||
externalMgrPrometheusPort: {{ toYaml .Values.monitoring.externalMgrPrometheusPort }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{ toYaml .Values.cephClusterSpec | indent 2 }}
|
||||
@@ -1,3 +1,4 @@
|
||||
{{- if .Values.monitoring }}
|
||||
{{- if .Values.monitoring.createPrometheusRules }}
|
||||
---
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
@@ -29,3 +30,4 @@ spec:
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in new issue
Block a user