Skip to content

Commit bf95c48

Browse files
committed
feat(manifest): serve the docs with auxesia
Add a kustomization in manifest/docs that serves docs/ at objgit.auxesia.automuse.art. An init container clones main with git-sync once. Auxesia then serves the docs folder from that clone. A ConfigMap volume does not work, because Kubernetes builds it from symbolic links and Auxesia rejects them. A git-sync sidecar does not work either: Auxesia resolves its root once at startup, so it keeps the old files after git-sync moves its link. To publish new docs, restart the deployment. Assisted-by: Claude Opus 5.5 via Claude Code Signed-off-by: Xe Iaso <xe@tigrisdata.com>
1 parent 3d05d61 commit bf95c48

4 files changed

Lines changed: 149 additions & 0 deletions

File tree

‎manifest/docs/deployment.yaml‎

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: objgit-docs
5+
labels:
6+
app.kubernetes.io/name: objgit-docs
7+
spec:
8+
replicas: 1
9+
selector:
10+
matchLabels:
11+
app.kubernetes.io/name: objgit-docs
12+
template:
13+
metadata:
14+
labels:
15+
app.kubernetes.io/name: objgit-docs
16+
spec:
17+
runtimeClassName: kata
18+
securityContext:
19+
fsGroup: 65532
20+
# Auxesia refuses symbolic links, so a ConfigMap volume cannot hold the
21+
# docs. Auxesia also resolves its root once at startup, so a git-sync
22+
# sidecar that swaps the root link would leave it serving stale files.
23+
# Clone once, before the server starts.
24+
initContainers:
25+
- name: clone
26+
image: registry.k8s.io/git-sync/git-sync:v4.4.0
27+
args:
28+
- --repo=https://github.com/tigrisdata/objgit
29+
- --ref=main
30+
- --depth=1
31+
- --root=/git
32+
- --link=objgit
33+
- --one-time
34+
resources:
35+
limits:
36+
cpu: "500m"
37+
memory: "256Mi"
38+
requests:
39+
cpu: "100m"
40+
memory: "64Mi"
41+
volumeMounts:
42+
- name: git
43+
mountPath: /git
44+
- name: tmp
45+
mountPath: /tmp
46+
securityContext:
47+
runAsUser: 65533
48+
runAsGroup: 65533
49+
runAsNonRoot: true
50+
allowPrivilegeEscalation: false
51+
capabilities:
52+
drop:
53+
- ALL
54+
seccompProfile:
55+
type: RuntimeDefault
56+
containers:
57+
- name: main
58+
image: ghcr.io/tigrisdata/auxesia:latest
59+
imagePullPolicy: "Always"
60+
args:
61+
- /git/objgit/docs
62+
- --listen
63+
- 0.0.0.0:8080
64+
ports:
65+
- name: http
66+
containerPort: 8080
67+
readinessProbe:
68+
httpGet:
69+
path: /llms.txt
70+
port: http
71+
resources:
72+
limits:
73+
cpu: "500m"
74+
memory: "256Mi"
75+
requests:
76+
cpu: "250m"
77+
memory: "128Mi"
78+
volumeMounts:
79+
- name: git
80+
mountPath: /git
81+
readOnly: true
82+
securityContext:
83+
runAsUser: 65532
84+
runAsGroup: 65532
85+
runAsNonRoot: true
86+
readOnlyRootFilesystem: true
87+
allowPrivilegeEscalation: false
88+
capabilities:
89+
drop:
90+
- ALL
91+
seccompProfile:
92+
type: RuntimeDefault
93+
volumes:
94+
- name: git
95+
emptyDir: {}
96+
- name: tmp
97+
emptyDir: {}

‎manifest/docs/ingress.yaml‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
apiVersion: networking.k8s.io/v1
2+
kind: Ingress
3+
metadata:
4+
name: objgit-docs
5+
labels:
6+
app.kubernetes.io/name: objgit-docs
7+
annotations:
8+
cert-manager.io/cluster-issuer: "letsencrypt-prod"
9+
spec:
10+
ingressClassName: nginx
11+
tls:
12+
- hosts:
13+
- objgit.auxesia.automuse.art
14+
secretName: objgit-docs-public-tls
15+
rules:
16+
- host: objgit.auxesia.automuse.art
17+
http:
18+
paths:
19+
- pathType: Prefix
20+
path: "/"
21+
backend:
22+
service:
23+
name: objgit-docs
24+
port:
25+
name: http

‎manifest/docs/kustomization.yaml‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Serves the docs/ folder of this repository with Auxesia at
2+
# https://objgit.auxesia.automuse.art.
3+
#
4+
# kubectl apply -k manifest/docs/
5+
#
6+
# An init container clones main from GitHub at pod start. To publish new
7+
# docs, restart the deployment:
8+
#
9+
# kubectl rollout restart deployment/objgit-docs
10+
resources:
11+
- deployment.yaml
12+
- service.yaml
13+
- ingress.yaml

‎manifest/docs/service.yaml‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: objgit-docs
5+
labels:
6+
app.kubernetes.io/name: objgit-docs
7+
spec:
8+
selector:
9+
app.kubernetes.io/name: objgit-docs
10+
ports:
11+
- port: 80
12+
targetPort: 8080
13+
name: http
14+
type: ClusterIP

0 commit comments

Comments
 (0)