all repos — infra @ da1bed0778a22c587e6c2fb54596b1825328ccd8

infrastructure manifests and setup notes

apps: use garage for files
Anirudh Oppiliappan x@icyphox.sh
Tue, 09 Jul 2024 23:20:53 +0300
commit

da1bed0778a22c587e6c2fb54596b1825328ccd8

parent

a14f6c932906e5b9007c071a4b07ed9edc32a023

5 files changed, 10 insertions(+), 109 deletions(-)

jump to
M apps/coredns/coredns.yamlapps/coredns/coredns.yaml

@@ -8,6 +8,7 @@

rewrite name dav.koti.lan radicale.default.svc.koti.lan rewrite name rss.koti.lan yarr.default.svc.koti.lan rewrite name g.koti.lan grafana.monitoring.svc.koti.lan + rewrite name files.garage.koti.lan garage.default.svc.koti.lan } kind: ConfigMap metadata:
M apps/imaginary/imaginary.yamlapps/imaginary/imaginary.yaml

@@ -19,10 +19,6 @@ containers:

- name: imaginary image: h2non/imaginary:latest imagePullPolicy: IfNotPresent - volumeMounts: - - name: film - mountPath: /film - readOnly: false ports: - name: http containerPort: 9000

@@ -31,14 +27,11 @@ - name: DEBUG

value: "*" command: ["imaginary"] args: - - -mount - - /film - -a - 0.0.0.0 - volumes: - - name: film - hostPath: - path: /var/lib/uploads/film + - -enable-url-source + - -allowed-origins + - http://files.garage.koti.lan/ --- apiVersion: v1 kind: Service
M apps/site/site.yamlapps/site/site.yaml

@@ -15,9 +15,9 @@ - path: /

pathType: Prefix backend: service: - name: site + name: garage port: - number: 8080 + number: 80 --- apiVersion: networking.k8s.io/v1 kind: Ingress

@@ -34,100 +34,7 @@ - path: /

pathType: Prefix backend: service: - name: site + name: garage port: - number: 8080 - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: site - labels: - app: site -spec: - selector: - matchLabels: - app: site - template: - metadata: - labels: - app: site - spec: - nodeSelector: - kubernetes.io/hostname: sini - containers: - - name: site - image: nginx:latest - imagePullPolicy: IfNotPresent - volumeMounts: - - name: site - mountPath: /www - readOnly: false - - name: nginx-config - mountPath: /etc/nginx/nginx.conf - subPath: nginx.conf - ports: - - containerPort: 80 - volumes: - - name: site - hostPath: - path: /var/www - - name: nginx-config - configMap: - name: site-nginx ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: site-nginx -data: - nginx.conf: | - user nginx; - worker_processes 1; - - error_log /var/log/nginx/error.log warn; - pid /var/run/nginx.pid; - - events { - worker_connections 1024; - } - - http { - include /etc/nginx/mime.types; - default_type application/octet-stream; - - log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; - - access_log /var/log/nginx/access.log main; - sendfile on; - - keepalive_timeout 65; - - gzip on; - - server { - listen 80; - server_name _; - - location / { - root /www; - index index.html index.htm; - } - } - } ---- -apiVersion: v1 -kind: Service -metadata: - name: site -spec: - selector: - app: site - ports: - - name: site-http - port: 8080 - targetPort: 80 + number: 80
M flake.nixflake.nix

@@ -49,6 +49,7 @@ kubectl

kubectx kubernetes-helm go + awscli2 ]; }; });
M readmereadme

@@ -29,9 +29,8 @@ APPLICATIONS

• radicale: CardDAV/CalDAV server (dav.koti.lan) • yarr: RSS reader (rss.koti.lan) -• fsrv: file host service (x.icyphox.sh) -• site: my personal website (icyphox.sh, anirudh.fi) • legit: git web frontend (git.icyphox.sh) • imaginary: image manipuation service (x.icyphox.sh, cdn.icyphox.sh) • pixelfed: private image hosting • honk: ActivityPub server (h.icyphox.sh) +• garage: object storage service for website and files (icyphox.sh, x.icyphox.sh)