c60937c5cb
ci / build (map[dir:apps/booking name:booking]) (push) Has been cancelled
ci / build (map[dir:apps/operator name:operator]) (push) Has been cancelled
ci / build (map[dir:apps/portal name:portal]) (push) Has been cancelled
ci / build (map[dir:services/platform-api name:platform-api]) (push) Has been cancelled
ci / deploy (push) Has been cancelled
ci / typecheck (map[dir:apps/booking name:booking]) (push) Has been cancelled
ci / typecheck (map[dir:apps/operator name:operator]) (push) Has been cancelled
ci / typecheck (map[dir:apps/portal name:portal]) (push) Has been cancelled
ci / typecheck (map[dir:apps/website name:website]) (push) Has been cancelled
ci / typecheck (map[dir:services/platform-api name:platform-api]) (push) Has been cancelled
ci / test (push) Has been cancelled
Push to main = release: after build, a deploy job pins each app image to the commit SHA (kustomize edit set image), kubectl-applies fleet/apps and waits for the rollouts. The runner already runs in-cluster, so it reaches the API server on the in-cluster service IP with a kubeconfig for the new ci-deployer ServiceAccount (namespace-scoped admin, KUBECONFIG_B64 repo secret). The drafted Flux sync/image-automation layer is removed — a GitOps controller plus bot tag-bump commits is more machinery than a single-node cluster needs. Sortable image tags and $imagepolicy markers go with it. Also: per-router ACME-safe HTTP->HTTPS redirects for the app ingresses, platform-api prod config completed (Authentik JWT/JWKS + admin API, Stalwart via the cni0 gateway IP, OCIS/cold-storage placeholders until those tiers exist) and the secrets template/README updated to match.
104 lines
2.8 KiB
YAML
104 lines
2.8 KiB
YAML
# platform-api — NestJS control plane (tenants, partners, users, scheduling,
|
|
# provisioning). Internal-only Service on :3001 plus a public Ingress for
|
|
# api.dezky.eu (consumed by booking's nitro proxy and the Stalwart webhook).
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: platform-api
|
|
namespace: dezky-apps
|
|
labels:
|
|
app.kubernetes.io/name: platform-api
|
|
app.kubernetes.io/part-of: dezky
|
|
spec:
|
|
replicas: 2
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: platform-api
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: platform-api
|
|
spec:
|
|
containers:
|
|
- name: platform-api
|
|
# CI pins this to the commit SHA at deploy time (kustomize edit set image
|
|
# in .gitea/workflows/ci.yml); :latest here is the fallback.
|
|
image: git.lastcloud.io/ronnibaslund/dezky/platform-api:latest
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- name: http
|
|
containerPort: 3001
|
|
env:
|
|
- name: PORT
|
|
value: "3001"
|
|
- name: DEZKY_ENV
|
|
value: production
|
|
# Non-secret config (Stalwart URL, feature toggles, etc.) comes from a
|
|
# ConfigMap; secrets (Mongo URI, credential key, Stalwart password,
|
|
# webhook secret) come from the Secret. See README.md.
|
|
envFrom:
|
|
- configMapRef:
|
|
name: platform-api-config
|
|
- secretRef:
|
|
name: platform-api-secrets
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 192Mi
|
|
limits:
|
|
memory: 512Mi
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: http
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 15
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: http
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 30
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: platform-api
|
|
namespace: dezky-apps
|
|
labels:
|
|
app.kubernetes.io/name: platform-api
|
|
spec:
|
|
selector:
|
|
app.kubernetes.io/name: platform-api
|
|
ports:
|
|
- name: http
|
|
port: 3001
|
|
targetPort: http
|
|
---
|
|
# Public ingress for api.dezky.eu. TLS via cert-manager (HTTP-01) + Traefik.
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: platform-api
|
|
namespace: dezky-apps
|
|
annotations:
|
|
cert-manager.io/cluster-issuer: letsencrypt-prod
|
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
|
spec:
|
|
ingressClassName: traefik
|
|
tls:
|
|
- hosts:
|
|
- api.dezky.eu
|
|
secretName: api-dezky-eu-tls
|
|
rules:
|
|
- host: api.dezky.eu
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: platform-api
|
|
port:
|
|
number: 3001
|