Files
webapplinux/backend/k8s/admin-deployment.yaml
capitano e89989e1d9 Add admin panel API with CRUD for apps
- Express.js backend with JWT authentication
- CRUD endpoints for apps management
- Health check endpoint
- Dockerfile per admin API (Node 18 Alpine)
- Kubernetes: admin-api deployment, service, ingress
- Admin panel at http://admin.apps.local
- Updated nginx.conf to route /api to admin API
- Fixed ingress rules for separate web and admin services
2026-03-18 23:01:42 +01:00

55 lines
1.2 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: admin-api
labels:
app: admin-api
spec:
replicas: 2
selector:
matchLabels:
app: admin-api
template:
metadata:
labels:
app: admin-api
spec:
containers:
- name: admin-api
image: admin-api:latest
imagePullPolicy: Never
ports:
- containerPort: 3000
env:
- name: PORT
value: "3000"
- name: ADMIN_TOKEN
valueFrom:
secretKeyRef:
name: admin-secrets
key: admin-token
- name: JWT_SECRET
valueFrom:
secretKeyRef:
name: admin-secrets
key: jwt-secret
resources:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "256Mi"
cpu: "200m"
livenessProbe:
httpGet:
path: /api/apps
port: 3000
initialDelaySeconds: 10
periodSeconds: 10
readinessProbe:
httpGet:
path: /api/apps
port: 3000
initialDelaySeconds: 5
periodSeconds: 5