Skip to content

Commit 6490aaf

Browse files
committed
fix: Prometheus instances are not filtered by monitors name and namespace
1 parent 2683638 commit 6490aaf

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

stackgres-k8s/src/operator/src/main/java/io/stackgres/operator/conciliation/config/ConfigRequiredResourcesGenerator.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,13 +203,13 @@ public List<PrometheusContext> getPrometheus(StackGresConfig config) {
203203
.stream()
204204
.flatMap(List::stream)
205205
.filter(prometheus -> monitors.stream()
206-
.anyMatch(monitor -> monitor.getMetadata().getNamespace().equals(prometheus.getMetadata().getNamespace())
207-
&& monitor.getMetadata().getName().equals(prometheus.getMetadata().getName())))
206+
.anyMatch(monitor -> monitor.getNamespace().equals(prometheus.getMetadata().getNamespace())
207+
&& monitor.getName().equals(prometheus.getMetadata().getName())))
208208
.map(prometheus -> PrometheusContext.toPrometheusContext(
209209
prometheus,
210210
monitors.stream()
211-
.filter(monitor -> monitor.getMetadata().getNamespace().equals(prometheus.getMetadata().getNamespace())
212-
&& monitor.getMetadata().getName().equals(prometheus.getMetadata().getName()))
211+
.filter(monitor -> monitor.getNamespace().equals(prometheus.getMetadata().getNamespace())
212+
&& monitor.getName().equals(prometheus.getMetadata().getName()))
213213
.findFirst()
214214
.orElseThrow()))
215215
.toList();

0 commit comments

Comments
 (0)