fix: rename configmap to nginx-canary-html to match deployment mount
This commit is contained in:
@@ -1,51 +1,167 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
name: nginx-canary-config
|
name: nginx-canary-html
|
||||||
namespace: nginx-canary
|
namespace: nginx-canary
|
||||||
data:
|
data:
|
||||||
index.html: |
|
index.html: |
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8">
|
||||||
<title>MCP Canary v2</title>
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Canary v2 - Hello from MCP</title>
|
||||||
<style>
|
<style>
|
||||||
*{margin:0;padding:0;box-sizing:border-box}
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||||
body{min-height:100vh;background:linear-gradient(135deg,#1a0a00 0%,#7c2d00 40%,#d97706 70%,#1a0a00 100%);font-family:'Segoe UI',system-ui,sans-serif;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#fff}
|
body {
|
||||||
.banner{width:100%;background:rgba(220,38,38,.85);color:#fff;text-align:center;padding:12px;font-size:.9rem;font-weight:600;letter-spacing:1px;text-transform:uppercase;position:fixed;top:0;left:0;z-index:10}
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||||
.card{background:rgba(255,255,255,.07);backdrop-filter:blur(16px);border:1px solid rgba(251,146,60,.3);border-radius:20px;padding:50px 60px;max-width:580px;width:90%;text-align:center;box-shadow:0 8px 60px rgba(217,119,6,.25);margin-top:48px}
|
background: linear-gradient(135deg, #1a0a00, #3d1f00, #1a0a00);
|
||||||
h1{font-size:2.4rem;font-weight:700;margin-bottom:10px}
|
min-height: 100vh;
|
||||||
.badge{display:inline-block;background:linear-gradient(90deg,#d97706,#f59e0b);color:#1a0a00;font-size:.78rem;font-weight:700;letter-spacing:1.5px;text-transform:uppercase;padding:5px 16px;border-radius:99px;margin-bottom:28px}
|
display: flex;
|
||||||
.version{font-size:1rem;color:#fcd34d;margin-bottom:24px;font-weight:500}
|
align-items: center;
|
||||||
hr{border:none;border-top:1px solid rgba(251,146,60,.2);margin:24px 0}
|
justify-content: center;
|
||||||
.ip-label{font-size:.8rem;color:#fbbf24;text-transform:uppercase;letter-spacing:1px;margin-bottom:6px}
|
color: #fff;
|
||||||
.ip-value{font-size:1.4rem;font-weight:600;color:#fef3c7;font-family:monospace}
|
}
|
||||||
.grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:24px;text-align:left}
|
.card {
|
||||||
.grid-item{background:rgba(255,255,255,.05);border:1px solid rgba(251,146,60,.2);border-radius:10px;padding:10px 14px}
|
background: rgba(255,200,0,0.08);
|
||||||
.grid-label{font-size:.7rem;color:#fbbf24;text-transform:uppercase;letter-spacing:1px}
|
backdrop-filter: blur(12px);
|
||||||
.grid-value{font-size:.9rem;font-weight:600;color:#fef3c7;font-family:monospace}
|
border: 1px solid rgba(255,200,0,0.3);
|
||||||
.footer{margin-top:28px;font-size:.75rem;color:rgba(251,146,60,.5)}
|
border-radius: 20px;
|
||||||
|
padding: 60px 80px;
|
||||||
|
text-align: center;
|
||||||
|
box-shadow: 0 25px 50px rgba(0,0,0,0.5);
|
||||||
|
max-width: 650px;
|
||||||
|
width: 90%;
|
||||||
|
}
|
||||||
|
.badge {
|
||||||
|
display: inline-block;
|
||||||
|
background: linear-gradient(90deg, #f59e0b, #d97706);
|
||||||
|
color: #000;
|
||||||
|
font-size: 0.75rem;
|
||||||
|
font-weight: 800;
|
||||||
|
letter-spacing: 2px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
padding: 6px 18px;
|
||||||
|
border-radius: 20px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.version-badge {
|
||||||
|
display: inline-block;
|
||||||
|
background: rgba(245,158,11,0.2);
|
||||||
|
border: 1px solid rgba(245,158,11,0.5);
|
||||||
|
color: #fbbf24;
|
||||||
|
font-size: 0.7rem;
|
||||||
|
font-weight: 700;
|
||||||
|
letter-spacing: 2px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
padding: 4px 14px;
|
||||||
|
border-radius: 20px;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
font-size: 3rem;
|
||||||
|
font-weight: 800;
|
||||||
|
background: linear-gradient(90deg, #fbbf24, #f59e0b);
|
||||||
|
-webkit-background-clip: text;
|
||||||
|
-webkit-text-fill-color: transparent;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.subtitle { color: #d97706; font-size: 1rem; margin-bottom: 20px; }
|
||||||
|
.canary-warning {
|
||||||
|
background: rgba(245,158,11,0.15);
|
||||||
|
border: 1px solid rgba(245,158,11,0.4);
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 10px 20px;
|
||||||
|
font-size: 0.85rem;
|
||||||
|
color: #fbbf24;
|
||||||
|
margin-bottom: 25px;
|
||||||
|
}
|
||||||
|
.ip-box {
|
||||||
|
background: rgba(0,0,0,0.35);
|
||||||
|
border: 1px solid rgba(245,158,11,0.5);
|
||||||
|
border-radius: 12px;
|
||||||
|
padding: 20px 30px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.ip-label {
|
||||||
|
font-size: 0.7rem;
|
||||||
|
letter-spacing: 2px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
color: #b45309;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
.ip-value {
|
||||||
|
font-size: 1.8rem;
|
||||||
|
font-weight: 700;
|
||||||
|
font-family: 'Courier New', monospace;
|
||||||
|
color: #fbbf24;
|
||||||
|
letter-spacing: 3px;
|
||||||
|
}
|
||||||
|
.info-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
gap: 12px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.info-box {
|
||||||
|
background: rgba(0,0,0,0.35);
|
||||||
|
border: 1px solid rgba(245,158,11,0.3);
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 12px 16px;
|
||||||
|
}
|
||||||
|
.info-label {
|
||||||
|
font-size: 0.65rem;
|
||||||
|
letter-spacing: 2px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
color: #b45309;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
|
.info-value {
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 700;
|
||||||
|
font-family: 'Courier New', monospace;
|
||||||
|
color: #fbbf24;
|
||||||
|
}
|
||||||
|
.footer { font-size: 0.78rem; color: #78350f; }
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="banner">⚠ This is a CANARY build — not for production use</div>
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="badge">Canary Release</div>
|
<div class="badge">🐤 Canary Release</div><br>
|
||||||
|
<div class="version-badge">v2.0.0</div>
|
||||||
<h1>Hello from MCP v2</h1>
|
<h1>Hello from MCP v2</h1>
|
||||||
<div class="version">v2.0.0 canary</div>
|
<p class="subtitle">Canary deployment — receiving experimental traffic</p>
|
||||||
<hr/>
|
<div class="canary-warning">⚠ This is a CANARY build. Not yet promoted to stable.</div>
|
||||||
|
<div class="ip-box">
|
||||||
<div class="ip-label">Your IP Address</div>
|
<div class="ip-label">Your IP Address</div>
|
||||||
<div class="ip-value" id="ip">detecting...</div>
|
<div class="ip-value" id="ip">Detecting...</div>
|
||||||
<div class="grid">
|
|
||||||
<div class="grid-item"><div class="grid-label">Track</div><div class="grid-value">canary</div></div>
|
|
||||||
<div class="grid-item"><div class="grid-label">Version</div><div class="grid-value">v2.0.0</div></div>
|
|
||||||
<div class="grid-item"><div class="grid-label">Image</div><div class="grid-value">nginx:1.25-alpine</div></div>
|
|
||||||
<div class="grid-item"><div class="grid-label">Replicas</div><div class="grid-value">2</div></div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">thedevops.dev - nginx-canary namespace</div>
|
<div class="info-grid">
|
||||||
|
<div class="info-box">
|
||||||
|
<div class="info-label">Track</div>
|
||||||
|
<div class="info-value">canary</div>
|
||||||
</div>
|
</div>
|
||||||
<script>fetch('https://api.ipify.org?format=json').then(r=>r.json()).then(d=>document.getElementById('ip').textContent=d.ip).catch(()=>document.getElementById('ip').textContent='unavailable')</script>
|
<div class="info-box">
|
||||||
|
<div class="info-label">Version</div>
|
||||||
|
<div class="info-value">v2.0.0</div>
|
||||||
|
</div>
|
||||||
|
<div class="info-box">
|
||||||
|
<div class="info-label">Image</div>
|
||||||
|
<div class="info-value">nginx:1.25-alpine</div>
|
||||||
|
</div>
|
||||||
|
<div class="info-box">
|
||||||
|
<div class="info-label">Replicas</div>
|
||||||
|
<div class="info-value">2</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="footer">nginx-canary · thedevops.dev · ArgoCD + Traefik + MCP</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
fetch('https://api.ipify.org?format=json')
|
||||||
|
.then(r => r.json())
|
||||||
|
.then(d => { document.getElementById('ip').textContent = d.ip; })
|
||||||
|
.catch(() => { document.getElementById('ip').textContent = window.location.hostname; });
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
nginx.conf: |
|
nginx.conf: |
|
||||||
@@ -54,8 +170,9 @@ data:
|
|||||||
server_name _;
|
server_name _;
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
index index.html;
|
index index.html;
|
||||||
add_header X-Version "v2.0.0" always;
|
add_header X-Version "v2.0.0";
|
||||||
add_header X-Track "canary" always;
|
add_header X-Track "canary";
|
||||||
location / { try_files $uri $uri/ /index.html; }
|
location / {
|
||||||
location /healthz { return 200 'ok'; add_header Content-Type text/plain; }
|
try_files $uri $uri/ =404;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user