Compare commits

..

No commits in common. "main" and "nightowl" have entirely different histories.

31 changed files with 656 additions and 762 deletions

3
.gitignore vendored
View File

@ -1,7 +1,4 @@
pvs/ pvs/
*.sql *.sql
*.sql.gz
*.tar.gz *.tar.gz
*.secret.yaml
ntwl.sublime-workspace

View File

@ -9,9 +9,12 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
## Style Guidelines ## Style Guidelines
1. YAML Formatting: 1. YAML Formatting:
- Use 4-space indentation - Use 2-space indentation
- Use snake_case for keys
- Keep line length under 100 characters
2. Kubernetes Resources: 2. Kubernetes Resources:
- Include resource limits/requests in all deployments
- Add appropriate labels and annotations - Add appropriate labels and annotations
- Group related resources in the same file - Group related resources in the same file
- Use namespaces to organize resources by service - Use namespaces to organize resources by service

View File

@ -4,7 +4,6 @@
### Media ### Media
[ ] move strix gmail to mnml
[ ] sabnzbd ini config map [ ] sabnzbd ini config map
[ ] tdarr [ ] tdarr
[ ] subtitle extractor [ ] subtitle extractor

View File

@ -1,67 +1,88 @@
# --- ---
# kind: PersistentVolumeClaim apiVersion: v1
# apiVersion: v1 kind: PersistentVolume
# metadata: metadata:
# name: crates-postgres-backup-pvc name: crates-postgres-backup-pv
# spec: spec:
# volumeName: crates-postgres-backup-pv storageClassName: ""
# accessModes: capacity:
# - ReadWriteOnce storage: 1Gi
# resources: accessModes:
# requests: - ReadWriteOnce
# storage: 1Gi persistentVolumeReclaimPolicy: Retain
claimRef:
namespace: default
name: crates-postgres-backup-pvc
hostPath:
# Into homedir so we can scp it ez
path: "/home/ntr/archives/crates-postgres"
type: DirectoryOrCreate
# --- ---
# apiVersion: batch/v1 kind: PersistentVolumeClaim
# kind: CronJob apiVersion: v1
# metadata: metadata:
# name: crates-db-backup name: crates-postgres-backup-pvc
# spec: spec:
# schedule: "20 4 * * *" volumeName: crates-postgres-backup-pv
# jobTemplate: accessModes:
# spec: - ReadWriteOnce
# template: resources:
# metadata: requests:
# labels: storage: 1Gi
# app: crates-postgres-backup
# spec:
# restartPolicy: Never
# containers:
# - name: crates-postgres-backup
# image: postgres:16
# command:
# - "/bin/sh"
# - "-c"
# -
# |
# cd /mnt/dest/
# TZ="Australia/Melbourne"
# TIMESTAMP=$(date '+%Y-%m-%d-%H-%M-%S')
# DEST=crates-$TIMESTAMP.sql.gz
# echo "Backing up to $DEST" ---
# pg_dump --dbname=$POSTGRES_URL | gzip > $DEST
# echo "Backup Complete"
# echo "Removing old copies..." apiVersion: batch/v1
# find . -type f -name "*.sql.gz" -mtime 7 | xargs rm -v kind: CronJob
metadata:
name: crates-db-backup
spec:
schedule: "20 4 * * *"
jobTemplate:
spec:
template:
metadata:
labels:
app: crates-postgres-backup
spec:
restartPolicy: Never
containers:
- name: crates-postgres-backup
image: postgres:16
command:
- "/bin/sh"
- "-c"
-
|
cd /mnt/dest/
TZ="Australia/Melbourne"
TIMESTAMP=$(date '+%Y-%m-%d-%H-%M-%S')
DEST=crates-$TIMESTAMP.sql.gz
# echo "Setting latest link..." echo "Backing up to $DEST"
# ln -nfs $DEST latest.sql.gz pg_dump --dbname=$POSTGRES_URL | gzip > $DEST
# env: echo "Backup Complete"
# - name: POSTGRES_URL
# valueFrom:
# secretKeyRef:
# name: crates
# key: POSTGRES_URL
# volumeMounts:
# - name: crates-postgres-backup-storage
# mountPath: /mnt/dest
# volumes:
# - name: crates-postgres-backup-storage
# persistentVolumeClaim:
# claimName: crates-postgres-backup-pvc
# --- echo "Removing old copies..."
find . -type f -name "*.sql.gz" -mtime 7 | xargs rm -v
echo "Setting latest link..."
ln -nfs $DEST latest.sql.gz
env:
- name: POSTGRES_URL
valueFrom:
secretKeyRef:
name: crates
key: POSTGRES_URL
volumeMounts:
- name: crates-postgres-backup-storage
mountPath: /mnt/dest
volumes:
- name: crates-postgres-backup-storage
persistentVolumeClaim:
claimName: crates-postgres-backup-pvc
---

View File

@ -7,7 +7,6 @@
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress
metadata: metadata:
namespace: crates
name: crates-client name: crates-client
annotations: annotations:
cert-manager.io/cluster-issuer: "letsencrypt-prod" cert-manager.io/cluster-issuer: "letsencrypt-prod"
@ -15,9 +14,19 @@ spec:
ingressClassName: haproxy ingressClassName: haproxy
tls: tls:
- hosts: - hosts:
- crates.ntwl.xyz - crates.strix.systems
secretName: crates-ntwl-xyz-tls secretName: crates-strix-systems-tls
rules: rules:
- host: crates.strix.systems
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: crates-client
port:
number: 8080
- host: crates.ntwl.xyz - host: crates.ntwl.xyz
http: http:
paths: paths:
@ -34,18 +43,28 @@ spec:
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress
metadata: metadata:
name: crates-api
namespace: crates
annotations: annotations:
cert-manager.io/cluster-issuer: "letsencrypt-prod" cert-manager.io/cluster-issuer: "letsencrypt-prod"
haproxy.org/path-rewrite: "/api(/)?(.*) /$2" haproxy.org/path-rewrite: "/api(/)?(.*) /$2"
name: crates-api
namespace: default
spec: spec:
ingressClassName: haproxy ingressClassName: haproxy
tls: tls:
- hosts: - hosts:
- crates.ntwl.xyz - crates.strix.systems
secretName: crates-ntwl-xyz-tls secretName: crates-strix-systems-tls
rules: rules:
- host: crates.strix.systems
http:
paths:
- path: /api(/|$)(.*)
pathType: ImplementationSpecific
backend:
service:
name: crates-api
port:
number: 41337
- host: crates.ntwl.xyz - host: crates.ntwl.xyz
http: http:
paths: paths:

View File

@ -1,37 +1,35 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: crates
# ----------------------------------------------------------------------- # -----------------------------------------------------------------------
# VOLUMES # VOLUMES
# ----------------------------------------------------------------------- # -----------------------------------------------------------------------
--- ---
kind: PersistentVolumeClaim
apiVersion: v1 apiVersion: v1
kind: PersistentVolume
metadata: metadata:
name: crates-postgres-data name: crates-postgres-pv
namespace: crates
spec: spec:
storageClassName: zfs-fast storageClassName: ""
capacity:
storage: 1Gi
accessModes: accessModes:
- ReadWriteOnce - ReadWriteOnce
resources: persistentVolumeReclaimPolicy: Retain
requests: claimRef:
storage: 2Gi namespace: default
name: crates-postgres-pvc
hostPath:
path: "/var/lib/rancher/k3s/storage/crates-postgres-pv"
type: DirectoryOrCreate
--- ---
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
apiVersion: v1 apiVersion: v1
metadata: metadata:
name: crates-postgres-bootstrap name: crates-postgres-pvc
namespace: crates
spec: spec:
volumeName: crates-postgres-pv
accessModes: accessModes:
- ReadWriteOnce - ReadWriteOnce
resources: resources:
@ -48,7 +46,6 @@ apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: crates-postgres name: crates-postgres
namespace: crates
spec: spec:
replicas: 1 replicas: 1
selector: selector:
@ -83,23 +80,17 @@ spec:
volumeMounts: volumeMounts:
- name: crates-postgres-storage - name: crates-postgres-storage
mountPath: /var/lib/postgresql/data mountPath: /var/lib/postgresql/data
- name: crates-postgres-bootstrap
mountPath: /docker-entrypoint-initdb.d
volumes: volumes:
- name: crates-postgres-storage - name: crates-postgres-storage
persistentVolumeClaim: persistentVolumeClaim:
claimName: crates-postgres-data claimName: crates-postgres-pvc
- name: crates-postgres-bootstrap
persistentVolumeClaim:
claimName: crates-postgres-bootstrap
--- ---
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
namespace: crates
name: crates-api name: crates-api
spec: spec:
replicas: 1 replicas: 1
@ -113,7 +104,7 @@ spec:
spec: spec:
containers: containers:
- name: crates-api - name: crates-api
image: registry.ntwl.xyz/crates-api image: registry.strix.systems/crates-api
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:
- containerPort: 80 - containerPort: 80
@ -142,32 +133,38 @@ spec:
--- ---
apiVersion: v1 apiVersion: apps/v1
kind: Pod kind: Deployment
metadata: metadata:
namespace: crates
name: crates-migrate name: crates-migrate
spec: spec:
restartPolicy: OnFailure replicas: 1
containers: selector:
- name: crates-migrate matchLabels:
image: registry.ntwl.xyz/crates-api app: crates-migrate
imagePullPolicy: IfNotPresent template:
command: ["npx"] metadata:
args: ["prisma", "migrate", "deploy"] labels:
env: app: crates-migrate
- name: DATABASE_URL spec:
valueFrom: containers:
secretKeyRef: - name: crates-migrate
name: crates image: registry.strix.systems/crates-api
key: DATABASE_URL imagePullPolicy: IfNotPresent
command: ["npx"]
args: ["prisma", "migrate", "deploy"]
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: crates
key: DATABASE_URL
--- ---
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
namespace: crates
name: crates-client name: crates-client
spec: spec:
replicas: 1 replicas: 1
@ -181,7 +178,7 @@ spec:
spec: spec:
containers: containers:
- name: crates-client - name: crates-client
image: registry.ntwl.xyz/crates-client image: registry.strix.systems/crates-client
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:
- containerPort: 8080 - containerPort: 8080
@ -195,7 +192,6 @@ spec:
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
namespace: crates
name: crates-api name: crates-api
spec: spec:
selector: selector:
@ -208,7 +204,6 @@ spec:
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
namespace: crates
name: crates-postgres name: crates-postgres
spec: spec:
selector: selector:
@ -221,7 +216,6 @@ spec:
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
namespace: crates
name: crates-client name: crates-client
spec: spec:
selector: selector:

View File

@ -33,10 +33,6 @@ spec:
value: '1000' value: '1000'
- name: UMASK - name: UMASK
value: '002' value: '002'
- name: NVIDIA_VISIBLE_DEVICES
value: all
- name: NVIDIA_DRIVER_CAPABILITIES
value: all
ports: ports:
- containerPort: 8096 - containerPort: 8096
protocol: TCP protocol: TCP

View File

@ -8,7 +8,6 @@ apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: memestream-client name: memestream-client
namespace: memestream
spec: spec:
replicas: 1 replicas: 1
selector: selector:
@ -21,7 +20,7 @@ spec:
spec: spec:
containers: containers:
- name: memestream-client - name: memestream-client
image: registry.ntwl.xyz/memestream-client image: registry.strix.systems/memestream-client
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:
- containerPort: 8080 - containerPort: 8080
@ -38,7 +37,6 @@ apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: memestream-client name: memestream-client
namespace: memestream
spec: spec:
selector: selector:
app: memestream-client app: memestream-client

View File

@ -1,23 +1,29 @@
---
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress
metadata: metadata:
name: memestream name: memestream-client
namespace: memestream
annotations: annotations:
cert-manager.io/cluster-issuer: "letsencrypt-prod" cert-manager.io/cluster-issuer: "letsencrypt-prod"
spec: spec:
ingressClassName: haproxy ingressClassName: haproxy
tls: tls:
- secretName: memestream-ntwl-xyz-tls - hosts:
hosts: - memestream.strix.systems
- memestream.ntwl.xyz - search.memestream.strix.systems
- search.memestream.ntwl.xyz - memestream.ntwl.xyz
- storage.memestream.ntwl.xyz - search.memestream.ntwl.xyz
- minio.memestream.ntwl.xyz secretName: memestream-strix-systems-tls
rules: rules:
- host: search.memestream.strix.systems
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: memestream-meili
port:
number: 7700
- host: search.memestream.ntwl.xyz - host: search.memestream.ntwl.xyz
http: http:
paths: paths:
@ -28,7 +34,16 @@ spec:
name: memestream-meili name: memestream-meili
port: port:
number: 7700 number: 7700
- host: memestream.strix.systems
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: memestream-client
port:
number: 8080
- host: memestream.ntwl.xyz - host: memestream.ntwl.xyz
http: http:
paths: paths:
@ -39,25 +54,3 @@ spec:
name: memestream-client name: memestream-client
port: port:
number: 8080 number: 8080
- host: storage.memestream.ntwl.xyz
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: memestream-minio
port:
number: 9000
- host: minio.memestream.ntwl.xyz
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: memestream-minio
port:
number: 9090

View File

@ -1,115 +0,0 @@
# -----------------------------------------------------------------------
# VOLUMES
# -----------------------------------------------------------------------
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: memestream-minio-pvc
namespace: memestream
spec:
storageClassName: fast
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
---
# -----------------------------------------------------------------------
# DEPLOYMENTS
# -----------------------------------------------------------------------
apiVersion: apps/v1
kind: Deployment
metadata:
name: memestream-minio
namespace: memestream
spec:
replicas: 1
selector:
matchLabels:
app: minio
template:
metadata:
labels:
app: minio
spec:
containers:
- name: minio
image: docker.io/minio/minio:latest
command: ['minio']
args: ['server', '/data']
env:
- name: MINIO_PROMETHEUS_AUTH_TYPE
value: public
- name: MINIO_CONSOLE_ADDRESS
value: :9090
- name: MINIO_ROOT_USER
valueFrom:
secretKeyRef:
name: memestream-minio
key: MINIO_ROOT_USER
- name: MINIO_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: memestream-minio
key: MINIO_ROOT_PASSWORD
resources:
limits:
memory: "1Gi"
ports:
- name: console
containerPort: 9090
protocol: TCP
- name: api
containerPort: 9000
protocol: TCP
livenessProbe:
httpGet:
path: /minio/health/live
port: 9000
initialDelaySeconds: 120
periodSeconds: 20
readinessProbe:
httpGet:
path: /minio/health/ready
port: 9000
initialDelaySeconds: 10
periodSeconds: 20
successThreshold: 2
volumeMounts:
- mountPath: /data
name: memestream-minio-storage
volumes:
- name: memestream-minio-storage
persistentVolumeClaim:
claimName: memestream-minio-pvc
---
apiVersion: v1
kind: Service
metadata:
name: memestream-minio
namespace: memestream
labels:
app: minio
spec:
ports:
- name: api
port: 9000
protocol: TCP
targetPort: 9000
- name: console
port: 9090
protocol: TCP
targetPort: 9090
selector:
app: minio

View File

@ -1,23 +1,35 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: memestream
# ----------------------------------------------------------------------- # -----------------------------------------------------------------------
# VOLUMES # VOLUMES
# ----------------------------------------------------------------------- # -----------------------------------------------------------------------
--- ---
apiVersion: v1
kind: PersistentVolume
metadata:
name: memestream-postgres-pv
spec:
storageClassName: ""
capacity:
storage: 2Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
claimRef:
namespace: default
name: memestream-postgres-pvc
hostPath:
path: "/var/lib/rancher/k3s/storage/memestream-postgres-pv"
type: DirectoryOrCreate
---
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
apiVersion: v1 apiVersion: v1
metadata: metadata:
name: memestream-postgres-pvc name: memestream-postgres-pvc
namespace: memestream
spec: spec:
storageClassName: fast volumeName: memestream-postgres-pv
accessModes: accessModes:
- ReadWriteOnce - ReadWriteOnce
resources: resources:
@ -26,13 +38,32 @@ spec:
--- ---
apiVersion: v1
kind: PersistentVolume
metadata:
name: memestream-meili-pv
spec:
storageClassName: ""
capacity:
storage: 5Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
claimRef:
namespace: default
name: memestream-meili-pvc
hostPath:
path: "/var/lib/rancher/k3s/storage/memestream-meili-pv"
type: DirectoryOrCreate
---
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
apiVersion: v1 apiVersion: v1
metadata: metadata:
name: memestream-meili-pvc name: memestream-meili-pvc
namespace: memestream
spec: spec:
storageClassName: zfs-fast volumeName: memestream-meili-pv
accessModes: accessModes:
- ReadWriteOnce - ReadWriteOnce
resources: resources:
@ -49,7 +80,6 @@ apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: memestream-archiver name: memestream-archiver
namespace: memestream
spec: spec:
replicas: 1 replicas: 1
selector: selector:
@ -62,7 +92,7 @@ spec:
spec: spec:
containers: containers:
- name: memestream-archiver - name: memestream-archiver
image: registry.ntwl.xyz/memestream-archiver image: registry.strix.systems/memestream-archiver
imagePullPolicy: Always imagePullPolicy: Always
envFrom: envFrom:
- secretRef: - secretRef:
@ -74,7 +104,6 @@ apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: memestream-postgres name: memestream-postgres
namespace: memestream
spec: spec:
replicas: 1 replicas: 1
selector: selector:
@ -121,7 +150,6 @@ apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: memestream-meili name: memestream-meili
namespace: memestream
spec: spec:
replicas: 1 replicas: 1
selector: selector:
@ -148,8 +176,8 @@ spec:
mountPath: /meili_data mountPath: /meili_data
resources: resources:
limits: limits:
memory: "2Gi" memory: "1Gi"
cpu: "2000m" cpu: "1000m"
volumes: volumes:
- name: memestream-meili-storage - name: memestream-meili-storage
@ -167,7 +195,6 @@ apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: memestream-postgres name: memestream-postgres
namespace: memestream
spec: spec:
selector: selector:
app: memestream-postgres app: memestream-postgres
@ -180,7 +207,6 @@ apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: memestream-meili name: memestream-meili
namespace: memestream
spec: spec:
selector: selector:
app: memestream-meili app: memestream-meili

View File

@ -1,45 +1,84 @@
--- ---
# ----------------------------------------------------------------------- # -----------------------------------------------------------------------
# COMBINED INGRESS # INGRESS
# ----------------------------------------------------------------------- # -----------------------------------------------------------------------
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress
metadata: metadata:
name: mnml name: mnml-client
namespace: mnml annotations:
annotations: cert-manager.io/cluster-issuer: "letsencrypt-prod"
cert-manager.io/cluster-issuer: "letsencrypt-prod"
haproxy.org/websocket-support: "true"
haproxy.org/timeout-tunnel: "3600s"
spec: spec:
ingressClassName: haproxy ingressClassName: haproxy
tls: tls:
- hosts: - hosts:
- mnml.gg - mnml.gg
secretName: mnml-tls secretName: mnml-tls
rules: rules:
- host: mnml.gg - host: mnml.gg
http: http:
paths: paths:
- path: / - path: /
pathType: Prefix pathType: Prefix
backend: backend:
service: service:
name: mnml-client name: mnml-client
port: port:
number: 8080 number: 8080
- path: /api
pathType: Prefix ---
backend:
service: apiVersion: networking.k8s.io/v1
name: mnml-api kind: Ingress
port: metadata:
number: 40000 name: mnml-api
- path: /api/ws namespace: default
pathType: Exact annotations:
backend: cert-manager.io/cluster-issuer: "letsencrypt-prod"
service: haproxy.org/websocket-support: "true"
name: mnml-ws spec:
port: ingressClassName: haproxy
number: 40055 tls:
- hosts:
- mnml.gg
secretName: mnml-tls
rules:
- host: mnml.gg
http:
paths:
- path: /api
pathType: Prefix
backend:
service:
name: mnml-api
port:
number: 40000
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: mnml-ws
annotations:
cert-manager.io/cluster-issuer: "letsencrypt-prod"
haproxy.org/websocket-support: "true"
haproxy.org/timeout-tunnel: "3600s"
spec:
ingressClassName: haproxy
tls:
- hosts:
- mnml.gg
secretName: mnml-tls
rules:
- host: mnml.gg
http:
paths:
- path: /api/ws
pathType: Exact
backend:
service:
name: mnml-ws
port:
number: 40055

View File

@ -1,24 +1,35 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: mnml
# ----------------------------------------------------------------------- # -----------------------------------------------------------------------
# VOLUMES # VOLUMES
# ----------------------------------------------------------------------- # -----------------------------------------------------------------------
--- ---
apiVersion: v1
kind: PersistentVolume
metadata:
name: mnml-postgres-pv
spec:
storageClassName: local-path
capacity:
storage: 1Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
claimRef:
namespace: default
name: mnml-postgres-pvc
hostPath:
path: "/var/lib/rancher/k3s/storage/mnml-postgres-pv"
type: DirectoryOrCreate
---
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
apiVersion: v1 apiVersion: v1
metadata: metadata:
namespace: mnml
name: mnml-postgres-pvc name: mnml-postgres-pvc
spec: spec:
storageClassName: fast volumeName: mnml-postgres-pv
accessModes: accessModes:
- ReadWriteOnce - ReadWriteOnce
resources: resources:
@ -27,19 +38,38 @@ spec:
--- ---
apiVersion: v1
kind: PersistentVolume
metadata:
name: mnml-imgs-pv
spec:
storageClassName: local-path
capacity:
storage: 1Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
claimRef:
namespace: default
name: mnml-imgs-pvc
hostPath:
path: "/var/lib/rancher/k3s/storage/mnml-imgs-pv"
type: DirectoryOrCreate
---
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
apiVersion: v1 apiVersion: v1
metadata: metadata:
namespace: mnml
name: mnml-imgs-pvc name: mnml-imgs-pvc
spec: spec:
storageClassName: fast volumeName: mnml-imgs-pv
accessModes: accessModes:
- ReadWriteOnce - ReadWriteOnce
resources: resources:
requests: requests:
storage: 2Gi storage: 1Gi
--- ---
@ -50,9 +80,7 @@ spec:
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
namespace: mnml
name: mnml-postgres name: mnml-postgres
spec: spec:
replicas: 1 replicas: 1
@ -66,7 +94,7 @@ spec:
spec: spec:
containers: containers:
- name: postgres - name: postgres
image: postgres:16 image: postgres:latest
ports: ports:
- containerPort: 5432 - containerPort: 5432
env: env:
@ -98,9 +126,7 @@ spec:
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
namespace: mnml
name: mnml-api name: mnml-api
spec: spec:
replicas: 1 replicas: 1
@ -114,7 +140,7 @@ spec:
spec: spec:
containers: containers:
- name: mnml-api - name: mnml-api
image: registry.ntwl.xyz/mnml-api image: registry.strix.systems/mnml-api
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
ports: ports:
- containerPort: 40000 - containerPort: 40000
@ -165,9 +191,7 @@ spec:
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
namespace: mnml
name: mnml-client name: mnml-client
spec: spec:
replicas: 1 replicas: 1
@ -181,7 +205,7 @@ spec:
spec: spec:
containers: containers:
- name: mnml-client - name: mnml-client
image: registry.ntwl.xyz/mnml-client image: registry.strix.systems/mnml-client
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
ports: ports:
- containerPort: 8080 - containerPort: 8080
@ -201,9 +225,7 @@ spec:
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
namespace: mnml
name: mnml-api name: mnml-api
spec: spec:
selector: selector:
@ -216,9 +238,7 @@ spec:
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
namespace: mnml
name: mnml-ws name: mnml-ws
spec: spec:
selector: selector:
@ -231,9 +251,7 @@ spec:
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
namespace: mnml
name: mnml-postgres name: mnml-postgres
spec: spec:
selector: selector:
@ -245,9 +263,7 @@ spec:
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
namespace: mnml
name: mnml-client name: mnml-client
spec: spec:
selector: selector:

View File

@ -1,12 +0,0 @@
---
apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:
name: lgtm
namespace: monitor
spec:
repo: https://grafana.github.io/helm-charts
chart: lgtm-distributed
targetNamespace: monitor
# valuesContent: |-

View File

@ -1,6 +0,0 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: monitor

View File

@ -1,168 +1,168 @@
# --- ---
# # ----------------------------------------------------------------------- # -----------------------------------------------------------------------
# # DEPLOYMENTS # DEPLOYMENTS
# # ----------------------------------------------------------------------- # -----------------------------------------------------------------------
# apiVersion: apps/v1 apiVersion: apps/v1
# kind: Deployment kind: Deployment
# metadata: metadata:
# name: pihole name: pihole
# namespace: networking namespace: networking
# spec: spec:
# replicas: 1 replicas: 1
# selector: selector:
# matchLabels: matchLabels:
# app: pihole app: pihole
# template: template:
# metadata: metadata:
# labels: labels:
# app: pihole app: pihole
# spec: spec:
# containers: containers:
# - name: pihole - name: pihole
# image: pihole/pihole:latest image: pihole/pihole:latest
# imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
# env: env:
# - name: TZ - name: TZ
# value: "Australia/Melbourne" value: "Australia/Melbourne"
# - name: FTLCONF_webserver_api_password - name: FTLCONF_webserver_api_password
# value: grepgrepgrep value: grepgrepgrep
# # allow it to respond to devices outside cluster # allow it to respond to devices outside cluster
# - name: FTLCONF_dns_listeningMode - name: FTLCONF_dns_listeningMode
# value: single value: single
# # resolve wildcards # resolve wildcards
# - name: FTLCONF_misc_dnsmasq_lines - name: FTLCONF_misc_dnsmasq_lines
# value: address=/nightowl.strix.systems/192.168.1.88 value: address=/nightowl.strix.systems/192.168.1.88
# ports: ports:
# - containerPort: 53 - containerPort: 53
# protocol: TCP protocol: TCP
# - containerPort: 53 - containerPort: 53
# protocol: UDP protocol: UDP
# - containerPort: 67 - containerPort: 67
# protocol: UDP protocol: UDP
# - containerPort: 80 - containerPort: 80
# protocol: TCP protocol: TCP
# - containerPort: 443 - containerPort: 443
# protocol: TCP protocol: TCP
# # volumeMounts: # volumeMounts:
# # - name: etc # - name: etc
# # mountPath: /etc/pihole # mountPath: /etc/pihole
# # - name: dnsmasq # - name: dnsmasq
# # mountPath: /etc/dnsmasq.d # mountPath: /etc/dnsmasq.d
# resources: resources:
# requests: requests:
# memory: 128Mi memory: 128Mi
# cpu: 100m cpu: 100m
# limits: limits:
# memory: 2Gi memory: 2Gi
# cpu: 1 cpu: 1
# # volumes: # volumes:
# # - name: etc # - name: etc
# # hostPath: # hostPath:
# # path: /data/pihole/etc # path: /data/pihole/etc
# # type: Directory # type: Directory
# # - name: dnsmasq # - name: dnsmasq
# # hostPath: # hostPath:
# # path: /data/pihole/dnsmasq.d # path: /data/pihole/dnsmasq.d
# # type: Directory # type: Directory
# # ----------------------------------------------------------------------- # -----------------------------------------------------------------------
# # SERVICES # SERVICES
# # ----------------------------------------------------------------------- # -----------------------------------------------------------------------
# --- ---
# kind: Service kind: Service
# apiVersion: v1 apiVersion: v1
# metadata: metadata:
# name: pihole name: pihole
# namespace: networking namespace: networking
# spec: spec:
# selector: selector:
# app: pihole app: pihole
# ports: ports:
# - name: web - name: web
# port: 80 port: 80
# targetPort: 80 targetPort: 80
# - name: dns-tcp - name: dns-tcp
# port: 53 port: 53
# targetPort: 53 targetPort: 53
# protocol: TCP protocol: TCP
# - name: dns-udp - name: dns-udp
# port: 53 port: 53
# targetPort: 53 targetPort: 53
# protocol: UDP protocol: UDP
# --- ---
# apiVersion: v1 apiVersion: v1
# kind: Service kind: Service
# metadata: metadata:
# name: pihole-dns-udp name: pihole-dns-udp
# namespace: networking namespace: networking
# spec: spec:
# selector: selector:
# app: pihole app: pihole
# ports: ports:
# - name: dns-udp - name: dns-udp
# port: 53 port: 53
# protocol: UDP protocol: UDP
# externalTrafficPolicy: Local externalTrafficPolicy: Local
# type: LoadBalancer type: LoadBalancer
# --- ---
# apiVersion: v1 apiVersion: v1
# kind: Service kind: Service
# metadata: metadata:
# name: pihole-dns-tcp name: pihole-dns-tcp
# namespace: networking namespace: networking
# spec: spec:
# selector: selector:
# app: pihole app: pihole
# ports: ports:
# - name: dns-tcp - name: dns-tcp
# port: 53 port: 53
# protocol: TCP protocol: TCP
# externalTrafficPolicy: Local externalTrafficPolicy: Local
# type: LoadBalancer type: LoadBalancer
# --- ---
# apiVersion: v1 apiVersion: v1
# kind: Service kind: Service
# metadata: metadata:
# name: pihole-web-debug name: pihole-web-debug
# namespace: networking namespace: networking
# spec: spec:
# selector: selector:
# app: pihole app: pihole
# ports: ports:
# - name: dns-tcp - name: dns-tcp
# port: 9980 port: 9980
# targetPort: 80 targetPort: 80
# protocol: TCP protocol: TCP
# externalTrafficPolicy: Local externalTrafficPolicy: Local
# type: LoadBalancer type: LoadBalancer
# --- ---
# apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
# kind: Ingress kind: Ingress
# metadata: metadata:
# name: pihole name: pihole
# namespace: networking namespace: networking
# spec: spec:
# ingressClassName: haproxy ingressClassName: haproxy
# rules: rules:
# - host: "pihole.nightowl.strix.systems" - host: "pihole.nightowl.strix.systems"
# http: http:
# paths: paths:
# - path: / - path: /
# pathType: Prefix pathType: Prefix
# backend: backend:
# service: service:
# name: pihole name: pihole
# port: port:
# name: web name: web

View File

@ -4,17 +4,27 @@ apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress
metadata: metadata:
name: ntr-cv name: ntr-cv
namespace: ntr-cv
annotations: annotations:
cert-manager.io/cluster-issuer: "letsencrypt-prod" cert-manager.io/cluster-issuer: "letsencrypt-prod"
spec: spec:
ingressClassName: haproxy ingressClassName: haproxy
tls: tls:
- hosts: - hosts:
- ntwl.xyz - strix.systems
- ntr.ntwl.xyz
secretName: strix-systems-tls secretName: strix-systems-tls
rules: rules:
- host: ntwl.xyz - host: strix.systems
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: ntr-cv
port:
number: 8080
- host: ntr.ntwl.xyz
http: http:
paths: paths:
- path: / - path: /

View File

@ -1,12 +1,5 @@
--- ---
apiVersion: v1
kind: Namespace
metadata:
name: ntr-cv
---
# ----------------------------------------------------------------------- # -----------------------------------------------------------------------
# DEPLOYMENTS # DEPLOYMENTS
# ----------------------------------------------------------------------- # -----------------------------------------------------------------------
@ -15,7 +8,6 @@ apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: ntr-cv name: ntr-cv
namespace: ntr-cv
spec: spec:
replicas: 1 replicas: 1
selector: selector:
@ -28,7 +20,7 @@ spec:
spec: spec:
containers: containers:
- name: ntr-cv - name: ntr-cv
image: registry.ntwl.xyz/ntr-cv image: registry.strix.systems/ntr-cv
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:
- containerPort: 8080 - containerPort: 8080
@ -45,7 +37,6 @@ apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: ntr-cv name: ntr-cv
namespace: ntr-cv
spec: spec:
selector: selector:
app: ntr-cv app: ntr-cv

View File

@ -1,8 +0,0 @@
{
"folders":
[
{
"path": "."
}
]
}

30
ops/grafana.yaml Normal file
View File

@ -0,0 +1,30 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: grafana-pv
spec:
storageClassName: ""
capacity:
storage: 1Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
claimRef:
namespace: monitor
name: grafana-pvc
hostPath:
path: "/var/lib/rancher/k3s/storage/grafana-pv"
type: DirectoryOrCreate
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: grafana-pvc
namespace: monitor
spec:
volumeName: grafana-pv
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi

View File

@ -1,14 +0,0 @@
---
apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:
name: sealed-secrets
namespace: ops
spec:
repo: https://bitnami-labs.github.io/sealed-secrets
chart: sealed-secrets
version: 2.17.3
targetNamespace: kube-system
valuesContent: |-
fullnameOverride: sealed-secrets-controller

View File

@ -1,39 +0,0 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: storage
namespace: ops
labels:
app: minio
annotations:
cert-manager.io/cluster-issuer: "letsencrypt-prod"
haproxy.org/proxy-body-size-limit: "1g"
spec:
ingressClassName: haproxy
tls:
- hosts:
- minio.ntwl.xyz
- storage.ntwl.xyz
secretName: minio-tls
rules:
- host: minio.ntwl.xyz
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: minio
port:
number: 9090
- host: storage.ntwl.xyz
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: minio
port:
number: 9000

View File

@ -11,9 +11,20 @@ spec:
ingressClassName: haproxy ingressClassName: haproxy
tls: tls:
- hosts: - hosts:
- monitor.strix.systems
- monitor.ntwl.xyz - monitor.ntwl.xyz
secretName: monitor-strix-systems-tls secretName: monitor-strix-systems-tls
rules: rules:
- host: monitor.strix.systems
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: kube-prometheus-stack-grafana
port:
number: 80
- host: monitor.ntwl.xyz - host: monitor.ntwl.xyz
http: http:
paths: paths:

View File

@ -4,7 +4,6 @@ apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress
metadata: metadata:
name: registry name: registry
namespace: ops
annotations: annotations:
haproxy.org/proxy-body-size-limit: "2g" haproxy.org/proxy-body-size-limit: "2g"
cert-manager.io/cluster-issuer: "letsencrypt-prod" cert-manager.io/cluster-issuer: "letsencrypt-prod"
@ -12,6 +11,7 @@ spec:
ingressClassName: haproxy ingressClassName: haproxy
tls: tls:
- hosts: - hosts:
- registry.strix.systems
- registry.ntwl.xyz - registry.ntwl.xyz
secretName: registry-strix-systems-tls secretName: registry-strix-systems-tls
rules: rules:

20
ops/values.yaml Normal file
View File

@ -0,0 +1,20 @@
grafana:
persistence:
type: pvc
enabled: true
# annotations: {}
finalizers:
- kubernetes.io/pvc-protection
existingClaim: grafana-pvc
alertmanager:
enabled: false
loki:
auth_enabled: false
commonConfig:
replication_factor: 1
storage:
type: 'filesystem'
singleBinary:
replicas: 1

View File

@ -1,29 +0,0 @@
{
"kind": "SealedSecret",
"apiVersion": "bitnami.com/v1alpha1",
"metadata": {
"name": "couchdb-couchdb",
"namespace": "ops",
"creationTimestamp": null
},
"spec": {
"template": {
"metadata": {
"name": "couchdb-couchdb",
"namespace": "ops",
"creationTimestamp": null,
"labels": {
"app": "couchdb",
"service": "obsidian-livesync"
}
},
"type": "Opaque"
},
"encryptedData": {
"adminPassword": "AgAv+nUY0+WeMJ2Kz0DX9F2l3BvdRrtqbWIowaiIcbWOEjBh3CAFNj4YqUBcUSKn0RsTqYcStDuM1bHBdoWvUj+bfjuoZcYXlXck0QYoGH6PkVfP67GvTgAgQpD7D3D1Q/su16lVBQ671jIxjBi6J38Aiq7Iqkg70vqTE3fclxW6rD6uuPSuYcpaUEUr98/ZYwKgdOZdYLbPAtdwFY6iD2u7HmhZN8Io7N77ofd8GcVREjsOl/5f9y29OBEyAgRzb0glj10z4cdnR/fhVQeGMFKlFU/ld3lVMqncpmC+/hi2JiNYa31S8Uld4oJp/w74fkWBsV+1rsDIrch1uXjRmdpVfpZ5EYBew/t/5G6PtaTGvI9I00zlbrRflYeSMSe4qNIPP4B77LP78FjuHo+NCqLP5pvJ+e3jJJppy9fuhnoy+1rDo1wl/8l4YcQTL77idgvSwCYmaOXi4BApbebZBKwHdKVEnO+yEHEG9VomVcfSEo8NZeXT6aa8BlmTuQLDOZf1vEfGeYnKNz2t5m4uy5tYZ76i5NM37w2vLv+TU/mG9LbKzFBSJ+CHnnv+pmfoXSd1co7vS2vbi1CRkeB0t1RuB7i/YYtpPCtVTnk8s6eZ315pQkLR7M0/0yi2RyJiYB3UEvaZlDF4y8DstbKDWzqPslmLq5VumxMZEQDYvzPbsdYQaEiX90hDnMfKHt48rnO1htOC5NwaqKWWMWs6",
"adminUsername": "AgAe33Ip20GvP1XRkon2XNBwsfTa0YVVlH+jg8NqKKEkRy4Xa6+Nwzl3OAcTxCxrLECxx0OCafCZXTU/dxbaoTO8izrtOGcmlb0fxjucf/5vwJFjTuhdk4AehpUSYXqIw76ZkJLJcqFSHewv7BvbCBRwef7gR/xnpFWak2r2Hhi1po6AmRzhJlp/Z3ndLfpywl1Jnqfsz9H54R5lDz3BXUXxW5zYTS8jsXJS60Cp7oFuNO8UQoYYJ+a1C6kXIvqVuEf1NuFwfx6hjTfm56MjSLTKr7G8rIX4bEpGtjHcAiuNXGlk2of5Uw/PgaUvsIfymoz+tnIsLbHEBOK0v1MRBkvsOz1M/D9C+lu2XX0CrtOX3Ww2Z5L542V8SqL5QBR2PBf0J0IvaDSioh4mgdcHZUhvduUZJ3FLbxVptWMQvRKvhsiR6U5/XXXLIMIQDUQ4kDpgsb7rPYmeqbeJOxY0SZ5XO4OY+kreBP1pylza/mr+DuzSWxzDyDV+VM+XfwkzgeBW8hv9dfuWJnD6Z0T4cYOQ+4VGrTwK5K6hNV84aK+zXDlMiijdX5Gxe3oS7Vdl3pAKz40v/7YZ5UWBHHk+TAu5DKU7mAF6MvICwTFj4M0s85jnI/uUGjEZ0y0BlX9W6cZF5wusczTUyhDv1WvSPpNBv4Htk+NZq50Y/v8PPyQUspLEngfoVEBZUL2z6hLtneITFhI=",
"cookieAuthSecret": "AgCIstQYGlgIvZMgx0obHFxz+vpefo9f5ZSiBmdxOm3HiU7saVS2s2Yc1YYhXO4ANvOOz5aRBdTp9l53c735htcq5vIhc9kERsxSLyxsGKfaq7ZtYt8fcHn00cmGwJDfIBzG5u1mBPe+mp+WZaBjXFEbBdISD1cndom7x6JdEljdZ5v19+z3TuAhHo2/kWMK7mVucIn1vglo51SSSz2F1HfgxfdPo7mDPybJYkOV1DOe8xzRvOWcAV7DhPxdkjFlLejTSiwFixkSy8QtnD96gjQXXZfOJsxdaYOXn3QMqNHBOq7qwhdHtJ3ugKHlrlJyGtlYFNhh9+i/MaWCEXvRZmCdZqee7un6KCPlL3vhFR0ABvXqgAWtIHPDgrDihqPHBv+CHvJs8Tu5d2ryKWTUkndMwTs+7BaZFS8KfIUtMrxec7+McEO2SyJOMjMJkDZMzcIz+gfu/9/0LYQ9IGjQ4P4m+/ZxM+VyBQjIRM/TjwmF8pXdB0Zs7HBL3KrWHELoe25lMa0iYOkI0tmZKhR43yCO+NOt93c6LS/QrVcJHnK5aY3GqwG9sjB5MEmR4eycYMNU/EjlYhRHrIMZnRvPb9TF8tD55nc8Eulc9DYZ9uFOG+OFlNRr4XHRvy1cmzS6z8lHntlzGyCMO9lkWGPGHC81llKG9uYpHa/eg0askHa7yjYLU1DfxDPAlIvgOqOLLvODOpoyDqAds/HUxZTpeak=",
"erlangCookie": "AgCTickThp91F/3kKWGpsYTKnGKrG7LWN9dbF1vL/gN/4nZ6thW28bQNNSdfKOYLp05U9oRvso4ja3dOpGBGmCS5NnSQY8UA2lGJuGloi49rgeuc34XW/+99RnCG2pwvjLJGhUJ3Zprb5J2Ky6CH4vUVd5Q0/zjGM5MEpaSxqkHriZj33gNy1cink/ZlkSMLpDGktjjHV4k7QHocT06Cu1Gg/ixrF3C2k8kQ9evoJTsOGAXH94E+vdtq/YvH0Be+AKCMc5MldROBEx69qI6uVKh9aM6YKPNfsgoh9A76ialeCYfYxPV/0oSx7YH86tg1yQ3V1Law3Y02tPjfyTsScuLnGbfoDXdcaShyfxxIaUtbEagohpofEZj6xQfO18wwpObZVVny72T9PEt5z5Fbkvv/wHGi0G9BZJ/E6/0T2Onap4WsJlC8I9CwzmcZMhBuECheRxxJ5z20k4bVq99e/iX5Ays90yZeHoJJwVC0e5zxwvdMZ775OSR9I2ibuKZx8UGLw/ZLrFNjdHvt3yAVKNAsdvOg1g7l0zS0i2CW46PcoUaqeFyX5NVda6upc0bEvVDCQV8TKzAv3Kk+rdaIbUM6ovDaClH80oY6lBpVSdGDtJ7Tf5sn5d/jwnm3TJtFyt5B1YXboQL9KWCdYgsUAcWQp9DuCd57sR0BG7oGUuGXwvxLnhAdCe3JkZRrpi7YXr708PXno3dx8wH3K7+j1/zC"
}
}
}

View File

@ -1,62 +0,0 @@
---
apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:
name: couchdb
namespace: ops
labels:
app: couchdb
service: vlt
spec:
repo: https://apache.github.io/couchdb-helm
chart: couchdb
version: 4.6.1
targetNamespace: ops
valuesContent: |-
clusterSize: 1
createAdminSecret: false
couchdbConfig:
couchdb:
single_node: true
uuid: 1723f780-f9df-4efb-84dc2e5a691207d8
max_document_size: 50000000
max_http_request_size: 4294967296
chttpd:
require_valid_user: true
enable_cors: true
httpd:
enable_cors: true
WWW-Authenticate: "Basic realm=\"couchdb\""
cors:
origins: "*"
credentials: true
methods: "GET, PUT, POST, HEAD, DELETE"
headers: "accept, authorization, content-type, origin, referer, x-csrf-token"
persistentVolume:
enabled: true
storageClass: "zfs-fast"
size: 10Gi
service:
type: ClusterIP
port: 5984
ingress:
enabled: true
className: haproxy
hosts:
- vlt.ntwl.xyz
tls:
- hosts:
- vlt.ntwl.xyz
secretName: couchdb-tls
annotations:
cert-manager.io/cluster-issuer: "letsencrypt-prod"
haproxy.org/ssl-redirect: "true"
haproxy.org/proxy-body-size: "100m"
haproxy.org/timeout-client: "600s"
haproxy.org/timeout-server: "600s"

View File

@ -3,7 +3,6 @@ apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress
metadata: metadata:
name: spacerace-api name: spacerace-api
namespace: spacerace
annotations: annotations:
cert-manager.io/cluster-issuer: "letsencrypt-prod" cert-manager.io/cluster-issuer: "letsencrypt-prod"
haproxy.org/path-rewrite: "/api(/)?(.*) /$2" haproxy.org/path-rewrite: "/api(/)?(.*) /$2"
@ -11,10 +10,10 @@ spec:
ingressClassName: haproxy ingressClassName: haproxy
tls: tls:
- hosts: - hosts:
- spacerace.ntwl.xyz - spacerace.strix.systems
secretName: spacerace-ntwl-xyz-tls secretName: spacerace-strix-systems-tls
rules: rules:
- host: spacerace.ntwl.xyz - host: spacerace.strix.systems
http: http:
paths: paths:
- path: /api(/|$)(.*) - path: /api(/|$)(.*)

View File

@ -1,38 +1,35 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: spacerace
# ----------------------------------------------------------------------- # -----------------------------------------------------------------------
# VOLUMES # VOLUMES
# ----------------------------------------------------------------------- # -----------------------------------------------------------------------
--- ---
kind: PersistentVolumeClaim
apiVersion: v1 apiVersion: v1
kind: PersistentVolume
metadata: metadata:
name: spacerace-postgres-data name: spacerace-postgres-pv
namespace: spacerace
spec: spec:
storageClassName: zfs-fast storageClassName: ""
capacity:
storage: 1Gi
accessModes: accessModes:
- ReadWriteOnce - ReadWriteOnce
resources: persistentVolumeReclaimPolicy: Retain
requests: claimRef:
storage: 1Gi namespace: default
name: spacerace-postgres-pvc
hostPath:
path: "/var/lib/rancher/k3s/storage/spacerace-postgres-pv"
type: DirectoryOrCreate
--- ---
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
apiVersion: v1 apiVersion: v1
metadata: metadata:
name: spacerace-postgres-bootstrap name: spacerace-postgres-pvc
namespace: spacerace
spec: spec:
volumeName: spacerace-postgres-pv
accessModes: accessModes:
- ReadWriteOnce - ReadWriteOnce
resources: resources:
@ -49,7 +46,6 @@ apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: spacerace-postgres name: spacerace-postgres
namespace: spacerace
spec: spec:
replicas: 1 replicas: 1
selector: selector:
@ -84,46 +80,40 @@ spec:
volumeMounts: volumeMounts:
- name: spacerace-postgres-storage - name: spacerace-postgres-storage
mountPath: /var/lib/postgresql/data mountPath: /var/lib/postgresql/data
- name: spacerace-postgres-bootstrap
mountPath: /docker-entrypoint-initdb.d
volumes: volumes:
- name: spacerace-postgres-storage - name: spacerace-postgres-storage
persistentVolumeClaim: persistentVolumeClaim:
claimName: spacerace-postgres-data claimName: spacerace-postgres-pvc
- name: spacerace-postgres-bootstrap
persistentVolumeClaim:
claimName: spacerace-postgres-bootstrap
--- ---
# apiVersion: apps/v1 apiVersion: apps/v1
# kind: Deployment kind: Deployment
# metadata: metadata:
# name: spacerace-api name: spacerace-api
# namespace: spacerace spec:
# spec: replicas: 1
# replicas: 1 selector:
# selector: matchLabels:
# matchLabels: app: spacerace-api
# app: spacerace-api template:
# template: metadata:
# metadata: labels:
# labels: app: spacerace-api
# app: spacerace-api spec:
# spec: containers:
# containers: - name: spacerace-api
# - name: spacerace-api image: registry.strix.systems/spacerace-api
# image: registry.ntwl.xyz/spacerace-api imagePullPolicy: IfNotPresent
# imagePullPolicy: IfNotPresent ports:
# ports: - containerPort: 80
# - containerPort: 80 env:
# env: - name: CONNECTIONSTRINGS__SPACERACE
# - name: CONNECTIONSTRINGS__SPACERACE valueFrom:
# valueFrom: secretKeyRef:
# secretKeyRef: name: spacerace
# name: spacerace key: CONNECTIONSTRINGS__SPACERACE
# key: CONNECTIONSTRINGS__SPACERACE
--- ---
# ----------------------------------------------------------------------- # -----------------------------------------------------------------------
@ -134,7 +124,6 @@ apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: spacerace-api name: spacerace-api
namespace: spacerace
spec: spec:
selector: selector:
app: spacerace-api app: spacerace-api
@ -146,7 +135,6 @@ spec:
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
namespace: spacerace
name: spacerace-postgres name: spacerace-postgres
spec: spec:
selector: selector:

View File

@ -10,6 +10,7 @@ spec:
ingressClassName: haproxy ingressClassName: haproxy
tls: tls:
- hosts: - hosts:
- minio.strix.systems
- minio.ntwl.xyz - minio.ntwl.xyz
secretName: minio.strix.systems secretName: minio.strix.systems
rules: rules:
@ -49,9 +50,20 @@ spec:
ingressClassName: haproxy ingressClassName: haproxy
tls: tls:
- hosts: - hosts:
- storage.strix.systems
- storage.ntwl.xyz - storage.ntwl.xyz
secretName: storage.ntwl.xyz secretName: storage.strix.systems
rules: rules:
- host: storage.strix.systems
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: minio-service
port:
number: 9000
- host: storage.ntwl.xyz - host: storage.ntwl.xyz
http: http:
paths: paths:

33
ops/minio.yaml → storage/minio.yaml Executable file → Normal file
View File

@ -4,18 +4,37 @@
--- ---
apiVersion: v1
kind: PersistentVolume
metadata:
name: minio-pv
spec:
storageClassName: ""
capacity:
storage: 20Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
claimRef:
namespace: default
name: minio-pvc
hostPath:
path: "/var/lib/rancher/k3s/storage/minio-pv"
type: DirectoryOrCreate
---
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
apiVersion: v1 apiVersion: v1
metadata: metadata:
name: minio-storage name: minio-pvc
namespace: ops
spec: spec:
storageClassName: zfs-fast volumeName: minio-pv
accessModes: accessModes:
- ReadWriteOnce - ReadWriteOnce
resources: resources:
requests: requests:
storage: 100Gi storage: 20Gi
--- ---
@ -27,7 +46,6 @@ apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: minio name: minio
namespace: ops
spec: spec:
replicas: 1 replicas: 1
selector: selector:
@ -89,7 +107,7 @@ spec:
volumes: volumes:
- name: minio-storage - name: minio-storage
persistentVolumeClaim: persistentVolumeClaim:
claimName: minio-storage claimName: minio-pvc
--- ---
@ -97,8 +115,7 @@ spec:
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: minio name: minio-service
namespace: ops
labels: labels:
app: minio app: minio
spec: spec: