Moves the production deploy from AWS to the Frostmoln production cluster (namespace `sites`). - `deploy-prod` (AWS) has failed since CI left AWS: the runners have no `k8s.unbound.se` context, so the site on AWS still runs an older image. It's replaced by `deploy-prod-frostmoln`, the same pattern as Shiny's `deploy-frostmoln-staging`: `FROSTMOLN_PRODUCTION_DEPLOY_KEY` + `FROSTMOLN_PRODUCTION_CLUSTER_ID` (org), `BUILDTOOLS_FROSTMOLN_PRODUCTION` (org, target `prod-frostmoln`), `deploy prod-frostmoln -n sites`. - Frostmoln enforces restricted Pod Security: the served image is `nginxinc/nginx-unprivileged` (uid 101, port 8080), with a matching securityContext; the Service is ClusterIP. - `ingress-prod.yaml` (ALB) → `ingress-prod-frostmoln.yaml` (Traefik, Let's Encrypt). Checked locally: the image serves `/health` and `/` (200) as uid 101 with all capabilities dropped. **Merge after** infra's `feat/frostmoln-production-sites` is applied (namespace + org secret). The hostnames keep pointing at AWS until the Route 53 switch, a separate step; the certificate is issued after that. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Ma8eHhW59hLAJuLzBnLvUu Reviewed-on: #86
81 lines
1.8 KiB
YAML
81 lines
1.8 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: lingonpaj-site
|
|
labels:
|
|
app.kubernetes.io/name: lingonpaj-site
|
|
annotations:
|
|
kubernetes.io/change-cause: "${TIMESTAMP} Deployed commit id: ${COMMIT}"
|
|
spec:
|
|
replicas: 2
|
|
strategy:
|
|
type: RollingUpdate
|
|
rollingUpdate:
|
|
maxSurge: 1
|
|
maxUnavailable: 1
|
|
minReadySeconds: 30
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: lingonpaj-site
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: lingonpaj-site
|
|
spec:
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 101
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
affinity:
|
|
podAntiAffinity:
|
|
preferredDuringSchedulingIgnoredDuringExecution:
|
|
- weight: 100
|
|
podAffinityTerm:
|
|
labelSelector:
|
|
matchExpressions:
|
|
- key: "app.kubernetes.io/name"
|
|
operator: In
|
|
values:
|
|
- lingonpaj-site
|
|
topologyKey: kubernetes.io/hostname
|
|
containers:
|
|
- name: lingonpaj-site
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 8080
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 5
|
|
timeoutSeconds: 5
|
|
imagePullPolicy: Always
|
|
image: ${IMAGE}
|
|
ports:
|
|
- containerPort: 8080
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
capabilities:
|
|
drop: ["ALL"]
|
|
resources:
|
|
requests:
|
|
cpu: 5m
|
|
memory: 5Mi
|
|
limits:
|
|
memory: 300Mi
|
|
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: lingonpaj-site
|
|
labels:
|
|
app.kubernetes.io/name: lingonpaj-site
|
|
spec:
|
|
selector:
|
|
app.kubernetes.io/name: lingonpaj-site
|
|
ports:
|
|
- port: 80
|
|
targetPort: 8080
|