-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add E2E test for invalid targetallocator config
- Loading branch information
Mikołaj Świątek
committed
May 25, 2023
1 parent
707a986
commit 0b2aedb
Showing
3 changed files
with
72 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
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-noconfig-collector | ||
status: | ||
replicas: 1 | ||
readyReplicas: 1 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: promreceiver-noconfig-targetallocator | ||
status: | ||
replicas: 1 | ||
unavailableReplicas: 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-noconfig.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-noconfig | ||
spec: | ||
mode: statefulset | ||
targetAllocator: | ||
enabled: true | ||
image: "local/opentelemetry-operator-targetallocator:e2e" | ||
serviceAccount: ta | ||
|
||
config: | | ||
receivers: | ||
jaeger: | ||
protocols: | ||
grpc: | ||
prometheus: | ||
config: | ||
scrape_configs: [] | ||
target_allocator: | ||
endpoint: http://promreceiver-noconfig-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] | ||