|
| 1 | +# OpenTelemetry Operator OpenShift End-to-End Test Suite |
| 2 | + |
| 3 | +This directory contains a comprehensive set of OpenShift-specific end-to-end tests for the OpenTelemetry Operator. These tests serve as **configuration blueprints** for customers to understand and deploy various OpenTelemetry observability patterns on OpenShift. |
| 4 | + |
| 5 | +## 🎯 Purpose |
| 6 | + |
| 7 | +These test scenarios provide OpenTelemetry configuration blueprints that demonstrate: |
| 8 | +- Integration with OpenShift-specific features (Routes, Monitoring, Security) |
| 9 | +- Real-world observability patterns and configurations |
| 10 | +- Step-by-step deployment instructions for various use cases |
| 11 | + |
| 12 | +## 📋 Test Scenarios Overview |
| 13 | + |
| 14 | +| Scenario | Purpose | Key Features | |
| 15 | +|----------|---------|-------------| |
| 16 | +| [route](./route/) | External Access via OpenShift Routes | Route ingress, OTLP HTTP/gRPC endpoints | |
| 17 | +| [scrape-in-cluster-monitoring](./scrape-in-cluster-monitoring/) | Prometheus Metrics Federation | In-cluster monitoring integration, metrics scraping | |
| 18 | +| [otlp-metrics-traces](./otlp-metrics-traces/) | OTLP Endpoint with Tempo | Metrics & traces collection, Tempo integration | |
| 19 | +| [multi-cluster](./multi-cluster/) | Secure Multi-Cluster Communication | TLS certificates, cross-cluster telemetry | |
| 20 | +| [must-gather](./must-gather/) | Diagnostic Information Collection | Must-gather functionality, target allocator | |
| 21 | +| [monitoring](./monitoring/) | Platform Monitoring Integration | OpenShift monitoring stack integration | |
| 22 | +| [kafka](./kafka/) | Messaging Layer for Telemetry | Kafka-based telemetry distribution | |
| 23 | +| [export-to-cluster-logging-lokistack](./export-to-cluster-logging-lokistack/) | Log Export to LokiStack | Log shipping to OpenShift logging | |
| 24 | + |
| 25 | +## 🔗 OpenTelemetry Collector Components Tests |
| 26 | + |
| 27 | +For detailed component-specific configurations and testing patterns, see the **OpenTelemetry Component E2E Test Suite** in the [distributed-tracing-qe](https://github.com/openshift/distributed-tracing-qe.git) repository: |
| 28 | + |
| 29 | +**📡 Receivers:** |
| 30 | +- [filelog](https://github.com/openshift/distributed-tracing-qe/tree/main/tests/e2e-otel/filelog) - File-based log collection from Kubernetes pods |
| 31 | +- [hostmetricsreceiver](https://github.com/openshift/distributed-tracing-qe/tree/main/tests/e2e-otel/hostmetricsreceiver) - Host system metrics (CPU, memory, disk, network) |
| 32 | +- [journaldreceiver](https://github.com/openshift/distributed-tracing-qe/tree/main/tests/e2e-otel/journaldreceiver) - Systemd journal log collection |
| 33 | +- [k8sclusterreceiver](https://github.com/openshift/distributed-tracing-qe/tree/main/tests/e2e-otel/k8sclusterreceiver) - Kubernetes cluster-wide metrics |
| 34 | +- [k8seventsreceiver](https://github.com/openshift/distributed-tracing-qe/tree/main/tests/e2e-otel/k8seventsreceiver) - Kubernetes events collection |
| 35 | +- [k8sobjectsreceiver](https://github.com/openshift/distributed-tracing-qe/tree/main/tests/e2e-otel/k8sobjectsreceiver) - Kubernetes objects monitoring |
| 36 | +- [kubeletstatsreceiver](https://github.com/openshift/distributed-tracing-qe/tree/main/tests/e2e-otel/kubeletstatsreceiver) - Kubelet and container metrics |
| 37 | +- [otlpjsonfilereceiver](https://github.com/openshift/distributed-tracing-qe/tree/main/tests/e2e-otel/otlpjsonfilereceiver) - OTLP JSON file log ingestion |
| 38 | + |
| 39 | +**📤 Exporters:** |
| 40 | +- [awscloudwatchlogsexporter](https://github.com/openshift/distributed-tracing-qe/tree/main/tests/e2e-otel/awscloudwatchlogsexporter) - AWS CloudWatch Logs integration |
| 41 | +- [awsxrayexporter](https://github.com/openshift/distributed-tracing-qe/tree/main/tests/e2e-otel/awsxrayexporter) - AWS X-Ray tracing export |
| 42 | +- [googlemanagedprometheusexporter](https://github.com/openshift/distributed-tracing-qe/tree/main/tests/e2e-otel/googlemanagedprometheusexporter) - Google Cloud Managed Prometheus |
| 43 | +- [loadbalancingexporter](https://github.com/openshift/distributed-tracing-qe/tree/main/tests/e2e-otel/loadbalancingexporter) - High availability load balancing |
| 44 | +- [prometheusremotewriteexporter](https://github.com/openshift/distributed-tracing-qe/tree/main/tests/e2e-otel/prometheusremotewriteexporter) - Prometheus remote write integration |
| 45 | + |
| 46 | +**⚙️ Processors:** |
| 47 | +- [batchprocessor](https://github.com/openshift/distributed-tracing-qe/tree/main/tests/e2e-otel/batchprocessor) - Batching for performance optimization |
| 48 | +- [filterprocessor](https://github.com/openshift/distributed-tracing-qe/tree/main/tests/e2e-otel/filterprocessor) - Selective data filtering |
| 49 | +- [groupbyattrsprocessor](https://github.com/openshift/distributed-tracing-qe/tree/main/tests/e2e-otel/groupbyattrsprocessor) - Attribute-based data grouping |
| 50 | +- [memorylimiterprocessor](https://github.com/openshift/distributed-tracing-qe/tree/main/tests/e2e-otel/memorylimiterprocessor) - Memory usage protection |
| 51 | +- [resourceprocessor](https://github.com/openshift/distributed-tracing-qe/tree/main/tests/e2e-otel/resourceprocessor) - Resource attribute manipulation |
| 52 | +- [tailsamplingprocessor](https://github.com/openshift/distributed-tracing-qe/tree/main/tests/e2e-otel/tailsamplingprocessor) - Intelligent trace sampling |
| 53 | +- [transformprocessor](https://github.com/openshift/distributed-tracing-qe/tree/main/tests/e2e-otel/transformprocessor) - Advanced data transformation |
| 54 | + |
| 55 | +**🔗 Connectors:** |
| 56 | +- [forwardconnector](https://github.com/openshift/distributed-tracing-qe/tree/main/tests/e2e-otel/forwardconnector) - Data forwarding between pipelines |
| 57 | +- [routingconnector](https://github.com/openshift/distributed-tracing-qe/tree/main/tests/e2e-otel/routingconnector) - Conditional data routing |
| 58 | +- [countconnector](https://github.com/openshift/distributed-tracing-qe/tree/main/tests/e2e-otel/countconnector) - Metrics generation from telemetry data |
| 59 | + |
| 60 | +**🔧 Extensions:** |
| 61 | +- [oidcauthextension](https://github.com/openshift/distributed-tracing-qe/tree/main/tests/e2e-otel/oidcauthextension) - OIDC authentication |
| 62 | +- [filestorageextension](https://github.com/openshift/distributed-tracing-qe/tree/main/tests/e2e-otel/filestorageextension) - Persistent file storage |
| 63 | + |
| 64 | +These component test blueprints provide configurations for individual OpenTelemetry components that can be combined with the OpenShift integration patterns documented here. |
| 65 | + |
| 66 | +## 🚀 Quick Start |
| 67 | + |
| 68 | +### Prerequisites |
| 69 | + |
| 70 | +- OpenShift cluster (4.12+) |
| 71 | +- OpenTelemetry Operator installed |
| 72 | +- `oc` CLI tool configured |
| 73 | +- Appropriate cluster permissions |
| 74 | + |
| 75 | +### Running Tests |
| 76 | + |
| 77 | +These tests use [Chainsaw](https://kyverno.github.io/chainsaw/) for end-to-end testing: |
| 78 | + |
| 79 | +```bash |
| 80 | +# Run all OpenShift tests |
| 81 | +chainsaw test --test-dir tests/e2e-openshift/ |
| 82 | + |
| 83 | +# Run specific test scenario |
| 84 | +chainsaw test --test-dir tests/e2e-openshift/route/ |
| 85 | +``` |
| 86 | + |
| 87 | +### Using as Configuration Templates |
| 88 | + |
| 89 | +Each test directory contains: |
| 90 | +- **Configuration Files**: YAML configuration blueprints |
| 91 | +- **README.md**: Step-by-step deployment instructions |
| 92 | +- **Scripts**: Verification and setup automation |
| 93 | + |
| 94 | +## 📁 Directory Structure |
| 95 | + |
| 96 | +``` |
| 97 | +tests/e2e-openshift/ |
| 98 | +├── README.md # This overview |
| 99 | +├── route/ # External access patterns |
| 100 | +├── scrape-in-cluster-monitoring/ # Prometheus integration |
| 101 | +├── otlp-metrics-traces/ # OTLP with Tempo |
| 102 | +├── multi-cluster/ # Cross-cluster telemetry |
| 103 | +├── must-gather/ # Diagnostic collection |
| 104 | +├── monitoring/ # Platform monitoring |
| 105 | +├── kafka/ # Messaging patterns |
| 106 | +└── export-to-cluster-logging-lokistack/ # Log export patterns |
| 107 | +``` |
| 108 | + |
| 109 | +## 🔧 Configuration Patterns |
| 110 | + |
| 111 | +### Common OpenShift Integrations |
| 112 | + |
| 113 | +1. **Security Context Constraints (SCCs)** |
| 114 | + - Automated SCC annotations for namespaces |
| 115 | + - Service account configurations |
| 116 | + |
| 117 | +2. **OpenShift Routes** |
| 118 | + - TLS termination options |
| 119 | + - External endpoint exposure |
| 120 | + |
| 121 | +3. **Monitoring Stack Integration** |
| 122 | + - Prometheus federation |
| 123 | + - Platform monitoring labels |
| 124 | + |
| 125 | +4. **RBAC Configurations** |
| 126 | + - Cluster roles and bindings |
| 127 | + - Service account permissions |
| 128 | + |
| 129 | +## 📖 Documentation |
| 130 | + |
| 131 | +Each test scenario includes: |
| 132 | +- **Configuration blueprints** for reference and adaptation |
| 133 | +- **Step-by-step instructions** for manual deployment |
| 134 | +- **Verification steps** to ensure proper operation |
| 135 | +- **Troubleshooting guidance** for common issues |
| 136 | + |
| 137 | +## 🏷️ Labels and Annotations |
| 138 | + |
| 139 | +OpenShift-specific labels and annotations used across scenarios: |
| 140 | +- `openshift.io/cluster-monitoring=true` - Enable platform monitoring |
| 141 | +- `openshift.io/sa.scc.uid-range` - UID range for security contexts |
| 142 | +- `openshift.io/sa.scc.supplemental-groups` - Supplemental groups for SCCs |
| 143 | + |
| 144 | +## 🤝 Contributing |
| 145 | + |
| 146 | +When adding new test scenarios: |
| 147 | +1. Include comprehensive README with step-by-step instructions |
| 148 | +2. Provide configuration blueprint examples |
| 149 | +3. Add verification scripts for testing |
| 150 | +4. Document OpenShift-specific considerations |
| 151 | + |
| 152 | +## 📝 Documentation Note |
| 153 | + |
| 154 | +The comprehensive READMEs in this test suite were generated using Claude AI to provide detailed, step-by-step configuration blueprints for OpenTelemetry deployments on OpenShift. These AI-generated guides aim to accelerate user adoption by providing clear, actionable documentation for complex observability scenarios. |
| 155 | + |
| 156 | +## 📚 Additional Resources |
| 157 | + |
| 158 | +- [OpenTelemetry Operator Documentation](https://github.com/open-telemetry/opentelemetry-operator) |
| 159 | +- [OpenShift Documentation](https://docs.openshift.com/) |
| 160 | +- [Chainsaw Testing Framework](https://kyverno.github.io/chainsaw/) |
0 commit comments