- Staging cluster werkend tot op phase 6 van cluster-install.md, inclusief HTTPS, Bunny, verificatie service.
This commit is contained in:
@@ -0,0 +1,369 @@
|
||||
# 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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
# Verification service deployment
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: verify-service
|
||||
namespace: eveai-staging
|
||||
labels:
|
||||
app: verify-service
|
||||
component: verification
|
||||
environment: staging
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: verify-service
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: verify-service
|
||||
component: verification
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx:alpine
|
||||
ports:
|
||||
- containerPort: 80
|
||||
volumeMounts:
|
||||
- name: html-content
|
||||
mountPath: /usr/share/nginx/html
|
||||
- name: nginx-config
|
||||
mountPath: /etc/nginx/conf.d
|
||||
resources:
|
||||
requests:
|
||||
memory: "32Mi"
|
||||
cpu: "50m"
|
||||
limits:
|
||||
memory: "64Mi"
|
||||
cpu: "100m"
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /verify/health
|
||||
port: 80
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /verify/health
|
||||
port: 80
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
volumes:
|
||||
- name: html-content
|
||||
configMap:
|
||||
name: verify-content
|
||||
- name: nginx-config
|
||||
configMap:
|
||||
name: verify-nginx-config
|
||||
@@ -0,0 +1,16 @@
|
||||
# Service for the verification app
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: verify-service
|
||||
namespace: eveai-staging
|
||||
labels:
|
||||
app: verify-service
|
||||
spec:
|
||||
selector:
|
||||
app: verify-service
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
name: http
|
||||
type: ClusterIP
|
||||
@@ -0,0 +1,12 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- 00-configmaps.yaml
|
||||
- 01-deployment.yaml
|
||||
- 02-service.yaml
|
||||
|
||||
labels:
|
||||
- pairs:
|
||||
app: verify-service
|
||||
component: verification
|
||||
16
scaleway/manifests/base/infrastructure/00-namespaces.yaml
Normal file
16
scaleway/manifests/base/infrastructure/00-namespaces.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: eveai-staging
|
||||
labels:
|
||||
environment: staging
|
||||
app: eveai
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: monitoring
|
||||
labels:
|
||||
environment: staging
|
||||
app: monitoring
|
||||
@@ -0,0 +1,15 @@
|
||||
# ClusterIssuer for Let's Encrypt staging (test first)
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: ClusterIssuer
|
||||
metadata:
|
||||
name: letsencrypt-staging
|
||||
spec:
|
||||
acme:
|
||||
server: https://acme-staging-v02.api.letsencrypt.org/directory
|
||||
email: pieter@askeveai.com
|
||||
privateKeySecretRef:
|
||||
name: letsencrypt-staging
|
||||
solvers:
|
||||
- http01:
|
||||
ingress:
|
||||
class: nginx
|
||||
@@ -0,0 +1,52 @@
|
||||
# cert-manager-values.yaml
|
||||
# Global configuration
|
||||
global:
|
||||
leaderElection:
|
||||
namespace: "cert-manager"
|
||||
|
||||
# Install CRDs as part of Helm release (alternative to manual install)
|
||||
# installCRDs: false # We install manually above
|
||||
|
||||
# Resource configuration
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 32Mi
|
||||
|
||||
# Webhook configuration
|
||||
webhook:
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 32Mi
|
||||
|
||||
# CA Injector configuration
|
||||
cainjector:
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 32Mi
|
||||
|
||||
# Security context
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1001
|
||||
|
||||
# Node selector (optional)
|
||||
# nodeSelector:
|
||||
# kubernetes.io/os: linux
|
||||
|
||||
# Prometheus monitoring (disabled - no Prometheus operator installed)
|
||||
prometheus:
|
||||
enabled: false
|
||||
servicemonitor:
|
||||
enabled: false
|
||||
46
scaleway/manifests/base/infrastructure/ingress-values.yaml
Normal file
46
scaleway/manifests/base/infrastructure/ingress-values.yaml
Normal file
@@ -0,0 +1,46 @@
|
||||
# ingress-values.yaml
|
||||
controller:
|
||||
# Disable admission webhook to prevent ACME challenge validation issues
|
||||
admissionWebhooks:
|
||||
enabled: false
|
||||
# Service configuratie
|
||||
service:
|
||||
type: LoadBalancer
|
||||
loadBalancerIP: "51.159.25.49" # Jouw huidige IP
|
||||
annotations:
|
||||
# Scaleway specifieke annotaties
|
||||
service.beta.kubernetes.io/scw-loadbalancer-use-hostname: "true"
|
||||
service.beta.kubernetes.io/scw-loadbalancer-proxy-protocol-v1: "false"
|
||||
service.beta.kubernetes.io/scw-loadbalancer-proxy-protocol-v2: "false"
|
||||
|
||||
# Resource limits (optioneel, maar aanbevolen)
|
||||
resources:
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
|
||||
# Replica's voor high availability (optioneel)
|
||||
replicaCount: 1
|
||||
|
||||
# Node selector (optioneel, voor specific nodes)
|
||||
# nodeSelector:
|
||||
# kubernetes.io/os: linux
|
||||
|
||||
# Metrics (voor monitoring later)
|
||||
metrics:
|
||||
enabled: true
|
||||
service:
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "10254"
|
||||
|
||||
# Default backend (optioneel)
|
||||
defaultBackend:
|
||||
enabled: true
|
||||
image:
|
||||
registry: registry.k8s.io
|
||||
image: defaultbackend-amd64
|
||||
tag: "1.5"
|
||||
17
scaleway/manifests/base/kustomization.yaml
Normal file
17
scaleway/manifests/base/kustomization.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- infrastructure/00-namespaces.yaml
|
||||
- infrastructure/01-ingress-controller.yaml
|
||||
- infrastructure/02-cert-manager.yaml
|
||||
- infrastructure/03-cluster-issuers.yaml
|
||||
- applications/verification/
|
||||
- networking/ingress-https.yaml
|
||||
- secrets/scaleway-secrets.yaml
|
||||
- monitoring/
|
||||
|
||||
labels:
|
||||
- pairs:
|
||||
app: eveai
|
||||
managed-by: kustomize
|
||||
16
scaleway/manifests/base/monitoring/kustomization.yaml
Normal file
16
scaleway/manifests/base/monitoring/kustomization.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: monitoring
|
||||
|
||||
helmCharts:
|
||||
- name: kube-prometheus-stack
|
||||
repo: https://prometheus-community.github.io/helm-charts
|
||||
version: "55.5.0"
|
||||
releaseName: monitoring
|
||||
namespace: monitoring
|
||||
valuesFile: values-monitoring.yaml
|
||||
|
||||
commonLabels:
|
||||
environment: staging
|
||||
managed-by: kustomize
|
||||
71
scaleway/manifests/base/monitoring/prometheus-values.yaml
Normal file
71
scaleway/manifests/base/monitoring/prometheus-values.yaml
Normal file
@@ -0,0 +1,71 @@
|
||||
# prometheus-values.yaml
|
||||
# Global settings
|
||||
fullnameOverride: "monitoring"
|
||||
|
||||
# Prometheus configuration
|
||||
prometheus:
|
||||
prometheusSpec:
|
||||
retention: 15d
|
||||
resources:
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 2Gi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 512Mi
|
||||
storageSpec:
|
||||
volumeClaimTemplate:
|
||||
spec:
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
|
||||
# Grafana configuration
|
||||
grafana:
|
||||
enabled: true
|
||||
adminPassword: "admin123" # Change this for production
|
||||
resources:
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 256Mi
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 128Mi
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 2Gi
|
||||
|
||||
# AlertManager configuration
|
||||
alertmanager:
|
||||
alertmanagerSpec:
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 64Mi
|
||||
storage:
|
||||
volumeClaimTemplate:
|
||||
spec:
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
resources:
|
||||
requests:
|
||||
storage: 2Gi
|
||||
|
||||
# Node Exporter
|
||||
nodeExporter:
|
||||
enabled: true
|
||||
|
||||
# Kube State Metrics
|
||||
kubeStateMetrics:
|
||||
enabled: true
|
||||
|
||||
# Disable components you might not need in staging
|
||||
kubeEtcd:
|
||||
enabled: false
|
||||
kubeScheduler:
|
||||
enabled: false
|
||||
kubeControllerManager:
|
||||
enabled: false
|
||||
131
scaleway/manifests/base/monitoring/values-monitoring.yaml
Normal file
131
scaleway/manifests/base/monitoring/values-monitoring.yaml
Normal file
@@ -0,0 +1,131 @@
|
||||
# Prometheus Community Helm Chart Values
|
||||
# For kube-prometheus-stack
|
||||
|
||||
# Global settings
|
||||
global:
|
||||
scrape_interval: 15s
|
||||
evaluation_interval: 15s
|
||||
|
||||
# Prometheus configuration
|
||||
prometheus:
|
||||
prometheusSpec:
|
||||
retention: 30d
|
||||
storageSpec:
|
||||
volumeClaimTemplate:
|
||||
spec:
|
||||
storageClassName: scw-bssd
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
resources:
|
||||
requests:
|
||||
storage: 50Gi
|
||||
|
||||
# External services monitoring (Scaleway managed services)
|
||||
additionalScrapeConfigs:
|
||||
- job_name: 'scaleway-redis'
|
||||
static_configs:
|
||||
- targets: ['redis-endpoint:6379']
|
||||
metrics_path: /metrics
|
||||
scrape_interval: 30s
|
||||
|
||||
- job_name: 'scaleway-postgresql'
|
||||
static_configs:
|
||||
- targets: ['postgres-endpoint:5432']
|
||||
metrics_path: /metrics
|
||||
scrape_interval: 30s
|
||||
|
||||
# Resource limits
|
||||
resources:
|
||||
requests:
|
||||
memory: 2Gi
|
||||
cpu: 500m
|
||||
limits:
|
||||
memory: 4Gi
|
||||
cpu: 1000m
|
||||
|
||||
# Grafana configuration
|
||||
grafana:
|
||||
adminPassword: "admin123" # Change in production
|
||||
persistence:
|
||||
enabled: true
|
||||
storageClassName: scw-bssd
|
||||
size: 10Gi
|
||||
|
||||
# Resource limits
|
||||
resources:
|
||||
requests:
|
||||
memory: 256Mi
|
||||
cpu: 100m
|
||||
limits:
|
||||
memory: 512Mi
|
||||
cpu: 200m
|
||||
|
||||
# Pre-configured dashboards
|
||||
dashboardProviders:
|
||||
dashboardproviders.yaml:
|
||||
apiVersion: 1
|
||||
providers:
|
||||
- name: 'eveai-dashboards'
|
||||
folder: 'EveAI'
|
||||
type: file
|
||||
options:
|
||||
path: /var/lib/grafana/dashboards/eveai
|
||||
|
||||
# Ingress configuration (will be handled by main ingress)
|
||||
ingress:
|
||||
enabled: false
|
||||
|
||||
# Pushgateway for batch jobs
|
||||
pushgateway:
|
||||
enabled: true
|
||||
serviceMonitor:
|
||||
enabled: true
|
||||
resources:
|
||||
requests:
|
||||
memory: 64Mi
|
||||
cpu: 50m
|
||||
limits:
|
||||
memory: 128Mi
|
||||
cpu: 100m
|
||||
|
||||
# AlertManager
|
||||
alertmanager:
|
||||
alertmanagerSpec:
|
||||
storage:
|
||||
volumeClaimTemplate:
|
||||
spec:
|
||||
storageClassName: scw-bssd
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
resources:
|
||||
requests:
|
||||
memory: 128Mi
|
||||
cpu: 50m
|
||||
limits:
|
||||
memory: 256Mi
|
||||
cpu: 100m
|
||||
|
||||
# Node Exporter
|
||||
nodeExporter:
|
||||
enabled: true
|
||||
|
||||
# Kube State Metrics
|
||||
kubeStateMetrics:
|
||||
enabled: true
|
||||
|
||||
# Disable components we don't need
|
||||
kubeApiServer:
|
||||
enabled: false
|
||||
kubelet:
|
||||
enabled: true
|
||||
kubeControllerManager:
|
||||
enabled: false
|
||||
coreDns:
|
||||
enabled: true
|
||||
kubeEtcd:
|
||||
enabled: false
|
||||
kubeScheduler:
|
||||
enabled: false
|
||||
kubeProxy:
|
||||
enabled: false
|
||||
44
scaleway/manifests/base/networking/ingress-http-acme.yaml
Normal file
44
scaleway/manifests/base/networking/ingress-http-acme.yaml
Normal file
@@ -0,0 +1,44 @@
|
||||
# Temporary HTTP-only ingress for ACME certificate challenges
|
||||
# Use this temporarily while Let's Encrypt validates domain ownership
|
||||
# Remove this file and revert to ingress-https.yaml once certificate is Ready
|
||||
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: eveai-staging-ingress
|
||||
namespace: eveai-staging
|
||||
labels:
|
||||
app: eveai
|
||||
environment: staging
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/ssl-redirect: "false"
|
||||
nginx.ingress.kubernetes.io/proxy-body-size: "10m"
|
||||
nginx.ingress.kubernetes.io/proxy-read-timeout: "300"
|
||||
cert-manager.io/cluster-issuer: letsencrypt-staging
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
tls:
|
||||
- hosts:
|
||||
- evie-staging.askeveai.com
|
||||
secretName: evie-staging-tls
|
||||
rules:
|
||||
- host: evie-staging.askeveai.com
|
||||
http:
|
||||
paths:
|
||||
# Verification service paths
|
||||
- path: /verify
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: verify-service
|
||||
port:
|
||||
number: 80
|
||||
|
||||
# Default: root path to verification service
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: verify-service
|
||||
port:
|
||||
number: 80
|
||||
80
scaleway/manifests/base/networking/ingress-https.yaml
Normal file
80
scaleway/manifests/base/networking/ingress-https.yaml
Normal file
@@ -0,0 +1,80 @@
|
||||
# HTTPS-only ingress with TLS configuration
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: eveai-staging-ingress
|
||||
namespace: eveai-staging
|
||||
labels:
|
||||
app: eveai
|
||||
environment: staging
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: nginx
|
||||
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
||||
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
|
||||
nginx.ingress.kubernetes.io/proxy-body-size: "10m"
|
||||
nginx.ingress.kubernetes.io/proxy-read-timeout: "300"
|
||||
cert-manager.io/cluster-issuer: letsencrypt-staging
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
tls:
|
||||
- hosts:
|
||||
- evie-staging.askeveai.com
|
||||
secretName: evie-staging-tls
|
||||
rules:
|
||||
- host: evie-staging.askeveai.com
|
||||
http:
|
||||
paths:
|
||||
# Verification service paths
|
||||
- path: /verify
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: verify-service
|
||||
port:
|
||||
number: 80
|
||||
|
||||
# Future services (ready for deployment)
|
||||
# Admin service
|
||||
# - path: /admin
|
||||
# pathType: Prefix
|
||||
# backend:
|
||||
# service:
|
||||
# name: eveai-app-service
|
||||
# port:
|
||||
# number: 80
|
||||
|
||||
# API service
|
||||
# - path: /api
|
||||
# pathType: Prefix
|
||||
# backend:
|
||||
# service:
|
||||
# name: eveai-api-service
|
||||
# port:
|
||||
# number: 80
|
||||
|
||||
# Client/Frontend service
|
||||
# - path: /client
|
||||
# pathType: Prefix
|
||||
# backend:
|
||||
# service:
|
||||
# name: eveai-chat-client-service
|
||||
# port:
|
||||
# number: 80
|
||||
|
||||
# Monitoring (when deployed)
|
||||
# - path: /monitoring
|
||||
# pathType: Prefix
|
||||
# backend:
|
||||
# service:
|
||||
# name: monitoring-grafana
|
||||
# port:
|
||||
# number: 80
|
||||
|
||||
# Default: root path to verification service
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: verify-service
|
||||
port:
|
||||
number: 80
|
||||
38
scaleway/manifests/base/secrets/eveai-external-secrets.yaml
Normal file
38
scaleway/manifests/base/secrets/eveai-external-secrets.yaml
Normal file
@@ -0,0 +1,38 @@
|
||||
# eveai-external-secrets.yaml
|
||||
apiVersion: external-secrets.io/v1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: eveai-external-secrets
|
||||
namespace: eveai-staging
|
||||
spec:
|
||||
refreshInterval: 300s
|
||||
secretStoreRef:
|
||||
name: scaleway-secret-store
|
||||
kind: SecretStore
|
||||
target:
|
||||
name: eveai-secrets
|
||||
creationPolicy: Owner
|
||||
dataFrom:
|
||||
# Alle keys uit eveai-postgresql secret
|
||||
- extract:
|
||||
key: name:eveai-postgresql
|
||||
# Alle keys uit eveai-redis secret
|
||||
- extract:
|
||||
key: name:eveai-redis
|
||||
# Alle keys uit eveai-openai secret
|
||||
- extract:
|
||||
key: name:eveai-openai
|
||||
# Alle keys uit eveai-mistral secret
|
||||
- extract:
|
||||
key: name:eveai-mistral
|
||||
# Alle keys uit eveai-app-keys secret
|
||||
- extract:
|
||||
key: name:eveai-app-keys
|
||||
# Alle keys uit eveai-object-storage secret
|
||||
- extract:
|
||||
key: name:eveai-object-storage
|
||||
data:
|
||||
# Certificaat als aparte data entry
|
||||
- secretKey: REDIS_CERT
|
||||
remoteRef:
|
||||
key: name:eveai-redis-certificate
|
||||
19
scaleway/manifests/base/secrets/scaleway-secret-store.yaml
Normal file
19
scaleway/manifests/base/secrets/scaleway-secret-store.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
apiVersion: external-secrets.io/v1
|
||||
kind: SecretStore
|
||||
metadata:
|
||||
name: scaleway-secret-store
|
||||
namespace: eveai-staging
|
||||
spec:
|
||||
provider:
|
||||
scaleway:
|
||||
# apiUrl: "https://api.scaleway.com"
|
||||
region: "fr-par"
|
||||
projectId: "ad7d2ed9-252b-4b2a-9f4c-daca3edc4c4b" # Vervang met je Scaleway project ID
|
||||
accessKey:
|
||||
secretRef:
|
||||
name: scaleway-credentials
|
||||
key: access-key
|
||||
secretKey:
|
||||
secretRef:
|
||||
name: scaleway-credentials
|
||||
key: secret-key
|
||||
Reference in New Issue
Block a user