Files
pages/deploy/kubernetes/exhibition/app.yaml
T
Anya Tokugawa 4a863fe63c chore(exhibition): preserve deployment and synthetic demo tooling
Separate one-time bootstrap, historical deployment examples and local validation. Document final hostname and historical status; exclude credentials and runtime data.
2026-11-30 23:14:24 +09:00

69 lines
2.4 KiB
YAML

# Apply only after the one-time bootstrap Job has completed successfully.
apiVersion: apps/v1
kind: Deployment
metadata: {name: pageswiki}
spec:
replicas: 1
strategy: {type: Recreate}
selector:
matchLabels: {app: pageswiki}
template:
metadata:
labels: {app: pageswiki, pageswiki-db-client: 'true'}
spec:
automountServiceAccountToken: false
terminationGracePeriodSeconds: 90
securityContext:
runAsNonRoot: true
runAsUser: 10001
runAsGroup: 10001
seccompProfile: {type: RuntimeDefault}
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels: {app: pageswiki-postgres}
topologyKey: kubernetes.io/hostname
containers:
- name: pageswiki
image: git.anya.jp/anya/pageswiki-app@sha256:a999fe16f11ef91dbdb9904c63bb43d9ec3caef93f77cc07b1fe4a80460f67f9
env:
- {name: PAGESWIKI_DATA_DIR, value: /data}
- {name: PAGESWIKI_DB_BACKEND, value: postgresql}
- name: PAGESWIKI_AUTH_KEY
valueFrom: {secretKeyRef: {name: pageswiki-exhibition-app, key: auth-key}}
- name: PAGESWIKI_POSTGRES_DSN
valueFrom: {secretKeyRef: {name: pageswiki-exhibition-app, key: postgres-dsn}}
ports: [{name: http, containerPort: 3000}]
securityContext:
allowPrivilegeEscalation: false
capabilities: {drop: [ALL]}
resources:
requests: {cpu: 250m, memory: 512Mi}
limits: {cpu: '1', memory: 2Gi}
startupProbe:
httpGet: {path: /health, port: http}
periodSeconds: 5
failureThreshold: 120
readinessProbe:
httpGet: {path: /health, port: http}
periodSeconds: 5
volumeMounts:
- {name: data, mountPath: /data, subPath: pageswiki-exhibit-v018/wiki}
- {name: ca, mountPath: /pg-ca, readOnly: true}
volumes:
- name: data
persistentVolumeClaim: {claimName: pageswiki-data}
- name: ca
secret:
secretName: pageswiki-exhibition-tls
items: [{key: ca.crt, path: ca.crt}]
---
apiVersion: v1
kind: Service
metadata: {name: pageswiki}
spec:
type: ClusterIP
selector: {app: pageswiki}
ports: [{name: http, port: 80, targetPort: http}]