Skip to content

Add k8s integration automation and docs (#13)#14

Merged
hyzhak merged 2 commits intomainfrom
feature/k8s-integration-tests
Sep 24, 2025
Merged

Add k8s integration automation and docs (#13)#14
hyzhak merged 2 commits intomainfrom
feature/k8s-integration-tests

Conversation

@hyzhak
Copy link
Owner

@hyzhak hyzhak commented Sep 24, 2025

  • add integration tests for k8s configuration
  • add automation scripts to run docker compose and Kubernetes integration tests on macOS/Ubuntu
  • fix Grafana data sources
  • document the workflows and lessons learned

ref: #13

@hyzhak hyzhak requested a review from Copilot September 24, 2025 20:04
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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")}"
Copy link

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove trailing whitespace at the end of line 79.

Suggested change
local active_kubeconfig="${KUBECONFIG:-$(printf '%s/.kube/config' "$HOME")}"
local active_kubeconfig="${KUBECONFIG:-$(printf '%s/.kube/config' "$HOME")}"

Copilot uses AI. Check for mistakes.
--namespace "${NAMESPACE}" \
--selector "job-name=${JOB_NAME}" \
-o jsonpath='{range .items[*]}{.metadata.creationTimestamp}{"\t"}{.metadata.name}{"\n"}{end}' 2>/dev/null \
| sort \
Copy link

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sort command will sort timestamps as strings rather than chronologically. Use sort -k1 to sort by the first column (timestamp) properly.

Suggested change
| sort \
| sort -k1,1 \

Copilot uses AI. Check for mistakes.
@hyzhak hyzhak marked this pull request as ready for review September 24, 2025 20:15
@hyzhak hyzhak merged commit e9b0351 into main Sep 24, 2025
2 checks passed
@hyzhak hyzhak deleted the feature/k8s-integration-tests branch September 24, 2025 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants