We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cd140a6 commit bda0e29Copy full SHA for bda0e29
api/install/v1alpha1/binoculars_webhook.go
@@ -68,7 +68,10 @@ func (r *Binoculars) Default() {
68
}
69
70
// prometheus
71
- if r.Spec.Prometheus.ScrapeInterval == nil {
72
- r.Spec.Prometheus.ScrapeInterval = &metav1.Duration{Duration: time.Second * 10}
+ if r.Spec.Prometheus != nil && r.Spec.Prometheus.Enabled {
+ if r.Spec.Prometheus.ScrapeInterval == nil {
73
+ r.Spec.Prometheus.ScrapeInterval = &metav1.Duration{Duration: time.Second * 10}
74
+ }
75
76
+
77
0 commit comments