Compare commits
No commits in common. "main" and "nightowl" have entirely different histories.
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,7 +1,4 @@
|
||||
pvs/
|
||||
|
||||
*.sql
|
||||
*.sql.gz
|
||||
*.tar.gz
|
||||
*.secret.yaml
|
||||
ntwl.sublime-workspace
|
||||
|
||||
@ -9,9 +9,12 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
||||
|
||||
## Style Guidelines
|
||||
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:
|
||||
- Include resource limits/requests in all deployments
|
||||
- Add appropriate labels and annotations
|
||||
- Group related resources in the same file
|
||||
- Use namespaces to organize resources by service
|
||||
|
||||
@ -4,7 +4,6 @@
|
||||
|
||||
### Media
|
||||
|
||||
[ ] move strix gmail to mnml
|
||||
[ ] sabnzbd ini config map
|
||||
[ ] tdarr
|
||||
[ ] subtitle extractor
|
||||
|
||||
@ -1,67 +1,88 @@
|
||||
# ---
|
||||
---
|
||||
|
||||
# kind: PersistentVolumeClaim
|
||||
# apiVersion: v1
|
||||
# metadata:
|
||||
# name: crates-postgres-backup-pvc
|
||||
# spec:
|
||||
# volumeName: crates-postgres-backup-pv
|
||||
# accessModes:
|
||||
# - ReadWriteOnce
|
||||
# resources:
|
||||
# requests:
|
||||
# storage: 1Gi
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: crates-postgres-backup-pv
|
||||
spec:
|
||||
storageClassName: ""
|
||||
capacity:
|
||||
storage: 1Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
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: 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
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: crates-postgres-backup-pvc
|
||||
spec:
|
||||
volumeName: crates-postgres-backup-pv
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
|
||||
# echo "Backing up to $DEST"
|
||||
# pg_dump --dbname=$POSTGRES_URL | gzip > $DEST
|
||||
# echo "Backup Complete"
|
||||
---
|
||||
|
||||
# echo "Removing old copies..."
|
||||
# find . -type f -name "*.sql.gz" -mtime 7 | xargs rm -v
|
||||
apiVersion: batch/v1
|
||||
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..."
|
||||
# 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
|
||||
echo "Backing up to $DEST"
|
||||
pg_dump --dbname=$POSTGRES_URL | gzip > $DEST
|
||||
echo "Backup Complete"
|
||||
|
||||
# ---
|
||||
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
|
||||
|
||||
---
|
||||
|
||||
@ -7,7 +7,6 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
namespace: crates
|
||||
name: crates-client
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
@ -15,9 +14,19 @@ spec:
|
||||
ingressClassName: haproxy
|
||||
tls:
|
||||
- hosts:
|
||||
- crates.ntwl.xyz
|
||||
secretName: crates-ntwl-xyz-tls
|
||||
- crates.strix.systems
|
||||
secretName: crates-strix-systems-tls
|
||||
rules:
|
||||
- host: crates.strix.systems
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: crates-client
|
||||
port:
|
||||
number: 8080
|
||||
- host: crates.ntwl.xyz
|
||||
http:
|
||||
paths:
|
||||
@ -34,18 +43,28 @@ spec:
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: crates-api
|
||||
namespace: crates
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
haproxy.org/path-rewrite: "/api(/)?(.*) /$2"
|
||||
name: crates-api
|
||||
namespace: default
|
||||
spec:
|
||||
ingressClassName: haproxy
|
||||
tls:
|
||||
- hosts:
|
||||
- crates.ntwl.xyz
|
||||
secretName: crates-ntwl-xyz-tls
|
||||
- crates.strix.systems
|
||||
secretName: crates-strix-systems-tls
|
||||
rules:
|
||||
- host: crates.strix.systems
|
||||
http:
|
||||
paths:
|
||||
- path: /api(/|$)(.*)
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
service:
|
||||
name: crates-api
|
||||
port:
|
||||
number: 41337
|
||||
- host: crates.ntwl.xyz
|
||||
http:
|
||||
paths:
|
||||
|
||||
@ -1,37 +1,35 @@
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: crates
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# VOLUMES
|
||||
# -----------------------------------------------------------------------
|
||||
|
||||
---
|
||||
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: crates-postgres-data
|
||||
namespace: crates
|
||||
name: crates-postgres-pv
|
||||
spec:
|
||||
storageClassName: zfs-fast
|
||||
storageClassName: ""
|
||||
capacity:
|
||||
storage: 1Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 2Gi
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
claimRef:
|
||||
namespace: default
|
||||
name: crates-postgres-pvc
|
||||
hostPath:
|
||||
path: "/var/lib/rancher/k3s/storage/crates-postgres-pv"
|
||||
type: DirectoryOrCreate
|
||||
|
||||
---
|
||||
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: crates-postgres-bootstrap
|
||||
namespace: crates
|
||||
name: crates-postgres-pvc
|
||||
spec:
|
||||
volumeName: crates-postgres-pv
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
@ -48,7 +46,6 @@ apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: crates-postgres
|
||||
namespace: crates
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
@ -83,23 +80,17 @@ spec:
|
||||
volumeMounts:
|
||||
- name: crates-postgres-storage
|
||||
mountPath: /var/lib/postgresql/data
|
||||
- name: crates-postgres-bootstrap
|
||||
mountPath: /docker-entrypoint-initdb.d
|
||||
|
||||
volumes:
|
||||
- name: crates-postgres-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: crates-postgres-data
|
||||
- name: crates-postgres-bootstrap
|
||||
persistentVolumeClaim:
|
||||
claimName: crates-postgres-bootstrap
|
||||
claimName: crates-postgres-pvc
|
||||
|
||||
---
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
namespace: crates
|
||||
name: crates-api
|
||||
spec:
|
||||
replicas: 1
|
||||
@ -113,7 +104,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: crates-api
|
||||
image: registry.ntwl.xyz/crates-api
|
||||
image: registry.strix.systems/crates-api
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 80
|
||||
@ -142,32 +133,38 @@ spec:
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
namespace: crates
|
||||
name: crates-migrate
|
||||
spec:
|
||||
restartPolicy: OnFailure
|
||||
containers:
|
||||
- name: crates-migrate
|
||||
image: registry.ntwl.xyz/crates-api
|
||||
imagePullPolicy: IfNotPresent
|
||||
command: ["npx"]
|
||||
args: ["prisma", "migrate", "deploy"]
|
||||
env:
|
||||
- name: DATABASE_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: crates
|
||||
key: DATABASE_URL
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: crates-migrate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: crates-migrate
|
||||
spec:
|
||||
containers:
|
||||
- name: crates-migrate
|
||||
image: registry.strix.systems/crates-api
|
||||
imagePullPolicy: IfNotPresent
|
||||
command: ["npx"]
|
||||
args: ["prisma", "migrate", "deploy"]
|
||||
env:
|
||||
- name: DATABASE_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: crates
|
||||
key: DATABASE_URL
|
||||
|
||||
---
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
namespace: crates
|
||||
name: crates-client
|
||||
spec:
|
||||
replicas: 1
|
||||
@ -181,7 +178,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: crates-client
|
||||
image: registry.ntwl.xyz/crates-client
|
||||
image: registry.strix.systems/crates-client
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
@ -195,7 +192,6 @@ spec:
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
namespace: crates
|
||||
name: crates-api
|
||||
spec:
|
||||
selector:
|
||||
@ -208,7 +204,6 @@ spec:
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
namespace: crates
|
||||
name: crates-postgres
|
||||
spec:
|
||||
selector:
|
||||
@ -221,7 +216,6 @@ spec:
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
namespace: crates
|
||||
name: crates-client
|
||||
spec:
|
||||
selector:
|
||||
|
||||
@ -33,10 +33,6 @@ spec:
|
||||
value: '1000'
|
||||
- name: UMASK
|
||||
value: '002'
|
||||
- name: NVIDIA_VISIBLE_DEVICES
|
||||
value: all
|
||||
- name: NVIDIA_DRIVER_CAPABILITIES
|
||||
value: all
|
||||
ports:
|
||||
- containerPort: 8096
|
||||
protocol: TCP
|
||||
|
||||
@ -16,8 +16,8 @@ spec:
|
||||
spec:
|
||||
restartPolicy: Always
|
||||
containers:
|
||||
- image: ghcr.io/hotio/seerr
|
||||
# imagePullPolicy: Always
|
||||
- image: ghcr.io/hotio/jellyseerr
|
||||
imagePullPolicy: Always
|
||||
name: jellyseerr
|
||||
env:
|
||||
- name: TZ
|
||||
|
||||
@ -80,14 +80,8 @@ kind: Ingress
|
||||
metadata:
|
||||
name: prowlarr-ingress
|
||||
namespace: media
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
spec:
|
||||
ingressClassName: haproxy
|
||||
tls:
|
||||
- secretName: prowlarr-ingress-tls
|
||||
hosts:
|
||||
- prowlarr.ntwl.xyz
|
||||
rules:
|
||||
- host: prowlarr.ntwl.xyz
|
||||
http:
|
||||
|
||||
@ -85,14 +85,8 @@ kind: Ingress
|
||||
metadata:
|
||||
name: radarr-ingress
|
||||
namespace: media
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
spec:
|
||||
ingressClassName: haproxy
|
||||
tls:
|
||||
- secretName: radarr-ingress-tls
|
||||
hosts:
|
||||
- radarr.ntwl.xyz
|
||||
rules:
|
||||
- host: radarr.ntwl.xyz
|
||||
http:
|
||||
|
||||
@ -94,14 +94,8 @@ kind: Ingress
|
||||
metadata:
|
||||
name: sabnzbd-ingress
|
||||
namespace: media
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
spec:
|
||||
ingressClassName: haproxy
|
||||
tls:
|
||||
- secretName: sabnzbd-ingress-tls
|
||||
hosts:
|
||||
- sabnzbd.ntwl.xyz
|
||||
rules:
|
||||
- host: sabnzbd.ntwl.xyz
|
||||
http:
|
||||
|
||||
@ -86,8 +86,6 @@ kind: Ingress
|
||||
metadata:
|
||||
name: sonarr-ingress
|
||||
namespace: media
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
spec:
|
||||
ingressClassName: haproxy
|
||||
rules:
|
||||
|
||||
187
media/tdarr.yaml
187
media/tdarr.yaml
@ -1,187 +0,0 @@
|
||||
---
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: tdarr
|
||||
namespace: media
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: tdarr
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: tdarr
|
||||
spec:
|
||||
restartPolicy: Always
|
||||
runtimeClassName: nvidia
|
||||
containers:
|
||||
- image: ghcr.io/haveagitgat/tdarr:latest
|
||||
imagePullPolicy: Always
|
||||
name: tdarr
|
||||
env:
|
||||
- name: TZ
|
||||
value: Australia/Melbourne
|
||||
- name: PUID
|
||||
value: '1000'
|
||||
- name: PGID
|
||||
value: '1000'
|
||||
- name: UMASK
|
||||
value: '002'
|
||||
- name: serverIP
|
||||
value: 0.0.0.0
|
||||
- name: serverPort
|
||||
value: '8266'
|
||||
- name: webUIPort
|
||||
value: '8265'
|
||||
- name: NVIDIA_VISIBLE_DEVICES
|
||||
value: all
|
||||
- name: NVIDIA_DRIVER_CAPABILITIES
|
||||
value: all
|
||||
ports:
|
||||
- containerPort: 8265
|
||||
name: web
|
||||
protocol: TCP
|
||||
- containerPort: 8266
|
||||
name: server
|
||||
protocol: TCP
|
||||
volumeMounts:
|
||||
- mountPath: /data
|
||||
name: tdarr-data
|
||||
- mountPath: /app/server
|
||||
name: tdarr-config
|
||||
- mountPath: /app/configs
|
||||
name: tdarr-configs
|
||||
- image: ghcr.io/haveagitgat/tdarr_node:latest
|
||||
imagePullPolicy: Always
|
||||
name: tdarr-node
|
||||
env:
|
||||
- name: TZ
|
||||
value: Australia/Melbourne
|
||||
- name: PUID
|
||||
value: '1000'
|
||||
- name: PGID
|
||||
value: '1000'
|
||||
- name: UMASK
|
||||
value: '002'
|
||||
- name: nodeID
|
||||
value: MainNode
|
||||
- name: nodeIP
|
||||
value: 0.0.0.0
|
||||
- name: nodePort
|
||||
value: '8268'
|
||||
- name: serverIP
|
||||
value: 0.0.0.0
|
||||
- name: serverPort
|
||||
value: '8266'
|
||||
- name: NVIDIA_VISIBLE_DEVICES
|
||||
value: all
|
||||
- name: NVIDIA_DRIVER_CAPABILITIES
|
||||
value: all
|
||||
ports:
|
||||
- containerPort: 8268
|
||||
name: node
|
||||
protocol: TCP
|
||||
resources:
|
||||
limits:
|
||||
nvidia.com/gpu: 1
|
||||
volumeMounts:
|
||||
- mountPath: /data
|
||||
name: tdarr-data
|
||||
- mountPath: /app/configs
|
||||
name: tdarr-configs
|
||||
volumes:
|
||||
- name: tdarr-data
|
||||
persistentVolumeClaim:
|
||||
claimName: data
|
||||
- name: tdarr-config
|
||||
persistentVolumeClaim:
|
||||
claimName: tdarr-config
|
||||
- name: tdarr-configs
|
||||
persistentVolumeClaim:
|
||||
claimName: tdarr-configs
|
||||
|
||||
---
|
||||
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: tdarr-config
|
||||
namespace: media
|
||||
spec:
|
||||
storageClassName: zfs-fast
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
|
||||
---
|
||||
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: tdarr-configs
|
||||
namespace: media
|
||||
spec:
|
||||
storageClassName: zfs-fast
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: tdarr
|
||||
name: tdarr
|
||||
namespace: media
|
||||
spec:
|
||||
ports:
|
||||
- name: web
|
||||
port: 8265
|
||||
protocol: TCP
|
||||
targetPort: 8265
|
||||
- name: server
|
||||
port: 8266
|
||||
protocol: TCP
|
||||
targetPort: 8266
|
||||
- name: node
|
||||
port: 8268
|
||||
protocol: TCP
|
||||
targetPort: 8268
|
||||
selector:
|
||||
app: tdarr
|
||||
type: ClusterIP
|
||||
|
||||
---
|
||||
|
||||
# apiVersion: networking.k8s.io/v1
|
||||
# kind: Ingress
|
||||
# metadata:
|
||||
# name: tdarr-ingress
|
||||
# namespace: media
|
||||
# annotations:
|
||||
# cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||
# spec:
|
||||
# ingressClassName: haproxy
|
||||
# tls:
|
||||
# - secretName: tdarr-ingress
|
||||
# hosts:
|
||||
# - tdarr.ntwl.xyz
|
||||
# rules:
|
||||
# - host: tdarr.ntwl.xyz
|
||||
# http:
|
||||
# paths:
|
||||
# - backend:
|
||||
# service:
|
||||
# name: tdarr
|
||||
# port:
|
||||
# name: web
|
||||
# path: /
|
||||
# pathType: Prefix
|
||||
@ -8,7 +8,6 @@ apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: memestream-client
|
||||
namespace: memestream
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
@ -21,7 +20,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: memestream-client
|
||||
image: registry.ntwl.xyz/memestream-client
|
||||
image: registry.strix.systems/memestream-client
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
@ -38,7 +37,6 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: memestream-client
|
||||
namespace: memestream
|
||||
spec:
|
||||
selector:
|
||||
app: memestream-client
|
||||
|
||||
@ -1,23 +1,29 @@
|
||||
---
|
||||
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: memestream
|
||||
namespace: memestream
|
||||
name: memestream-client
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
spec:
|
||||
ingressClassName: haproxy
|
||||
tls:
|
||||
- secretName: memestream-ntwl-xyz-tls
|
||||
hosts:
|
||||
- memestream.ntwl.xyz
|
||||
- search.memestream.ntwl.xyz
|
||||
- storage.memestream.ntwl.xyz
|
||||
- minio.memestream.ntwl.xyz
|
||||
|
||||
- hosts:
|
||||
- memestream.strix.systems
|
||||
- search.memestream.strix.systems
|
||||
- memestream.ntwl.xyz
|
||||
- search.memestream.ntwl.xyz
|
||||
secretName: memestream-strix-systems-tls
|
||||
rules:
|
||||
- host: search.memestream.strix.systems
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: memestream-meili
|
||||
port:
|
||||
number: 7700
|
||||
- host: search.memestream.ntwl.xyz
|
||||
http:
|
||||
paths:
|
||||
@ -28,7 +34,16 @@ spec:
|
||||
name: memestream-meili
|
||||
port:
|
||||
number: 7700
|
||||
|
||||
- host: memestream.strix.systems
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: memestream-client
|
||||
port:
|
||||
number: 8080
|
||||
- host: memestream.ntwl.xyz
|
||||
http:
|
||||
paths:
|
||||
@ -39,25 +54,3 @@ spec:
|
||||
name: memestream-client
|
||||
port:
|
||||
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
|
||||
|
||||
@ -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
|
||||
@ -1,23 +1,35 @@
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: memestream
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# 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
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: memestream-postgres-pvc
|
||||
namespace: memestream
|
||||
spec:
|
||||
storageClassName: fast
|
||||
volumeName: memestream-postgres-pv
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
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
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: memestream-meili-pvc
|
||||
namespace: memestream
|
||||
spec:
|
||||
storageClassName: zfs-fast
|
||||
volumeName: memestream-meili-pv
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
@ -49,7 +80,6 @@ apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: memestream-archiver
|
||||
namespace: memestream
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
@ -62,7 +92,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: memestream-archiver
|
||||
image: registry.ntwl.xyz/memestream-archiver
|
||||
image: registry.strix.systems/memestream-archiver
|
||||
imagePullPolicy: Always
|
||||
envFrom:
|
||||
- secretRef:
|
||||
@ -74,7 +104,6 @@ apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: memestream-postgres
|
||||
namespace: memestream
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
@ -121,7 +150,6 @@ apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: memestream-meili
|
||||
namespace: memestream
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
@ -148,8 +176,8 @@ spec:
|
||||
mountPath: /meili_data
|
||||
resources:
|
||||
limits:
|
||||
memory: "2Gi"
|
||||
cpu: "2000m"
|
||||
memory: "1Gi"
|
||||
cpu: "1000m"
|
||||
|
||||
volumes:
|
||||
- name: memestream-meili-storage
|
||||
@ -167,7 +195,6 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: memestream-postgres
|
||||
namespace: memestream
|
||||
spec:
|
||||
selector:
|
||||
app: memestream-postgres
|
||||
@ -180,7 +207,6 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: memestream-meili
|
||||
namespace: memestream
|
||||
spec:
|
||||
selector:
|
||||
app: memestream-meili
|
||||
|
||||
@ -1,45 +1,84 @@
|
||||
---
|
||||
# -----------------------------------------------------------------------
|
||||
# COMBINED INGRESS
|
||||
# INGRESS
|
||||
# -----------------------------------------------------------------------
|
||||
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: mnml
|
||||
namespace: mnml
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
haproxy.org/websocket-support: "true"
|
||||
haproxy.org/timeout-tunnel: "3600s"
|
||||
name: mnml-client
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
spec:
|
||||
ingressClassName: haproxy
|
||||
tls:
|
||||
- hosts:
|
||||
- mnml.gg
|
||||
secretName: mnml-tls
|
||||
rules:
|
||||
- host: mnml.gg
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: mnml-client
|
||||
port:
|
||||
number: 8080
|
||||
- path: /api
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: mnml-api
|
||||
port:
|
||||
number: 40000
|
||||
- path: /api/ws
|
||||
pathType: Exact
|
||||
backend:
|
||||
service:
|
||||
name: mnml-ws
|
||||
port:
|
||||
number: 40055
|
||||
ingressClassName: haproxy
|
||||
tls:
|
||||
- hosts:
|
||||
- mnml.gg
|
||||
secretName: mnml-tls
|
||||
rules:
|
||||
- host: mnml.gg
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: mnml-client
|
||||
port:
|
||||
number: 8080
|
||||
|
||||
---
|
||||
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: mnml-api
|
||||
namespace: default
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
haproxy.org/websocket-support: "true"
|
||||
spec:
|
||||
ingressClassName: haproxy
|
||||
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
|
||||
@ -1,24 +1,35 @@
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: mnml
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# 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
|
||||
apiVersion: v1
|
||||
|
||||
metadata:
|
||||
namespace: mnml
|
||||
name: mnml-postgres-pvc
|
||||
spec:
|
||||
storageClassName: fast
|
||||
volumeName: mnml-postgres-pv
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
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
|
||||
apiVersion: v1
|
||||
|
||||
metadata:
|
||||
namespace: mnml
|
||||
name: mnml-imgs-pvc
|
||||
spec:
|
||||
storageClassName: fast
|
||||
volumeName: mnml-imgs-pv
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 2Gi
|
||||
storage: 1Gi
|
||||
|
||||
---
|
||||
|
||||
@ -50,9 +80,7 @@ spec:
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
|
||||
metadata:
|
||||
namespace: mnml
|
||||
name: mnml-postgres
|
||||
spec:
|
||||
replicas: 1
|
||||
@ -66,7 +94,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: postgres
|
||||
image: postgres:16
|
||||
image: postgres:latest
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
env:
|
||||
@ -98,9 +126,7 @@ spec:
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
|
||||
metadata:
|
||||
namespace: mnml
|
||||
name: mnml-api
|
||||
spec:
|
||||
replicas: 1
|
||||
@ -114,7 +140,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: mnml-api
|
||||
image: registry.ntwl.xyz/mnml-api
|
||||
image: registry.strix.systems/mnml-api
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 40000
|
||||
@ -165,9 +191,7 @@ spec:
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
|
||||
metadata:
|
||||
namespace: mnml
|
||||
name: mnml-client
|
||||
spec:
|
||||
replicas: 1
|
||||
@ -181,7 +205,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: mnml-client
|
||||
image: registry.ntwl.xyz/mnml-client
|
||||
image: registry.strix.systems/mnml-client
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
@ -201,9 +225,7 @@ spec:
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
|
||||
metadata:
|
||||
namespace: mnml
|
||||
name: mnml-api
|
||||
spec:
|
||||
selector:
|
||||
@ -216,9 +238,7 @@ spec:
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
|
||||
metadata:
|
||||
namespace: mnml
|
||||
name: mnml-ws
|
||||
spec:
|
||||
selector:
|
||||
@ -231,9 +251,7 @@ spec:
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
|
||||
metadata:
|
||||
namespace: mnml
|
||||
name: mnml-postgres
|
||||
spec:
|
||||
selector:
|
||||
@ -245,9 +263,7 @@ spec:
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
|
||||
metadata:
|
||||
namespace: mnml
|
||||
name: mnml-client
|
||||
spec:
|
||||
selector:
|
||||
|
||||
@ -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: |-
|
||||
@ -1,6 +0,0 @@
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: monitor
|
||||
@ -1,168 +1,168 @@
|
||||
# ---
|
||||
---
|
||||
|
||||
# # -----------------------------------------------------------------------
|
||||
# # DEPLOYMENTS
|
||||
# # -----------------------------------------------------------------------
|
||||
# -----------------------------------------------------------------------
|
||||
# DEPLOYMENTS
|
||||
# -----------------------------------------------------------------------
|
||||
|
||||
# apiVersion: apps/v1
|
||||
# kind: Deployment
|
||||
# metadata:
|
||||
# name: pihole
|
||||
# namespace: networking
|
||||
# spec:
|
||||
# replicas: 1
|
||||
# selector:
|
||||
# matchLabels:
|
||||
# app: pihole
|
||||
# template:
|
||||
# metadata:
|
||||
# labels:
|
||||
# app: pihole
|
||||
# spec:
|
||||
# containers:
|
||||
# - name: pihole
|
||||
# image: pihole/pihole:latest
|
||||
# imagePullPolicy: IfNotPresent
|
||||
# env:
|
||||
# - name: TZ
|
||||
# value: "Australia/Melbourne"
|
||||
# - name: FTLCONF_webserver_api_password
|
||||
# value: grepgrepgrep
|
||||
# # allow it to respond to devices outside cluster
|
||||
# - name: FTLCONF_dns_listeningMode
|
||||
# value: single
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: pihole
|
||||
namespace: networking
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: pihole
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: pihole
|
||||
spec:
|
||||
containers:
|
||||
- name: pihole
|
||||
image: pihole/pihole:latest
|
||||
imagePullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: TZ
|
||||
value: "Australia/Melbourne"
|
||||
- name: FTLCONF_webserver_api_password
|
||||
value: grepgrepgrep
|
||||
# allow it to respond to devices outside cluster
|
||||
- name: FTLCONF_dns_listeningMode
|
||||
value: single
|
||||
|
||||
# # resolve wildcards
|
||||
# - name: FTLCONF_misc_dnsmasq_lines
|
||||
# value: address=/nightowl.strix.systems/192.168.1.88
|
||||
# ports:
|
||||
# - containerPort: 53
|
||||
# protocol: TCP
|
||||
# - containerPort: 53
|
||||
# protocol: UDP
|
||||
# - containerPort: 67
|
||||
# protocol: UDP
|
||||
# - containerPort: 80
|
||||
# protocol: TCP
|
||||
# - containerPort: 443
|
||||
# protocol: TCP
|
||||
# # volumeMounts:
|
||||
# # - name: etc
|
||||
# # mountPath: /etc/pihole
|
||||
# # - name: dnsmasq
|
||||
# # mountPath: /etc/dnsmasq.d
|
||||
# resources:
|
||||
# requests:
|
||||
# memory: 128Mi
|
||||
# cpu: 100m
|
||||
# limits:
|
||||
# memory: 2Gi
|
||||
# cpu: 1
|
||||
# # volumes:
|
||||
# # - name: etc
|
||||
# # hostPath:
|
||||
# # path: /data/pihole/etc
|
||||
# # type: Directory
|
||||
# # - name: dnsmasq
|
||||
# # hostPath:
|
||||
# # path: /data/pihole/dnsmasq.d
|
||||
# # type: Directory
|
||||
# resolve wildcards
|
||||
- name: FTLCONF_misc_dnsmasq_lines
|
||||
value: address=/nightowl.strix.systems/192.168.1.88
|
||||
ports:
|
||||
- containerPort: 53
|
||||
protocol: TCP
|
||||
- containerPort: 53
|
||||
protocol: UDP
|
||||
- containerPort: 67
|
||||
protocol: UDP
|
||||
- containerPort: 80
|
||||
protocol: TCP
|
||||
- containerPort: 443
|
||||
protocol: TCP
|
||||
# volumeMounts:
|
||||
# - name: etc
|
||||
# mountPath: /etc/pihole
|
||||
# - name: dnsmasq
|
||||
# mountPath: /etc/dnsmasq.d
|
||||
resources:
|
||||
requests:
|
||||
memory: 128Mi
|
||||
cpu: 100m
|
||||
limits:
|
||||
memory: 2Gi
|
||||
cpu: 1
|
||||
# volumes:
|
||||
# - name: etc
|
||||
# hostPath:
|
||||
# path: /data/pihole/etc
|
||||
# type: Directory
|
||||
# - name: dnsmasq
|
||||
# hostPath:
|
||||
# path: /data/pihole/dnsmasq.d
|
||||
# type: Directory
|
||||
|
||||
# # -----------------------------------------------------------------------
|
||||
# # SERVICES
|
||||
# # -----------------------------------------------------------------------
|
||||
# -----------------------------------------------------------------------
|
||||
# SERVICES
|
||||
# -----------------------------------------------------------------------
|
||||
|
||||
# ---
|
||||
---
|
||||
|
||||
# kind: Service
|
||||
# apiVersion: v1
|
||||
# metadata:
|
||||
# name: pihole
|
||||
# namespace: networking
|
||||
# spec:
|
||||
# selector:
|
||||
# app: pihole
|
||||
# ports:
|
||||
# - name: web
|
||||
# port: 80
|
||||
# targetPort: 80
|
||||
# - name: dns-tcp
|
||||
# port: 53
|
||||
# targetPort: 53
|
||||
# protocol: TCP
|
||||
# - name: dns-udp
|
||||
# port: 53
|
||||
# targetPort: 53
|
||||
# protocol: UDP
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: pihole
|
||||
namespace: networking
|
||||
spec:
|
||||
selector:
|
||||
app: pihole
|
||||
ports:
|
||||
- name: web
|
||||
port: 80
|
||||
targetPort: 80
|
||||
- name: dns-tcp
|
||||
port: 53
|
||||
targetPort: 53
|
||||
protocol: TCP
|
||||
- name: dns-udp
|
||||
port: 53
|
||||
targetPort: 53
|
||||
protocol: UDP
|
||||
|
||||
# ---
|
||||
---
|
||||
|
||||
# apiVersion: v1
|
||||
# kind: Service
|
||||
# metadata:
|
||||
# name: pihole-dns-udp
|
||||
# namespace: networking
|
||||
# spec:
|
||||
# selector:
|
||||
# app: pihole
|
||||
# ports:
|
||||
# - name: dns-udp
|
||||
# port: 53
|
||||
# protocol: UDP
|
||||
# externalTrafficPolicy: Local
|
||||
# type: LoadBalancer
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: pihole-dns-udp
|
||||
namespace: networking
|
||||
spec:
|
||||
selector:
|
||||
app: pihole
|
||||
ports:
|
||||
- name: dns-udp
|
||||
port: 53
|
||||
protocol: UDP
|
||||
externalTrafficPolicy: Local
|
||||
type: LoadBalancer
|
||||
|
||||
# ---
|
||||
---
|
||||
|
||||
# apiVersion: v1
|
||||
# kind: Service
|
||||
# metadata:
|
||||
# name: pihole-dns-tcp
|
||||
# namespace: networking
|
||||
# spec:
|
||||
# selector:
|
||||
# app: pihole
|
||||
# ports:
|
||||
# - name: dns-tcp
|
||||
# port: 53
|
||||
# protocol: TCP
|
||||
# externalTrafficPolicy: Local
|
||||
# type: LoadBalancer
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: pihole-dns-tcp
|
||||
namespace: networking
|
||||
spec:
|
||||
selector:
|
||||
app: pihole
|
||||
ports:
|
||||
- name: dns-tcp
|
||||
port: 53
|
||||
protocol: TCP
|
||||
externalTrafficPolicy: Local
|
||||
type: LoadBalancer
|
||||
|
||||
# ---
|
||||
---
|
||||
|
||||
# apiVersion: v1
|
||||
# kind: Service
|
||||
# metadata:
|
||||
# name: pihole-web-debug
|
||||
# namespace: networking
|
||||
# spec:
|
||||
# selector:
|
||||
# app: pihole
|
||||
# ports:
|
||||
# - name: dns-tcp
|
||||
# port: 9980
|
||||
# targetPort: 80
|
||||
# protocol: TCP
|
||||
# externalTrafficPolicy: Local
|
||||
# type: LoadBalancer
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: pihole-web-debug
|
||||
namespace: networking
|
||||
spec:
|
||||
selector:
|
||||
app: pihole
|
||||
ports:
|
||||
- name: dns-tcp
|
||||
port: 9980
|
||||
targetPort: 80
|
||||
protocol: TCP
|
||||
externalTrafficPolicy: Local
|
||||
type: LoadBalancer
|
||||
|
||||
# ---
|
||||
# apiVersion: networking.k8s.io/v1
|
||||
# kind: Ingress
|
||||
# metadata:
|
||||
# name: pihole
|
||||
# namespace: networking
|
||||
# spec:
|
||||
# ingressClassName: haproxy
|
||||
# rules:
|
||||
# - host: "pihole.nightowl.strix.systems"
|
||||
# http:
|
||||
# paths:
|
||||
# - path: /
|
||||
# pathType: Prefix
|
||||
# backend:
|
||||
# service:
|
||||
# name: pihole
|
||||
# port:
|
||||
# name: web
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: pihole
|
||||
namespace: networking
|
||||
spec:
|
||||
ingressClassName: haproxy
|
||||
rules:
|
||||
- host: "pihole.nightowl.strix.systems"
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: pihole
|
||||
port:
|
||||
name: web
|
||||
|
||||
@ -4,17 +4,27 @@ apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: ntr-cv
|
||||
namespace: ntr-cv
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
spec:
|
||||
ingressClassName: haproxy
|
||||
tls:
|
||||
- hosts:
|
||||
- ntwl.xyz
|
||||
- strix.systems
|
||||
- ntr.ntwl.xyz
|
||||
secretName: strix-systems-tls
|
||||
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:
|
||||
paths:
|
||||
- path: /
|
||||
|
||||
@ -1,12 +1,5 @@
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: ntr-cv
|
||||
|
||||
---
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# DEPLOYMENTS
|
||||
# -----------------------------------------------------------------------
|
||||
@ -15,7 +8,6 @@ apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: ntr-cv
|
||||
namespace: ntr-cv
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
@ -28,7 +20,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: ntr-cv
|
||||
image: registry.ntwl.xyz/ntr-cv
|
||||
image: registry.strix.systems/ntr-cv
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
@ -45,7 +37,6 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: ntr-cv
|
||||
namespace: ntr-cv
|
||||
spec:
|
||||
selector:
|
||||
app: ntr-cv
|
||||
|
||||
@ -1,8 +0,0 @@
|
||||
{
|
||||
"folders":
|
||||
[
|
||||
{
|
||||
"path": "."
|
||||
}
|
||||
]
|
||||
}
|
||||
30
ops/grafana.yaml
Normal file
30
ops/grafana.yaml
Normal 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
|
||||
@ -1,15 +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: |-
|
||||
# lets you use cli without speciying name
|
||||
fullnameOverride: sealed-secrets-controller
|
||||
@ -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
|
||||
@ -11,9 +11,20 @@ spec:
|
||||
ingressClassName: haproxy
|
||||
tls:
|
||||
- hosts:
|
||||
- monitor.strix.systems
|
||||
- monitor.ntwl.xyz
|
||||
secretName: monitor-strix-systems-tls
|
||||
rules:
|
||||
- host: monitor.strix.systems
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: kube-prometheus-stack-grafana
|
||||
port:
|
||||
number: 80
|
||||
- host: monitor.ntwl.xyz
|
||||
http:
|
||||
paths:
|
||||
|
||||
@ -4,7 +4,6 @@ apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: registry
|
||||
namespace: ops
|
||||
annotations:
|
||||
haproxy.org/proxy-body-size-limit: "2g"
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
@ -12,6 +11,7 @@ spec:
|
||||
ingressClassName: haproxy
|
||||
tls:
|
||||
- hosts:
|
||||
- registry.strix.systems
|
||||
- registry.ntwl.xyz
|
||||
secretName: registry-strix-systems-tls
|
||||
rules:
|
||||
|
||||
20
ops/values.yaml
Normal file
20
ops/values.yaml
Normal 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
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
62
ops/vlt.yaml
62
ops/vlt.yaml
@ -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"
|
||||
@ -3,7 +3,6 @@ apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: spacerace-api
|
||||
namespace: spacerace
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
haproxy.org/path-rewrite: "/api(/)?(.*) /$2"
|
||||
@ -11,14 +10,14 @@ spec:
|
||||
ingressClassName: haproxy
|
||||
tls:
|
||||
- hosts:
|
||||
- spacerace.ntwl.xyz
|
||||
secretName: spacerace-ntwl-xyz-tls
|
||||
- spacerace.strix.systems
|
||||
secretName: spacerace-strix-systems-tls
|
||||
rules:
|
||||
- host: spacerace.ntwl.xyz
|
||||
- host: spacerace.strix.systems
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
- path: /api(/|$)(.*)
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
service:
|
||||
name: spacerace-api
|
||||
|
||||
@ -1,38 +1,35 @@
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: spacerace
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# VOLUMES
|
||||
# -----------------------------------------------------------------------
|
||||
|
||||
---
|
||||
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: spacerace-postgres-data
|
||||
namespace: spacerace
|
||||
name: spacerace-postgres-pv
|
||||
spec:
|
||||
storageClassName: zfs-fast
|
||||
storageClassName: ""
|
||||
capacity:
|
||||
storage: 1Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
claimRef:
|
||||
namespace: default
|
||||
name: spacerace-postgres-pvc
|
||||
hostPath:
|
||||
path: "/var/lib/rancher/k3s/storage/spacerace-postgres-pv"
|
||||
type: DirectoryOrCreate
|
||||
|
||||
---
|
||||
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: spacerace-postgres-bootstrap
|
||||
namespace: spacerace
|
||||
name: spacerace-postgres-pvc
|
||||
spec:
|
||||
volumeName: spacerace-postgres-pv
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
@ -49,7 +46,6 @@ apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: spacerace-postgres
|
||||
namespace: spacerace
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
@ -84,16 +80,11 @@ spec:
|
||||
volumeMounts:
|
||||
- name: spacerace-postgres-storage
|
||||
mountPath: /var/lib/postgresql/data
|
||||
- name: spacerace-postgres-bootstrap
|
||||
mountPath: /docker-entrypoint-initdb.d
|
||||
|
||||
volumes:
|
||||
- name: spacerace-postgres-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: spacerace-postgres-data
|
||||
- name: spacerace-postgres-bootstrap
|
||||
persistentVolumeClaim:
|
||||
claimName: spacerace-postgres-bootstrap
|
||||
claimName: spacerace-postgres-pvc
|
||||
|
||||
---
|
||||
|
||||
@ -101,7 +92,6 @@ apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: spacerace-api
|
||||
namespace: spacerace
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
@ -114,7 +104,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: spacerace-api
|
||||
image: registry.ntwl.xyz/spacerace-api
|
||||
image: registry.strix.systems/spacerace-api
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 80
|
||||
@ -124,7 +114,6 @@ spec:
|
||||
secretKeyRef:
|
||||
name: spacerace
|
||||
key: CONNECTIONSTRINGS__SPACERACE
|
||||
|
||||
---
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
@ -135,7 +124,6 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: spacerace-api
|
||||
namespace: spacerace
|
||||
spec:
|
||||
selector:
|
||||
app: spacerace-api
|
||||
@ -147,7 +135,6 @@ spec:
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
namespace: spacerace
|
||||
name: spacerace-postgres
|
||||
spec:
|
||||
selector:
|
||||
|
||||
@ -10,6 +10,7 @@ spec:
|
||||
ingressClassName: haproxy
|
||||
tls:
|
||||
- hosts:
|
||||
- minio.strix.systems
|
||||
- minio.ntwl.xyz
|
||||
secretName: minio.strix.systems
|
||||
rules:
|
||||
@ -49,9 +50,20 @@ spec:
|
||||
ingressClassName: haproxy
|
||||
tls:
|
||||
- hosts:
|
||||
- storage.strix.systems
|
||||
- storage.ntwl.xyz
|
||||
secretName: storage.ntwl.xyz
|
||||
secretName: storage.strix.systems
|
||||
rules:
|
||||
- host: storage.strix.systems
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: minio-service
|
||||
port:
|
||||
number: 9000
|
||||
- host: storage.ntwl.xyz
|
||||
http:
|
||||
paths:
|
||||
|
||||
33
ops/minio.yaml → storage/minio.yaml
Executable file → Normal file
33
ops/minio.yaml → storage/minio.yaml
Executable file → Normal 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
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: minio-storage
|
||||
namespace: ops
|
||||
name: minio-pvc
|
||||
spec:
|
||||
storageClassName: zfs-fast
|
||||
volumeName: minio-pv
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 100Gi
|
||||
storage: 20Gi
|
||||
|
||||
---
|
||||
|
||||
@ -27,7 +46,6 @@ apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: minio
|
||||
namespace: ops
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
@ -89,7 +107,7 @@ spec:
|
||||
volumes:
|
||||
- name: minio-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: minio-storage
|
||||
claimName: minio-pvc
|
||||
|
||||
|
||||
---
|
||||
@ -97,8 +115,7 @@ spec:
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: minio
|
||||
namespace: ops
|
||||
name: minio-service
|
||||
labels:
|
||||
app: minio
|
||||
spec:
|
||||
@ -1,76 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: mariadb
|
||||
namespace: surf
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: mariadb
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: mariadb
|
||||
spec:
|
||||
containers:
|
||||
- name: mariadb
|
||||
image: mariadb:12
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 3306
|
||||
env:
|
||||
- name: MYSQL_ROOT_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: surf
|
||||
key: MYSQL_ROOT_PASSWORD
|
||||
- name: MYSQL_DATABASE
|
||||
value: "shavit"
|
||||
volumeMounts:
|
||||
- name: mariadb-data
|
||||
mountPath: /var/lib/mysql
|
||||
volumes:
|
||||
- name: mariadb-data
|
||||
persistentVolumeClaim:
|
||||
claimName: mariadb-data
|
||||
|
||||
---
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# SERVICE
|
||||
# -----------------------------------------------------------------------
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: mariadb
|
||||
namespace: surf
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: mariadb
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 3306
|
||||
targetPort: 3306
|
||||
|
||||
---
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# VOLUMES
|
||||
# -----------------------------------------------------------------------
|
||||
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: mariadb-data
|
||||
namespace: surf
|
||||
spec:
|
||||
storageClassName: zfs-fast
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
|
||||
@ -1,303 +0,0 @@
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: surf
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# VOLUMES
|
||||
# -----------------------------------------------------------------------
|
||||
|
||||
---
|
||||
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: cssds-data
|
||||
namespace: surf
|
||||
spec:
|
||||
storageClassName: fast
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 50Gi
|
||||
|
||||
---
|
||||
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: fastdl-maps
|
||||
namespace: surf
|
||||
spec:
|
||||
storageClassName: fast
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 200Gi
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: cfg
|
||||
namespace: surf
|
||||
data:
|
||||
mapcycle.txt: |
|
||||
surf_fortum_fix
|
||||
surf_anzchamps
|
||||
surf_andromeda
|
||||
surf_boreas
|
||||
surf_deathstar
|
||||
surf_ebony
|
||||
surf_fornax
|
||||
surf_garden
|
||||
surf_in_space
|
||||
surf_kepler
|
||||
surf_kitsune
|
||||
surf_kitsune2
|
||||
surf_lt_omnific
|
||||
surf_pantheon
|
||||
surf_utopia_njv
|
||||
surf_nyx
|
||||
surf_stonks
|
||||
surf_serenity
|
||||
surf_tendies
|
||||
surf_zoomboys
|
||||
surf_calzone
|
||||
|
||||
---
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# DEPLOYMENT
|
||||
# -----------------------------------------------------------------------
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: cssds
|
||||
namespace: surf
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: cssds
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: cssds
|
||||
spec:
|
||||
initContainers:
|
||||
- name: fix-permissions
|
||||
image: busybox
|
||||
command: ['sh', '-c', 'chown -R 1000:1000 /home/steam/cssds']
|
||||
volumeMounts:
|
||||
- name: cssds
|
||||
mountPath: /home/steam/cssds
|
||||
containers:
|
||||
- name: cssds
|
||||
image: registry.ntwl.xyz/megastructure-surf-cssds
|
||||
imagePullPolicy: Always
|
||||
# command: ["sleep", "100000000"]
|
||||
ports:
|
||||
- containerPort: 27015
|
||||
- containerPort: 27005
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: surf
|
||||
volumeMounts:
|
||||
- name: cssds
|
||||
mountPath: /home/steam/cssds
|
||||
- name: fastdl-maps
|
||||
mountPath: /fastdl/maps
|
||||
readOnly: true
|
||||
- name: cfg
|
||||
mountPath: /home/steam/cfg
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: cssds
|
||||
persistentVolumeClaim:
|
||||
claimName: cssds-data
|
||||
- name: fastdl-maps
|
||||
persistentVolumeClaim:
|
||||
claimName: fastdl-maps
|
||||
- name: cfg
|
||||
configMap:
|
||||
name: cfg
|
||||
|
||||
---
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# SERVICES
|
||||
# -----------------------------------------------------------------------
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: cssds
|
||||
namespace: surf
|
||||
spec:
|
||||
type: NodePort
|
||||
selector:
|
||||
app: cssds
|
||||
ports:
|
||||
- name: game-port
|
||||
protocol: UDP
|
||||
port: 27015
|
||||
targetPort: 27015
|
||||
nodePort: 32015
|
||||
- name: rcon
|
||||
protocol: TCP
|
||||
port: 27015
|
||||
targetPort: 27015
|
||||
nodePort: 32015
|
||||
- name: client-port
|
||||
protocol: UDP
|
||||
port: 27005
|
||||
targetPort: 27005
|
||||
nodePort: 32005
|
||||
|
||||
---
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# MAP DOWNLOADER
|
||||
# -----------------------------------------------------------------------
|
||||
|
||||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: mapsdl
|
||||
namespace: surf
|
||||
spec:
|
||||
schedule: "*/1 * * * *"
|
||||
concurrencyPolicy: Forbid
|
||||
successfulJobsHistoryLimit: 1
|
||||
failedJobsHistoryLimit: 3
|
||||
jobTemplate:
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- name: mapsdl
|
||||
image: registry.ntwl.xyz/megastructure-surf-mapsdl:latest
|
||||
imagePullPolicy: Always
|
||||
command:
|
||||
- "deno"
|
||||
- "run"
|
||||
- "-A"
|
||||
- "mapsdl.ts"
|
||||
env:
|
||||
- name: MAPS_DIR
|
||||
value: "/maps"
|
||||
- name: TEMP_DIR
|
||||
value: "/tmp/mapsdl"
|
||||
- name: GOOGLE_APPLICATION_CREDENTIALS
|
||||
value: "/app/credentials/service-account.json"
|
||||
- name: MAPS_LIST_FILE
|
||||
value: "/cfg/mapcycle.txt"
|
||||
volumeMounts:
|
||||
- name: fastdl-maps
|
||||
mountPath: /maps
|
||||
- name: credentials
|
||||
mountPath: /app/credentials
|
||||
readOnly: true
|
||||
- name: cfg
|
||||
mountPath: /cfg
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: fastdl-maps
|
||||
persistentVolumeClaim:
|
||||
claimName: fastdl-maps
|
||||
- name: credentials
|
||||
secret:
|
||||
secretName: mapsdl-credentials
|
||||
- name: cfg
|
||||
configMap:
|
||||
name: cfg
|
||||
|
||||
---
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# FASTDL
|
||||
# -----------------------------------------------------------------------
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: fastdl
|
||||
namespace: surf
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: fastdl
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: fastdl
|
||||
spec:
|
||||
containers:
|
||||
- name: fastdl
|
||||
image: registry.ntwl.xyz/megastructure-surf-fastdl
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 80
|
||||
volumeMounts:
|
||||
- name: fastdl-maps
|
||||
mountPath: /srv/maps
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: fastdl-maps
|
||||
persistentVolumeClaim:
|
||||
claimName: fastdl-maps
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: fastdl
|
||||
namespace: surf
|
||||
spec:
|
||||
selector:
|
||||
app: fastdl
|
||||
ports:
|
||||
- name: http
|
||||
protocol: TCP
|
||||
port: 80
|
||||
targetPort: 80
|
||||
|
||||
---
|
||||
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: fastdl
|
||||
namespace: surf
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
spec:
|
||||
ingressClassName: haproxy
|
||||
tls:
|
||||
- hosts:
|
||||
- fastdl.megastructure.surf
|
||||
secretName: fastdl-megastructure-surf-tls
|
||||
rules:
|
||||
- host: fastdl.megastructure.surf
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: fastdl
|
||||
port:
|
||||
number: 80
|
||||
|
||||
---
|
||||
Loading…
x
Reference in New Issue
Block a user