Add k8s integration automation and docs (#13)#14
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds comprehensive Kubernetes integration automation and documentation to support running the observability stack in Kubernetes environments. It includes automated scripts for development workflows, integration test execution in Kubernetes clusters, and fixes for configuration issues discovered during the k8s migration.
- Add automation scripts for one-command setup and testing of Kubernetes deployments
- Create Kubernetes Job manifests to run integration tests inside the cluster
- Fix Grafana data source provisioning and Tempo OTLP endpoint configurations
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/integration/Dockerfile | Bundle test files into container for standalone Kubernetes execution |
| scripts/start_k8s_dev_stack.sh | Automated development stack setup with kind cluster management |
| scripts/run_k8s_integration_tests_full.sh | End-to-end integration test automation with cleanup |
| scripts/run_k8s_integration_tests.sh | Execute integration tests as Kubernetes Job with log streaming |
| scripts/run_compose_integration_tests.sh | Docker Compose test automation wrapper |
| docs/k8s-manifests.md | Updated documentation for integration testing workflows |
| docs/insights/k8s-integration-lessons.md | Lessons learned document for troubleshooting |
| deploy/k8s/tests/*.yaml | Kubernetes Job manifests for integration test execution |
| deploy/k8s/overlays/local/kustomization.yaml | Fix image names for local kind development |
| deploy/k8s/base/tempo.yaml | Add missing OTLP ports and proper endpoint binding |
| deploy/k8s/base/grafana.yaml | Fix provisioning file paths for proper data source loading |
| deploy/k8s/base/config/tempo/tempo-config.yml | Bind OTLP endpoints to all interfaces |
| README.md | Comprehensive documentation for new automation features |
| Makefile | Add k8s-integration-test target |
| .github/workflows/integration-tests.yml | Update CI to use proper integration tests instead of smoke tests |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| ${KUBECTL_BIN} get pods -n "${STACK_NAMESPACE}" | ||
| ${KUBECTL_BIN} get svc -n "${STACK_NAMESPACE}" | ||
|
|
||
| local active_kubeconfig="${KUBECONFIG:-$(printf '%s/.kube/config' "$HOME")}" |
There was a problem hiding this comment.
Remove trailing whitespace at the end of line 79.
| local active_kubeconfig="${KUBECONFIG:-$(printf '%s/.kube/config' "$HOME")}" | |
| local active_kubeconfig="${KUBECONFIG:-$(printf '%s/.kube/config' "$HOME")}" |
| --namespace "${NAMESPACE}" \ | ||
| --selector "job-name=${JOB_NAME}" \ | ||
| -o jsonpath='{range .items[*]}{.metadata.creationTimestamp}{"\t"}{.metadata.name}{"\n"}{end}' 2>/dev/null \ | ||
| | sort \ |
There was a problem hiding this comment.
The sort command will sort timestamps as strings rather than chronologically. Use sort -k1 to sort by the first column (timestamp) properly.
| | sort \ | |
| | sort -k1,1 \ |
ref: #13