Files
docs/deploy/deployment.yaml
T
jeffryandClaude Opus 5 972717e561 deploy: nginx and git-sync, no image built
Serves loom.hypertheory-labs.dev from the site branch, which holds dist/ and
nothing else. Two public images; git-sync polls the branch and nginx serves the
volume, so publishing a new version is a push and there is no rollout.

This sidesteps the cluster's open gap on publishing container images rather than
closing it. The first workload that genuinely needs an image we built still hits
it, and nothing here is evidence the gap is smaller than it looked.

The HTTPRoute carries no hostname of its own, per public-access.md: it pins to
the loom listener by sectionName and inherits. A route with its own hostnames
stops inheriting and stops being portable between staging and production.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-08 10:20:59 -04:00

68 lines
2.2 KiB
YAML

# The site is served from a git branch, not from an image we built.
#
# git-sync clones the `site` branch of loom/docs into a shared emptyDir and
# polls it; nginx serves whatever is there. Both images are public, which is
# what lets this deploy while the cluster's container-registry gap is open.
#
# Anonymous clone: loom/docs is a public repository. Nothing here holds a
# credential, and a private repository would need one — which is the same
# unanswered question the registry gap names.
apiVersion: apps/v1
kind: Deployment
metadata:
name: docs
namespace: loom
spec:
replicas: 1
selector:
matchLabels: { app: docs }
template:
metadata:
labels: { app: docs }
spec:
securityContext:
fsGroup: 65533
volumes:
- name: site
emptyDir: {}
- name: nginx-conf
configMap: { name: docs-nginx }
initContainers:
# --one-time, so the pod is not Ready until the site is actually on
# disk. Without this nginx serves 404s for the first few seconds after
# every reschedule.
- name: git-sync-init
image: registry.k8s.io/git-sync/git-sync:v4.4.0
args:
- --repo=https://git.hypertheory-labs.dev/loom/docs.git
- --ref=site
- --root=/site
- --link=current
- --one-time
volumeMounts:
- { name: site, mountPath: /site }
containers:
- name: git-sync
image: registry.k8s.io/git-sync/git-sync:v4.4.0
args:
- --repo=https://git.hypertheory-labs.dev/loom/docs.git
- --ref=site
- --root=/site
- --link=current
- --period=60s
volumeMounts:
- { name: site, mountPath: /site }
- name: nginx
image: nginx:1.29-alpine
ports:
- { containerPort: 8080, name: http }
volumeMounts:
- { name: site, mountPath: /site, readOnly: true }
- { name: nginx-conf, mountPath: /etc/nginx/conf.d }
readinessProbe:
httpGet: { path: /, port: http }
initialDelaySeconds: 2
resources:
requests: { cpu: 10m, memory: 32Mi }
limits: { memory: 128Mi }