Skip to content

Commit 25b7ba7

Browse files
committed
Fix tests and set metadata.namespace for Prometheus so assetstore can work
Signed-off-by: Charlie Le <[email protected]>
1 parent 48d5564 commit 25b7ba7

File tree

8 files changed

+7
-8
lines changed

8 files changed

+7
-8
lines changed

cmd/otel-allocator/internal/watcher/promOperator.go

+4
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ func NewPrometheusCRWatcher(ctx context.Context, logger logr.Logger, cfg allocat
6565

6666
// TODO: We should make these durations configurable
6767
prom := &monitoringv1.Prometheus{
68+
ObjectMeta: metav1.ObjectMeta{
69+
Name: "example",
70+
Namespace: "default",
71+
},
6872
Spec: monitoringv1.PrometheusSpec{
6973
CommonPrometheusFields: monitoringv1.CommonPrometheusFields{
7074
ScrapeInterval: monitoringv1.Duration(cfg.PrometheusCR.ScrapeInterval.String()),

tests/e2e-openshift/must-gather/assert-install-target-allocator.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ data:
3434
- PrometheusProto
3535
- OpenMetricsText1.0.0
3636
- OpenMetricsText0.0.1
37-
- PrometheusText1.0.0
3837
- PrometheusText0.0.4
3938
target_allocator:
4039
collector_id: ${POD_NAME}
@@ -84,7 +83,6 @@ data:
8483
- PrometheusProto
8584
- OpenMetricsText1.0.0
8685
- OpenMetricsText0.0.1
87-
- PrometheusText1.0.0
8886
- PrometheusText0.0.4
8987
scrape_configs:
9088
- job_name: otel-collector

tests/e2e-openshift/must-gather/install-target-allocator.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ spec:
4848
config:
4949
global:
5050
scrape_interval: 30s
51-
scrape_protocols: ['PrometheusProto','OpenMetricsText1.0.0','OpenMetricsText0.0.1','PrometheusText1.0.0','PrometheusText0.0.4']
51+
scrape_protocols: ['PrometheusProto','OpenMetricsText1.0.0','OpenMetricsText0.0.1','PrometheusText0.0.4']
5252
scrape_configs:
5353
- job_name: 'otel-collector'
5454
scrape_interval: 10s

tests/e2e-ta-collector-mtls/ta-disabled/00-assert.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ data:
2222
- PrometheusProto
2323
- OpenMetricsText1.0.0
2424
- OpenMetricsText0.0.1
25-
- PrometheusText1.0.0
2625
- PrometheusText0.0.4
2726
scrape_configs:
2827
- job_name: otel-collector

tests/e2e-ta-collector-mtls/ta-disabled/00-install.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ spec:
1414
config:
1515
global:
1616
scrape_interval: 30s
17-
scrape_protocols: ['PrometheusProto','OpenMetricsText1.0.0','OpenMetricsText0.0.1','PrometheusText1.0.0','PrometheusText0.0.4']
17+
scrape_protocols: ['PrometheusProto','OpenMetricsText1.0.0','OpenMetricsText0.0.1','PrometheusText0.0.4']
1818
scrape_configs:
1919
- job_name: 'otel-collector'
2020
scrape_interval: 10s

tests/e2e/smoke-targetallocator/00-assert.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ data:
3838
- PrometheusProto
3939
- OpenMetricsText1.0.0
4040
- OpenMetricsText0.0.1
41-
- PrometheusText1.0.0
4241
- PrometheusText0.0.4
4342
target_allocator:
4443
collector_id: ${POD_NAME}

tests/e2e/smoke-targetallocator/00-install.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ spec:
4848
config:
4949
global:
5050
scrape_interval: 30s
51-
scrape_protocols: ['PrometheusProto','OpenMetricsText1.0.0','OpenMetricsText0.0.1','PrometheusText1.0.0','PrometheusText0.0.4']
51+
scrape_protocols: ['PrometheusProto','OpenMetricsText1.0.0','OpenMetricsText0.0.1','PrometheusText0.0.4']
5252
scrape_configs:
5353
- job_name: 'otel-collector'
5454
scrape_interval: 10s

tests/e2e/smoke-targetallocator/chainsaw-test.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ spec:
4343
- PrometheusProto
4444
- OpenMetricsText1.0.0
4545
- OpenMetricsText0.0.1
46-
- PrometheusText1.0.0
4746
- PrometheusText0.0.4
4847
scrape_configs:
4948
- job_name: otel-collector

0 commit comments

Comments
 (0)