Fix arrays

This commit is contained in:
dvirlabs 2025-10-10 16:26:01 +03:00
parent 3f1c3634b2
commit 0bcd4a84fd

View File

@ -21,6 +21,9 @@ prometheus:
enabled: true enabled: true
name: prometheus-additional-scrape-configs name: prometheus-additional-scrape-configs
key: additional-scrape-configs.yaml key: additional-scrape-configs.yaml
# מבטיח שה-ServiceMonitor של פרומתאוס לא יוצר null
serviceMonitor:
metricRelabelings: []
grafana: grafana:
persistence: persistence:
@ -61,39 +64,60 @@ grafana:
role_attribute_path: contains(groups[*], 'grafana-admins') && 'Admin' || 'Viewer' role_attribute_path: contains(groups[*], 'grafana-admins') && 'Admin' || 'Viewer'
allow_assign_grafana_admin: true allow_assign_grafana_admin: true
# === פאטצ' כדי למנוע null ב-ServiceMonitor === # מבטיח שה-ServiceMonitor של גרפנה לא ייצור null
# אם ה-templates שלך בונים endpoints מה-values, זה יבטיח שתמיד יהיה מערך ריק. serviceMonitor:
serviceMonitors: enabled: true
operator: metricRelabelings: []
endpoints:
- port: metrics alertmanager:
metricRelabelings: [] # ServiceMonitor של אלרטמאנגר
prometheus: serviceMonitor:
endpoints: metricRelabelings: []
- port: web
metricRelabelings: [] prometheusOperator:
prometheusNodeExporter: # ServiceMonitor של האופרייטור (rancher-monitoring-*-operator)
endpoints: serviceMonitor:
- port: metrics metricRelabelings: []
metricRelabelings: []
alertmanager: prometheus-node-exporter:
endpoints: # ServiceMonitor של הנוד אקספורטר
- port: web serviceMonitor:
metricRelabelings: [] metricRelabelings: []
grafana:
endpoints: # CoreDNS עשוי להיקרא chart-wise kubeDns או coreDns—מרפדים את שניהם.
- port: service kubeDns:
path: /metrics serviceMonitor:
metricRelabelings: [] metricRelabelings: []
coredns: coreDns:
endpoints: serviceMonitor:
- port: metrics metricRelabelings: []
metricRelabelings: []
fleetController: # רכיבי קוברנטיס נוספים (אם פעילים אצלך—לא מזיק להגדיר [])
endpoints: kubeControllerManager:
- port: metrics serviceMonitor:
metricRelabelings: [] metricRelabelings: []
gitopsController: kubeScheduler:
endpoints: serviceMonitor:
- port: metrics metricRelabelings: []
metricRelabelings: [] kubeEtcd:
serviceMonitor:
metricRelabelings: []
kubeProxy:
serviceMonitor:
metricRelabelings: []
# בקרי Rancher אופייניים (Fleet/GitOps) — שמות עשויים להשתנות בין גרסאות;
# הערכים כאן בטוחים: אם התבניות מתייחסות אליהם, יילקחו [], ואם לא—ייבלעו.
fleetController:
serviceMonitor:
enabled: true
metricRelabelings: []
gitopsController:
serviceMonitor:
enabled: true
metricRelabelings: []
# לעיתים ה-chart מכיל ServiceMonitors נוספים; ערך גלובלי נפוץ
# שחלק מהתבניות קוראות ממנו:
serviceMonitor:
metricRelabelings: []