369 lines
13 KiB
YAML
369 lines
13 KiB
YAML
# ConfigMap with HTML content for the test interface
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: verify-content
|
|
namespace: eveai-staging
|
|
data:
|
|
index.html: |
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>EveAI Staging - System Verification</title>
|
|
<style>
|
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
min-height: 100vh;
|
|
padding: 20px;
|
|
}
|
|
.container {
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
background: white;
|
|
border-radius: 12px;
|
|
box-shadow: 0 20px 40px rgba(0,0,0,0.1);
|
|
overflow: hidden;
|
|
}
|
|
.header {
|
|
background: #2d3748;
|
|
color: white;
|
|
padding: 30px;
|
|
text-align: center;
|
|
}
|
|
.header h1 { font-size: 2.5em; margin-bottom: 10px; }
|
|
.subtitle { opacity: 0.8; font-size: 1.1em; }
|
|
.content { padding: 40px; }
|
|
.status-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
|
gap: 20px;
|
|
margin-bottom: 40px;
|
|
}
|
|
.status-card {
|
|
border: 1px solid #e2e8f0;
|
|
border-radius: 8px;
|
|
padding: 20px;
|
|
background: #f8fafc;
|
|
}
|
|
.status-card h3 {
|
|
color: #2d3748;
|
|
margin-bottom: 15px;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
.status-indicator {
|
|
width: 12px;
|
|
height: 12px;
|
|
border-radius: 50%;
|
|
margin-right: 10px;
|
|
}
|
|
.healthy { background: #48bb78; }
|
|
.warning { background: #ed8936; }
|
|
.info { background: #4299e1; }
|
|
.debug-section {
|
|
background: #1a202c;
|
|
color: #e2e8f0;
|
|
border-radius: 8px;
|
|
padding: 30px;
|
|
margin-top: 30px;
|
|
}
|
|
.debug-section h3 { color: #90cdf4; margin-bottom: 20px; }
|
|
.endpoint {
|
|
background: #2d3748;
|
|
border-radius: 4px;
|
|
padding: 15px;
|
|
margin: 10px 0;
|
|
font-family: 'Courier New', monospace;
|
|
border-left: 4px solid #4299e1;
|
|
}
|
|
.endpoint a { color: #90cdf4; text-decoration: none; }
|
|
.endpoint a:hover { text-decoration: underline; }
|
|
.tools {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
gap: 15px;
|
|
margin-top: 20px;
|
|
}
|
|
.tool-button {
|
|
background: #4299e1;
|
|
color: white;
|
|
border: none;
|
|
padding: 12px 20px;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
}
|
|
.tool-button:hover { background: #3182ce; }
|
|
.info-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
margin-top: 15px;
|
|
}
|
|
.info-table th, .info-table td {
|
|
text-align: left;
|
|
padding: 8px 12px;
|
|
border-bottom: 1px solid #e2e8f0;
|
|
}
|
|
.info-table th { background: #f7fafc; font-weight: 600; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<div class="header">
|
|
<h1>EveAI Staging Environment</h1>
|
|
<div class="subtitle">System Verification & Debug Console</div>
|
|
</div>
|
|
|
|
<div class="content">
|
|
<div class="status-grid">
|
|
<div class="status-card">
|
|
<h3><span class="status-indicator healthy"></span>Cluster Status</h3>
|
|
<p><strong>Environment:</strong> Staging</p>
|
|
<p><strong>Ingress:</strong> NGINX</p>
|
|
<p><strong>LoadBalancer:</strong> Scaleway (Automatic)</p>
|
|
<p><strong>CDN:</strong> Bunny.net (Planned)</p>
|
|
</div>
|
|
|
|
<div class="status-card">
|
|
<h3><span class="status-indicator healthy"></span>Network</h3>
|
|
<p><strong>Host:</strong> <span id="hostname">Loading...</span></p>
|
|
<p><strong>IP:</strong> <span id="clientip">Loading...</span></p>
|
|
<p><strong>User-Agent:</strong> <span id="useragent">Loading...</span></p>
|
|
</div>
|
|
|
|
<div class="status-card">
|
|
<h3><span class="status-indicator info"></span>Container Info</h3>
|
|
<table class="info-table">
|
|
<tr><th>Pod Name</th><td id="podname">verify-service</td></tr>
|
|
<tr><th>Namespace</th><td>eveai-staging</td></tr>
|
|
<tr><th>Container</th><td>nginx:alpine</td></tr>
|
|
<tr><th>Path</th><td>/verify</td></tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="status-card">
|
|
<h3><span class="status-indicator warning"></span>Planned Services</h3>
|
|
<p><strong>/admin</strong> - Admin interface (Not deployed)</p>
|
|
<p><strong>/api</strong> - Backend API (Not deployed)</p>
|
|
<p><strong>/client</strong> - Frontend app (Not deployed)</p>
|
|
<p><strong>/verify</strong> - This debug service ✓</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="debug-section">
|
|
<h3>Debug & Health Endpoints</h3>
|
|
|
|
<div class="endpoint">
|
|
<strong>Health Check:</strong>
|
|
<a href="/verify/health">/verify/health</a> - Basic health status
|
|
</div>
|
|
|
|
<div class="endpoint">
|
|
<strong>System Info:</strong>
|
|
<a href="/verify/info">/verify/info</a> - Detailed system information
|
|
</div>
|
|
|
|
<div class="endpoint">
|
|
<strong>Headers:</strong>
|
|
<a href="/verify/headers">/verify/headers</a> - Request headers analysis
|
|
</div>
|
|
|
|
<div class="endpoint">
|
|
<strong>Network Test:</strong>
|
|
<a href="/verify/network">/verify/network</a> - Network connectivity tests
|
|
</div>
|
|
|
|
<div class="tools">
|
|
<button class="tool-button" onclick="testHealth()">Test Health</button>
|
|
<button class="tool-button" onclick="testConnectivity()">Test APIs</button>
|
|
<button class="tool-button" onclick="showHeaders()">Show Headers</button>
|
|
<button class="tool-button" onclick="downloadLogs()">Get Logs</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
// Populate dynamic content
|
|
document.getElementById('hostname').textContent = window.location.hostname;
|
|
document.getElementById('clientip').textContent = 'Detected via headers';
|
|
document.getElementById('useragent').textContent = navigator.userAgent.substring(0, 50) + '...';
|
|
|
|
// Debug functions
|
|
function testHealth() {
|
|
fetch('/verify/health')
|
|
.then(response => response.text())
|
|
.then(data => alert('Health check: ' + data))
|
|
.catch(err => alert('Health check failed: ' + err));
|
|
}
|
|
|
|
function testConnectivity() {
|
|
alert('API connectivity tests would run here when APIs are deployed');
|
|
}
|
|
|
|
function showHeaders() {
|
|
window.open('/verify/headers', '_blank');
|
|
}
|
|
|
|
function downloadLogs() {
|
|
alert('Log download feature - would fetch container logs');
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|
|
|
|
health.html: |
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head><title>Health Check</title></head>
|
|
<body>
|
|
<h1>Health Status: OK</h1>
|
|
<p>Timestamp: <script>document.write(new Date().toISOString())</script></p>
|
|
<p>Service: EveAI Staging Verification</p>
|
|
<p>Status: All systems operational</p>
|
|
</body>
|
|
</html>
|
|
|
|
info.html: |
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head><title>System Information</title></head>
|
|
<body>
|
|
<h1>System Information</h1>
|
|
<h2>Environment</h2>
|
|
<ul>
|
|
<li>Namespace: eveai-staging</li>
|
|
<li>Service: verify-service</li>
|
|
<li>Path: /verify</li>
|
|
<li>Container: nginx:alpine</li>
|
|
</ul>
|
|
<h2>Network</h2>
|
|
<ul>
|
|
<li>Ingress Controller: NGINX</li>
|
|
<li>LoadBalancer: Scaleway Automatic</li>
|
|
<li>External IP: Via LoadBalancer</li>
|
|
</ul>
|
|
</body>
|
|
</html>
|
|
|
|
headers.html: |
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head><title>Request Headers</title></head>
|
|
<body>
|
|
<h1>Request Headers Analysis</h1>
|
|
<p>This page would show detailed request headers in a production implementation.</p>
|
|
<p>Useful for debugging CDN, LoadBalancer, and ingress header forwarding.</p>
|
|
<h2>Expected Headers</h2>
|
|
<ul>
|
|
<li>Host: evie-staging.askeveai.com</li>
|
|
<li>X-Forwarded-For: (Client IP)</li>
|
|
<li>X-Forwarded-Proto: http/https</li>
|
|
<li>User-Agent: (Browser/Tool)</li>
|
|
</ul>
|
|
</body>
|
|
</html>
|
|
|
|
network.html: |
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head><title>Network Tests</title></head>
|
|
<body>
|
|
<h1>Network Connectivity Tests</h1>
|
|
<p>This page would run network connectivity tests:</p>
|
|
<h2>Internal Tests</h2>
|
|
<ul>
|
|
<li>DNS Resolution</li>
|
|
<li>Service Discovery</li>
|
|
<li>Database Connectivity (when deployed)</li>
|
|
</ul>
|
|
<h2>External Tests</h2>
|
|
<ul>
|
|
<li>Internet Connectivity</li>
|
|
<li>External API Reachability</li>
|
|
<li>CDN Performance</li>
|
|
</ul>
|
|
</body>
|
|
</html>
|
|
|
|
---
|
|
# Custom nginx configuration
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: verify-nginx-config
|
|
namespace: eveai-staging
|
|
data:
|
|
default.conf: |
|
|
server {
|
|
listen 80;
|
|
server_name _;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# ACME Challenge support for SSL certificate verification
|
|
location /.well-known/acme-challenge/ {
|
|
access_log off;
|
|
return 200 "acme-challenge-response";
|
|
add_header Content-Type text/plain;
|
|
}
|
|
|
|
# Health endpoint for ingress controller (root level)
|
|
location /healthz {
|
|
access_log off;
|
|
return 200 "healthy\n";
|
|
add_header Content-Type text/plain;
|
|
}
|
|
|
|
# Handle /verify prefix paths - NEW
|
|
location /verify/health {
|
|
try_files /health.html =404;
|
|
}
|
|
|
|
location /verify/info {
|
|
try_files /info.html =404;
|
|
}
|
|
|
|
location /verify/headers {
|
|
try_files /headers.html =404;
|
|
}
|
|
|
|
location /verify/network {
|
|
try_files /network.html =404;
|
|
}
|
|
|
|
# /verify root - serve main interface
|
|
location /verify/ {
|
|
try_files /index.html =404;
|
|
}
|
|
|
|
location /verify {
|
|
try_files /index.html =404;
|
|
}
|
|
|
|
# Original paths (for direct access)
|
|
location /health {
|
|
try_files /health.html =404;
|
|
}
|
|
|
|
location /info {
|
|
try_files /info.html =404;
|
|
}
|
|
|
|
location /headers {
|
|
try_files /headers.html =404;
|
|
}
|
|
|
|
location /network {
|
|
try_files /network.html =404;
|
|
}
|
|
|
|
# Main interface - serve index.html for root
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
} |