Enable deploying feature branches into isolated environments on the same k3s cluster. Each branch gets its own namespace (cam-<slug>), PostgreSQL schema, and OpenSearch index prefix for data isolation while sharing the underlying infrastructure. - Make OpenSearch index prefix and DB schema configurable via env vars (defaults preserve existing behavior) - Restructure deploy/ into Kustomize base + overlays (main/feature) - Extend CI to build Docker images for all branches, not just main - Add deploy-feature job with namespace creation, secret copying, Traefik Ingress routing (<slug>-api/ui.cameleer.siegeln.net) - Add cleanup-branch job to remove namespace, PG schema, OS indices on branch deletion - Install required tools (git, jq, curl) in CI deploy containers Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
72 lines
1.5 KiB
YAML
72 lines
1.5 KiB
YAML
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: cameleer3-ui-config
|
|
data:
|
|
config.js: |
|
|
window.__CAMELEER_CONFIG__ = {
|
|
apiBaseUrl: 'http://localhost:8081/api/v1',
|
|
};
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: cameleer3-ui
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: cameleer3-ui
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: cameleer3-ui
|
|
spec:
|
|
imagePullSecrets:
|
|
- name: gitea-registry
|
|
containers:
|
|
- name: ui
|
|
image: gitea.siegeln.net/cameleer/cameleer3-server-ui:latest
|
|
ports:
|
|
- containerPort: 80
|
|
env:
|
|
- name: CAMELEER_API_URL
|
|
value: "http://cameleer3-server:8081"
|
|
volumeMounts:
|
|
- name: config
|
|
mountPath: /usr/share/nginx/html/config.js
|
|
subPath: config.js
|
|
resources:
|
|
requests:
|
|
memory: "32Mi"
|
|
cpu: "10m"
|
|
limits:
|
|
memory: "64Mi"
|
|
cpu: "100m"
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: 80
|
|
periodSeconds: 10
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: 80
|
|
periodSeconds: 5
|
|
volumes:
|
|
- name: config
|
|
configMap:
|
|
name: cameleer3-ui-config
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: cameleer3-ui
|
|
spec:
|
|
type: ClusterIP
|
|
selector:
|
|
app: cameleer3-ui
|
|
ports:
|
|
- port: 80
|
|
targetPort: 80
|