-
Notifications
You must be signed in to change notification settings - Fork 451
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an E2E test for no prometheus config
- Loading branch information
Mikołaj Świątek
committed
May 24, 2023
1 parent
c09cce3
commit 1515f43
Showing
2 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: promreceiver-nopromconfig-collector | ||
status: | ||
replicas: 1 | ||
readyReplicas: 1 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: promreceiver-nopromconfig-targetallocator | ||
status: | ||
replicas: 1 | ||
readyReplicas: 1 | ||
--- | ||
# Print TA and operator logs if test fails | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestAssert | ||
collectors: | ||
- selector: app.kubernetes.io/component=opentelemetry-targetallocator | ||
- selector: app.kubernetes.io/component=opentelemetry-collector | ||
- selector: app.kubernetes.io/name=opentelemetry-operator | ||
namespace: opentelemetry-operator-system | ||
container: manager |
46 changes: 46 additions & 0 deletions
46
tests/e2e/prometheus-config-validation/04-promreceiver-nopromconfig.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
apiVersion: opentelemetry.io/v1alpha1 | ||
kind: OpenTelemetryCollector | ||
metadata: | ||
name: promreceiver-nopromconfig | ||
spec: | ||
mode: statefulset | ||
targetAllocator: | ||
enabled: true | ||
image: "local/opentelemetry-operator-targetallocator:e2e" | ||
serviceAccount: ta | ||
prometheusCR: | ||
enabled: true | ||
|
||
config: | | ||
receivers: | ||
jaeger: | ||
protocols: | ||
grpc: | ||
prometheus: | ||
target_allocator: | ||
endpoint: http://promreceiver-nopromconfig-targetallocator | ||
interval: 30s | ||
collector_id: ${POD_NAME} | ||
http_sd_config: | ||
refresh_interval: 10s | ||
processors: | ||
exporters: | ||
logging: | ||
extensions: | ||
health_check: | ||
service: | ||
telemetry: | ||
metrics: | ||
address: :8888 | ||
extensions: | ||
- health_check | ||
pipelines: | ||
traces: | ||
receivers: [jaeger] | ||
processors: [] | ||
exporters: [logging] | ||