Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
404 changes: 404 additions & 0 deletions tests/e2e/README.md

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions tests/e2e/config/kind-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Kind cluster configuration for E2E tests
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
extraPortMappings:
# Expose Kruize service
- containerPort: 30080
hostPort: 8080
protocol: TCP
# Expose Optimizer service
- containerPort: 30081
hostPort: 8081
protocol: TCP
# Expose Prometheus
- containerPort: 30090
hostPort: 9090
protocol: TCP


53 changes: 53 additions & 0 deletions tests/e2e/config/test_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# E2E Test Configuration for Kruize Optimizer

# Cluster configuration
cluster:
type: kind # kind or openshift
name: kruize-e2e-test
namespace: monitoring
# Namespace mapping for optimizer pod based on cluster type
optimizer_namespace:
kind: monitoring
openshift: openshift-tuning

# Image configuration
images:
kruize_operator: "quay.io/kruize/kruize-operator:latest"
kruize_optimizer: "quay.io/kruize/kruize-optimizer:0.0.1"
kruize: "quay.io/kruize/autotune_operator:latest"
kruize_ui: "quay.io/kruize/kruize-ui:latest"

# Test timeouts (in seconds)
timeouts:
pod_ready: 300
operator_init: 120
profile_install: 60
bulk_job_trigger: 180
webhook_callback: 120

# Optimizer configuration
optimizer:
bulk_scheduler_interval: "2m" # Faster for testing
bulk_scheduler_startup_delay: "30s"
measurement_duration: "15min"
target_labels:
kruize/autotune: "enabled"

# Test workload configuration
workload:
name: "test-sysbench"
namespace: "default"
image: "quay.io/kruize/sysbench:latest"

# API endpoints
api:
kruize_port: 8080
optimizer_port: 8081

# Logging
logging:
level: INFO # DEBUG, INFO, WARNING, ERROR
save_pod_logs: true
log_dir: "test_results"


8 changes: 8 additions & 0 deletions tests/e2e/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Python dependencies for E2E tests
pytest>=7.4.0
pytest-timeout>=2.1.0
pytest-html>=3.2.0
pyyaml>=6.0
requests>=2.31.0
kubernetes>=27.2.0
urllib3>=2.0.0
Loading