1
0
Fork 0

Remove Python app example and replace with header-echo server for testing

- Deleted the `/examples/docker/python-app` directory and associated files.
- Integrated a custom `header-echo` server for Kubernetes and Docker Compose tests.
- Updated Kubernetes and Docker Compose configurations to use the new `header-echo-server:test` image.
- Enhanced Kubernetes integration tests to validate JSON responses and Cloudflare IP translation behavior.
This commit is contained in:
Joao Gilberto Magalhaes 2026-02-12 16:23:01 -05:00
parent 1fd5873dc9
commit b34d7822e4
6 changed files with 139 additions and 14 deletions

View file

@ -48,10 +48,11 @@
# # Test via port-forward
# kubectl port-forward -n easyhaproxy deployment/easyhaproxy 8080:80
# curl -H "Host: myapp.example.local" http://localhost:8080
# # Expected: 200 OK with "App Behind Cloudflare"
# # Expected: 200 OK with JSON response containing headers, client_ip, and x_forwarded_for
#
# # In production behind Cloudflare, the plugin will restore real client IPs
# # from the CF-Connecting-IP header
# # Test IP translation with CF-Connecting-IP header
# curl -H "Host: myapp.example.local" -H "CF-Connecting-IP: 1.2.3.4" http://localhost:8080
# # Expected: x_forwarded_for should be "1.2.3.4"
# ```
#
# CLEAN UP:
@ -93,12 +94,10 @@ spec:
spec:
containers:
- name: webapp
image: byjg/static-httpserver
image: header-echo-server:test
imagePullPolicy: Never
ports:
- containerPort: 8080
env:
- name: TITLE
value: "App Behind Cloudflare"
resources:
limits:
cpu: '0.1'