Files
momme-world/k8s/deployment.yaml
T
momme 8d33460580
site / generated-is-current (push) Failing after 36s
site generator: commands/*.md with front matter -> k8s/site/
- build/build.mjs: one-file-per-command content (filename = command,
  underscores = spaces; help/suggestion/params/prefix/text/hidden in
  front matter; ${args} ${date} ${time} ${ls} ${help} resolved at runtime)
- generates index.html (banner + chips), commands.json (the single data
  source), hello.txt for curl, style.css via tailwind v4
- src/site.js is now dispatch-only over commands.json; typewriter kept
- src/telnet.py: stdlib telnet shell sharing commands.json
- k8s: python telnet sidecar in the pod + LoadBalancer service 23->2323
- .gitea/workflows/site.yml fails CI when k8s/site/ is not the built output
2026-10-14 01:14:28 +02:00

113 lines
3.0 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: momme-world
labels:
app: momme-world
spec:
replicas: 1
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
selector:
matchLabels:
app: momme-world
template:
metadata:
labels:
app: momme-world
spec:
securityContext:
runAsNonRoot: true
runAsUser: 101
fsGroup: 101
seccompProfile:
type: RuntimeDefault
containers:
- name: nginx
image: docker.io/nginxinc/nginx-unprivileged:1.31.6-alpine@sha256:884e0b7f42f303641b0f4e78755aea647521dca0b89ca3be7992ad78b5c07434
ports:
- name: http
containerPort: 8080
volumeMounts:
- name: site
mountPath: /var/www/html
readOnly: true
- name: config
mountPath: /etc/nginx/conf.d/default.conf
subPath: nginx.conf
readOnly: true
- name: tmp
mountPath: /tmp
readinessProbe:
httpGet:
path: /hello.txt
port: http
periodSeconds: 10
livenessProbe:
httpGet:
path: /hello.txt
port: http
initialDelaySeconds: 5
periodSeconds: 20
resources:
requests:
cpu: 10m
memory: 32Mi
limits:
memory: 64Mi
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop: ["ALL"]
# the telnet shell — same commands.json as the website, stdlib python
- name: telnet
image: docker.io/library/python:3.14-alpine@sha256:7f2ec713f0436c59df2362d973b6a05af9e87ba78f0e94f5245c302984a7a1fd
command: ["python", "-u", "/app/telnet.py"]
env:
- name: TELNET_PORT
value: "2323"
ports:
- name: telnet
containerPort: 2323
volumeMounts:
- name: telnet
mountPath: /app/telnet.py
subPath: telnet.py
readOnly: true
- name: site
mountPath: /app/commands.json
subPath: commands.json
readOnly: true
startupProbe:
tcpSocket:
port: telnet
failureThreshold: 30
periodSeconds: 2
resources:
requests:
cpu: 10m
memory: 48Mi
limits:
memory: 96Mi
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop: ["ALL"]
volumes:
- name: site
configMap:
name: site
- name: config
configMap:
name: config
- name: telnet
configMap:
name: telnet
- name: tmp
emptyDir: {}