Files
fleet-demo/html-page.yaml
2025-11-15 09:54:37 +05:30

264 lines
7.8 KiB
YAML

apiVersion: v1
kind: ConfigMap
metadata:
name: html-content
namespace: default
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>Fleet GitOps Demo - ConnectVM Cloud</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
padding: 20px;
}
.container {
background: white;
border-radius: 20px;
box-shadow: 0 20px 60px rgba(0,0,0,0.3);
max-width: 800px;
width: 100%;
padding: 40px;
animation: slideIn 0.5s ease-out;
}
@keyframes slideIn {
from {
opacity: 0;
transform: translateY(-30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
h1 {
color: #667eea;
margin-bottom: 20px;
font-size: 2.5em;
text-align: center;
}
.subtitle {
color: #666;
text-align: center;
font-size: 1.2em;
margin-bottom: 30px;
}
.badge {
display: inline-block;
background: #667eea;
color: white;
padding: 8px 16px;
border-radius: 20px;
font-size: 0.9em;
margin: 5px;
}
.info-box {
background: #f7f9fc;
border-left: 4px solid #667eea;
padding: 20px;
margin: 20px 0;
border-radius: 5px;
}
.info-box h3 {
color: #667eea;
margin-bottom: 10px;
}
.info-box ul {
list-style: none;
padding-left: 0;
}
.info-box li {
padding: 8px 0;
color: #444;
}
.info-box li:before {
content: "✓ ";
color: #667eea;
font-weight: bold;
margin-right: 10px;
}
.footer {
text-align: center;
margin-top: 30px;
color: #999;
font-size: 0.9em;
}
.code {
background: #2d2d2d;
color: #f8f8f2;
padding: 15px;
border-radius: 5px;
overflow-x: auto;
margin: 15px 0;
font-family: 'Courier New', monospace;
}
.emoji {
font-size: 1.5em;
}
</style>
</head>
<body>
<div class="container">
<h1><span class="emoji">🚀</span> Fleet GitOps Demo - UPDATED!</h1>
<p class="subtitle">🔄 Auto-deployed from Gitea in real-time!</p>
<div style="background: #4caf50; color: white; padding: 15px; border-radius: 10px; text-align: center; margin: 20px 0; animation: pulse 2s infinite;">
<h2 style="margin: 0; color: white;">✨ Live Update Demonstration ✨</h2>
<p style="margin: 10px 0 0 0; color: white;">This content was updated via Git push and auto-deployed by Fleet!</p>
</div>
<style>
@keyframes pulse {
0%, 100% { transform: scale(1); }
50% { transform: scale(1.02); }
}
</style>
<div style="text-align: center; margin: 20px 0;">
<span class="badge">Kubernetes v1.28.15</span>
<span class="badge">Fleet GitOps</span>
<span class="badge">Rancher</span>
<span class="badge">Gitea</span>
</div>
<div class="info-box">
<h3><span class="emoji">📦</span> Deployed Resources</h3>
<ul>
<li>2 Master Nodes (HA Control Plane)</li>
<li>2 Worker Nodes</li>
<li>Total: 16 vCPU, 31 GiB RAM</li>
<li>NGINX Ingress Controller</li>
<li>Cert-Manager (Self-signed SSL)</li>
<li>Fleet GitOps Engine</li>
</ul>
</div>
<div class="info-box">
<h3><span class="emoji">🔄</span> GitOps Workflow</h3>
<ul>
<li>Push code to Gitea repository</li>
<li>Fleet watches for changes (15s interval)</li>
<li>Automatic deployment to Kubernetes</li>
<li>No manual kubectl commands needed!</li>
</ul>
</div>
<div class="info-box">
<h3><span class="emoji">🌐</span> Deployed Applications</h3>
<ul>
<li>This HTML Page (you're here!)</li>
<li>Pastebin - paste.connectvm.cloud</li>
<li>Rancher UI - rancher.connectvm.cloud</li>
<li>Hello App - hello.connectvm.cloud</li>
</ul>
</div>
<div class="info-box">
<h3><span class="emoji">💻</span> Repository</h3>
<div class="code">
git clone https://gitea.rootxwire.com/admin/fleet-demo.git
</div>
</div>
<div class="footer">
<p><span class="emoji">⚡</span> Powered by ConnectVM Cloud Platform</p>
<p>Multi-tenant Kubernetes with Fleet GitOps</p>
<p id="timestamp"></p>
</div>
</div>
<script>
document.getElementById('timestamp').textContent =
'Deployed: ' + new Date().toLocaleString();
</script>
</body>
</html>
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: html-page
namespace: default
spec:
replicas: 2
selector:
matchLabels:
app: html-page
template:
metadata:
labels:
app: html-page
spec:
containers:
- name: nginx
image: nginx:alpine
ports:
- containerPort: 80
volumeMounts:
- name: html-content
mountPath: /usr/share/nginx/html
resources:
requests:
memory: "64Mi"
cpu: "50m"
limits:
memory: "128Mi"
cpu: "100m"
volumes:
- name: html-content
configMap:
name: html-content
---
apiVersion: v1
kind: Service
metadata:
name: html-page-service
namespace: default
spec:
selector:
app: html-page
ports:
- port: 80
targetPort: 80
type: ClusterIP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: html-page-ingress
namespace: default
annotations:
cert-manager.io/cluster-issuer: "selfsigned-issuer"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
spec:
ingressClassName: nginx
tls:
- hosts:
- fleet.connectvm.cloud
secretName: html-page-tls
rules:
- host: fleet.connectvm.cloud
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: html-page-service
port:
number: 80