Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 69af1882cb | |||
| 514948f3e8 | |||
| eb67b15716 | |||
| 177a5d1cb2 | |||
| b6dc6dfef9 | |||
| 6e3c77d902 | |||
| 560a2fc6a1 | |||
| 09802a55c0 | |||
| e7815777ca | |||
| 3136fdfc67 | |||
| c8fb9598a6 | |||
| 8d43a3f28b | |||
| 28cf175f6e | |||
| 1738876009 | |||
| 3c118b0796 | |||
| 4c72c841e7 |
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,4 +1,7 @@
|
|||||||
pvs/
|
pvs/
|
||||||
|
|
||||||
*.sql
|
*.sql
|
||||||
*.tar.gz
|
*.sql.gz
|
||||||
|
*.tar.gz
|
||||||
|
*.secret.yaml
|
||||||
|
ntwl.sublime-workspace
|
||||||
|
|||||||
@ -9,12 +9,9 @@ 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 2-space indentation
|
- Use 4-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
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
### Media
|
### Media
|
||||||
|
|
||||||
|
[ ] move strix gmail to mnml
|
||||||
[ ] sabnzbd ini config map
|
[ ] sabnzbd ini config map
|
||||||
[ ] tdarr
|
[ ] tdarr
|
||||||
[ ] subtitle extractor
|
[ ] subtitle extractor
|
||||||
|
|||||||
@ -1,88 +1,67 @@
|
|||||||
---
|
# ---
|
||||||
|
|
||||||
apiVersion: v1
|
# kind: PersistentVolumeClaim
|
||||||
kind: PersistentVolume
|
# apiVersion: v1
|
||||||
metadata:
|
# metadata:
|
||||||
name: crates-postgres-backup-pv
|
# name: crates-postgres-backup-pvc
|
||||||
spec:
|
# spec:
|
||||||
storageClassName: ""
|
# volumeName: crates-postgres-backup-pv
|
||||||
capacity:
|
# accessModes:
|
||||||
storage: 1Gi
|
# - ReadWriteOnce
|
||||||
accessModes:
|
# resources:
|
||||||
- ReadWriteOnce
|
# requests:
|
||||||
persistentVolumeReclaimPolicy: Retain
|
# storage: 1Gi
|
||||||
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
|
|
||||||
|
|
||||||
---
|
# ---
|
||||||
|
|
||||||
kind: PersistentVolumeClaim
|
# apiVersion: batch/v1
|
||||||
apiVersion: v1
|
# kind: CronJob
|
||||||
metadata:
|
# metadata:
|
||||||
name: crates-postgres-backup-pvc
|
# name: crates-db-backup
|
||||||
spec:
|
# spec:
|
||||||
volumeName: crates-postgres-backup-pv
|
# schedule: "20 4 * * *"
|
||||||
accessModes:
|
# jobTemplate:
|
||||||
- ReadWriteOnce
|
# spec:
|
||||||
resources:
|
# template:
|
||||||
requests:
|
# metadata:
|
||||||
storage: 1Gi
|
# 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 "Backing up to $DEST"
|
||||||
|
# pg_dump --dbname=$POSTGRES_URL | gzip > $DEST
|
||||||
|
# echo "Backup Complete"
|
||||||
|
|
||||||
apiVersion: batch/v1
|
# echo "Removing old copies..."
|
||||||
kind: CronJob
|
# find . -type f -name "*.sql.gz" -mtime 7 | xargs rm -v
|
||||||
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 "Backing up to $DEST"
|
# echo "Setting latest link..."
|
||||||
pg_dump --dbname=$POSTGRES_URL | gzip > $DEST
|
# ln -nfs $DEST latest.sql.gz
|
||||||
echo "Backup Complete"
|
# 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 "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,6 +7,7 @@
|
|||||||
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"
|
||||||
@ -14,19 +15,9 @@ spec:
|
|||||||
ingressClassName: haproxy
|
ingressClassName: haproxy
|
||||||
tls:
|
tls:
|
||||||
- hosts:
|
- hosts:
|
||||||
- crates.strix.systems
|
- crates.ntwl.xyz
|
||||||
secretName: crates-strix-systems-tls
|
secretName: crates-ntwl-xyz-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:
|
||||||
@ -43,28 +34,18 @@ 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.strix.systems
|
- crates.ntwl.xyz
|
||||||
secretName: crates-strix-systems-tls
|
secretName: crates-ntwl-xyz-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:
|
||||||
|
|||||||
@ -1,35 +1,37 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: crates
|
||||||
|
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
# VOLUMES
|
# VOLUMES
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolume
|
|
||||||
metadata:
|
metadata:
|
||||||
name: crates-postgres-pv
|
name: crates-postgres-data
|
||||||
|
namespace: crates
|
||||||
spec:
|
spec:
|
||||||
storageClassName: ""
|
storageClassName: zfs-fast
|
||||||
capacity:
|
|
||||||
storage: 1Gi
|
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- ReadWriteOnce
|
||||||
persistentVolumeReclaimPolicy: Retain
|
resources:
|
||||||
claimRef:
|
requests:
|
||||||
namespace: default
|
storage: 2Gi
|
||||||
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-pvc
|
name: crates-postgres-bootstrap
|
||||||
|
namespace: crates
|
||||||
spec:
|
spec:
|
||||||
volumeName: crates-postgres-pv
|
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- ReadWriteOnce
|
||||||
resources:
|
resources:
|
||||||
@ -46,6 +48,7 @@ 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:
|
||||||
@ -80,17 +83,23 @@ 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-pvc
|
claimName: crates-postgres-data
|
||||||
|
- 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
|
||||||
@ -104,7 +113,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: crates-api
|
- name: crates-api
|
||||||
image: registry.strix.systems/crates-api
|
image: registry.ntwl.xyz/crates-api
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
@ -133,38 +142,32 @@ spec:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
apiVersion: apps/v1
|
apiVersion: v1
|
||||||
kind: Deployment
|
kind: Pod
|
||||||
metadata:
|
metadata:
|
||||||
|
namespace: crates
|
||||||
name: crates-migrate
|
name: crates-migrate
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
restartPolicy: OnFailure
|
||||||
selector:
|
containers:
|
||||||
matchLabels:
|
- name: crates-migrate
|
||||||
app: crates-migrate
|
image: registry.ntwl.xyz/crates-api
|
||||||
template:
|
imagePullPolicy: IfNotPresent
|
||||||
metadata:
|
command: ["npx"]
|
||||||
labels:
|
args: ["prisma", "migrate", "deploy"]
|
||||||
app: crates-migrate
|
env:
|
||||||
spec:
|
- name: DATABASE_URL
|
||||||
containers:
|
valueFrom:
|
||||||
- name: crates-migrate
|
secretKeyRef:
|
||||||
image: registry.strix.systems/crates-api
|
name: crates
|
||||||
imagePullPolicy: IfNotPresent
|
key: DATABASE_URL
|
||||||
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
|
||||||
@ -178,7 +181,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: crates-client
|
- name: crates-client
|
||||||
image: registry.strix.systems/crates-client
|
image: registry.ntwl.xyz/crates-client
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
@ -192,6 +195,7 @@ spec:
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
|
namespace: crates
|
||||||
name: crates-api
|
name: crates-api
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
@ -204,6 +208,7 @@ spec:
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
|
namespace: crates
|
||||||
name: crates-postgres
|
name: crates-postgres
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
@ -216,6 +221,7 @@ spec:
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
|
namespace: crates
|
||||||
name: crates-client
|
name: crates-client
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
|
|||||||
@ -33,6 +33,10 @@ 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
|
||||||
|
|||||||
@ -8,6 +8,7 @@ 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:
|
||||||
@ -20,7 +21,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: memestream-client
|
- name: memestream-client
|
||||||
image: registry.strix.systems/memestream-client
|
image: registry.ntwl.xyz/memestream-client
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
@ -37,6 +38,7 @@ 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
|
||||||
|
|||||||
@ -1,29 +1,23 @@
|
|||||||
|
---
|
||||||
|
|
||||||
apiVersion: networking.k8s.io/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: memestream-client
|
name: memestream
|
||||||
|
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:
|
||||||
- hosts:
|
- secretName: memestream-ntwl-xyz-tls
|
||||||
- memestream.strix.systems
|
hosts:
|
||||||
- search.memestream.strix.systems
|
- memestream.ntwl.xyz
|
||||||
- memestream.ntwl.xyz
|
- search.memestream.ntwl.xyz
|
||||||
- search.memestream.ntwl.xyz
|
- storage.memestream.ntwl.xyz
|
||||||
secretName: memestream-strix-systems-tls
|
- minio.memestream.ntwl.xyz
|
||||||
|
|
||||||
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:
|
||||||
@ -34,16 +28,7 @@ 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:
|
||||||
@ -53,4 +38,26 @@ spec:
|
|||||||
service:
|
service:
|
||||||
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
|
||||||
|
|||||||
115
memestream/memestream.minio.yaml
Normal file
115
memestream/memestream.minio.yaml
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
# -----------------------------------------------------------------------
|
||||||
|
# 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,26 +1,13 @@
|
|||||||
# -----------------------------------------------------------------------
|
|
||||||
# VOLUMES
|
|
||||||
# -----------------------------------------------------------------------
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolume
|
kind: Namespace
|
||||||
metadata:
|
metadata:
|
||||||
name: memestream-postgres-pv
|
name: memestream
|
||||||
spec:
|
|
||||||
storageClassName: ""
|
# -----------------------------------------------------------------------
|
||||||
capacity:
|
# VOLUMES
|
||||||
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
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -28,8 +15,9 @@ kind: PersistentVolumeClaim
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
metadata:
|
metadata:
|
||||||
name: memestream-postgres-pvc
|
name: memestream-postgres-pvc
|
||||||
|
namespace: memestream
|
||||||
spec:
|
spec:
|
||||||
volumeName: memestream-postgres-pv
|
storageClassName: fast
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- ReadWriteOnce
|
||||||
resources:
|
resources:
|
||||||
@ -38,32 +26,13 @@ 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:
|
||||||
volumeName: memestream-meili-pv
|
storageClassName: zfs-fast
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- ReadWriteOnce
|
||||||
resources:
|
resources:
|
||||||
@ -80,6 +49,7 @@ 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:
|
||||||
@ -92,7 +62,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: memestream-archiver
|
- name: memestream-archiver
|
||||||
image: registry.strix.systems/memestream-archiver
|
image: registry.ntwl.xyz/memestream-archiver
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
envFrom:
|
envFrom:
|
||||||
- secretRef:
|
- secretRef:
|
||||||
@ -104,6 +74,7 @@ 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:
|
||||||
@ -150,6 +121,7 @@ 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:
|
||||||
@ -176,8 +148,8 @@ spec:
|
|||||||
mountPath: /meili_data
|
mountPath: /meili_data
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
memory: "1Gi"
|
memory: "2Gi"
|
||||||
cpu: "1000m"
|
cpu: "2000m"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: memestream-meili-storage
|
- name: memestream-meili-storage
|
||||||
@ -195,6 +167,7 @@ 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
|
||||||
@ -207,8 +180,9 @@ 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
|
||||||
ports:
|
ports:
|
||||||
- port: 7700
|
- port: 7700
|
||||||
|
|||||||
@ -1,84 +1,45 @@
|
|||||||
---
|
---
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
# INGRESS
|
# COMBINED INGRESS
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
|
|
||||||
apiVersion: networking.k8s.io/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: mnml-client
|
name: mnml
|
||||||
annotations:
|
namespace: mnml
|
||||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
annotations:
|
||||||
|
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:
|
||||||
apiVersion: networking.k8s.io/v1
|
service:
|
||||||
kind: Ingress
|
name: mnml-api
|
||||||
metadata:
|
port:
|
||||||
name: mnml-api
|
number: 40000
|
||||||
namespace: default
|
- path: /api/ws
|
||||||
annotations:
|
pathType: Exact
|
||||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
backend:
|
||||||
haproxy.org/websocket-support: "true"
|
service:
|
||||||
spec:
|
name: mnml-ws
|
||||||
ingressClassName: haproxy
|
port:
|
||||||
tls:
|
number: 40055
|
||||||
- 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,35 +1,24 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
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:
|
||||||
volumeName: mnml-postgres-pv
|
storageClassName: fast
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- ReadWriteOnce
|
||||||
resources:
|
resources:
|
||||||
@ -38,38 +27,19 @@ 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:
|
||||||
volumeName: mnml-imgs-pv
|
storageClassName: fast
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- ReadWriteOnce
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 1Gi
|
storage: 2Gi
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -80,7 +50,9 @@ 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
|
||||||
@ -94,7 +66,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: postgres
|
- name: postgres
|
||||||
image: postgres:latest
|
image: postgres:16
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 5432
|
- containerPort: 5432
|
||||||
env:
|
env:
|
||||||
@ -126,7 +98,9 @@ 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
|
||||||
@ -140,7 +114,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: mnml-api
|
- name: mnml-api
|
||||||
image: registry.strix.systems/mnml-api
|
image: registry.ntwl.xyz/mnml-api
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 40000
|
- containerPort: 40000
|
||||||
@ -191,7 +165,9 @@ 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
|
||||||
@ -205,7 +181,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: mnml-client
|
- name: mnml-client
|
||||||
image: registry.strix.systems/mnml-client
|
image: registry.ntwl.xyz/mnml-client
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
@ -225,7 +201,9 @@ spec:
|
|||||||
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
|
|
||||||
metadata:
|
metadata:
|
||||||
|
namespace: mnml
|
||||||
name: mnml-api
|
name: mnml-api
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
@ -238,7 +216,9 @@ spec:
|
|||||||
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
|
|
||||||
metadata:
|
metadata:
|
||||||
|
namespace: mnml
|
||||||
name: mnml-ws
|
name: mnml-ws
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
@ -251,7 +231,9 @@ spec:
|
|||||||
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
|
|
||||||
metadata:
|
metadata:
|
||||||
|
namespace: mnml
|
||||||
name: mnml-postgres
|
name: mnml-postgres
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
@ -263,7 +245,9 @@ spec:
|
|||||||
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
|
|
||||||
metadata:
|
metadata:
|
||||||
|
namespace: mnml
|
||||||
name: mnml-client
|
name: mnml-client
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
|
|||||||
12
monitor/kube-prometheus.yaml
Normal file
12
monitor/kube-prometheus.yaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
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: |-
|
||||||
6
monitor/monitor.yaml
Normal file
6
monitor/monitor.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: monitor
|
||||||
@ -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
|
||||||
|
|||||||
@ -4,27 +4,17 @@ 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:
|
||||||
- strix.systems
|
- ntwl.xyz
|
||||||
- ntr.ntwl.xyz
|
|
||||||
secretName: strix-systems-tls
|
secretName: strix-systems-tls
|
||||||
rules:
|
rules:
|
||||||
- host: strix.systems
|
- host: ntwl.xyz
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- path: /
|
|
||||||
pathType: Prefix
|
|
||||||
backend:
|
|
||||||
service:
|
|
||||||
name: ntr-cv
|
|
||||||
port:
|
|
||||||
number: 8080
|
|
||||||
- host: ntr.ntwl.xyz
|
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: /
|
- path: /
|
||||||
|
|||||||
@ -1,5 +1,12 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: ntr-cv
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
# DEPLOYMENTS
|
# DEPLOYMENTS
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
@ -8,6 +15,7 @@ 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:
|
||||||
@ -20,7 +28,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: ntr-cv
|
- name: ntr-cv
|
||||||
image: registry.strix.systems/ntr-cv
|
image: registry.ntwl.xyz/ntr-cv
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
@ -37,6 +45,7 @@ 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
|
||||||
|
|||||||
8
ntwl.sublime-project
Normal file
8
ntwl.sublime-project
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"folders":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"path": "."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -1,30 +0,0 @@
|
|||||||
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
|
|
||||||
14
ops/kubeseal.yaml
Executable file
14
ops/kubeseal.yaml
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
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
|
||||||
39
ops/minio.ingress.yaml
Executable file
39
ops/minio.ingress.yaml
Executable file
@ -0,0 +1,39 @@
|
|||||||
|
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
|
||||||
33
storage/minio.yaml → ops/minio.yaml
Normal file → Executable file
33
storage/minio.yaml → ops/minio.yaml
Normal file → Executable file
@ -4,37 +4,18 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
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-pvc
|
name: minio-storage
|
||||||
|
namespace: ops
|
||||||
spec:
|
spec:
|
||||||
volumeName: minio-pv
|
storageClassName: zfs-fast
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- ReadWriteOnce
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 20Gi
|
storage: 100Gi
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -46,6 +27,7 @@ apiVersion: apps/v1
|
|||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: minio
|
name: minio
|
||||||
|
namespace: ops
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
@ -107,7 +89,7 @@ spec:
|
|||||||
volumes:
|
volumes:
|
||||||
- name: minio-storage
|
- name: minio-storage
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: minio-pvc
|
claimName: minio-storage
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
@ -115,7 +97,8 @@ spec:
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: minio-service
|
name: minio
|
||||||
|
namespace: ops
|
||||||
labels:
|
labels:
|
||||||
app: minio
|
app: minio
|
||||||
spec:
|
spec:
|
||||||
@ -11,20 +11,9 @@ 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:
|
||||||
|
|||||||
@ -4,6 +4,7 @@ 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"
|
||||||
@ -11,7 +12,6 @@ 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:
|
||||||
|
|||||||
@ -1,20 +0,0 @@
|
|||||||
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
|
|
||||||
29
ops/vlt.seal.json
Normal file
29
ops/vlt.seal.json
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"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
Normal file
62
ops/vlt.yaml
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
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,6 +3,7 @@ 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"
|
||||||
@ -10,10 +11,10 @@ spec:
|
|||||||
ingressClassName: haproxy
|
ingressClassName: haproxy
|
||||||
tls:
|
tls:
|
||||||
- hosts:
|
- hosts:
|
||||||
- spacerace.strix.systems
|
- spacerace.ntwl.xyz
|
||||||
secretName: spacerace-strix-systems-tls
|
secretName: spacerace-ntwl-xyz-tls
|
||||||
rules:
|
rules:
|
||||||
- host: spacerace.strix.systems
|
- host: spacerace.ntwl.xyz
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: /api(/|$)(.*)
|
- path: /api(/|$)(.*)
|
||||||
|
|||||||
@ -1,35 +1,38 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: spacerace
|
||||||
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
# VOLUMES
|
# VOLUMES
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolume
|
|
||||||
metadata:
|
metadata:
|
||||||
name: spacerace-postgres-pv
|
name: spacerace-postgres-data
|
||||||
|
namespace: spacerace
|
||||||
spec:
|
spec:
|
||||||
storageClassName: ""
|
storageClassName: zfs-fast
|
||||||
capacity:
|
|
||||||
storage: 1Gi
|
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- ReadWriteOnce
|
||||||
persistentVolumeReclaimPolicy: Retain
|
resources:
|
||||||
claimRef:
|
requests:
|
||||||
namespace: default
|
storage: 1Gi
|
||||||
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-pvc
|
name: spacerace-postgres-bootstrap
|
||||||
|
namespace: spacerace
|
||||||
spec:
|
spec:
|
||||||
volumeName: spacerace-postgres-pv
|
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- ReadWriteOnce
|
||||||
resources:
|
resources:
|
||||||
@ -46,6 +49,7 @@ 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:
|
||||||
@ -80,40 +84,46 @@ 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-pvc
|
claimName: spacerace-postgres-data
|
||||||
|
- 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
|
||||||
spec:
|
# namespace: spacerace
|
||||||
replicas: 1
|
# spec:
|
||||||
selector:
|
# replicas: 1
|
||||||
matchLabels:
|
# selector:
|
||||||
app: spacerace-api
|
# matchLabels:
|
||||||
template:
|
# app: spacerace-api
|
||||||
metadata:
|
# template:
|
||||||
labels:
|
# metadata:
|
||||||
app: spacerace-api
|
# labels:
|
||||||
spec:
|
# app: spacerace-api
|
||||||
containers:
|
# spec:
|
||||||
- name: spacerace-api
|
# containers:
|
||||||
image: registry.strix.systems/spacerace-api
|
# - name: spacerace-api
|
||||||
imagePullPolicy: IfNotPresent
|
# image: registry.ntwl.xyz/spacerace-api
|
||||||
ports:
|
# imagePullPolicy: IfNotPresent
|
||||||
- containerPort: 80
|
# ports:
|
||||||
env:
|
# - containerPort: 80
|
||||||
- name: CONNECTIONSTRINGS__SPACERACE
|
# env:
|
||||||
valueFrom:
|
# - name: CONNECTIONSTRINGS__SPACERACE
|
||||||
secretKeyRef:
|
# valueFrom:
|
||||||
name: spacerace
|
# secretKeyRef:
|
||||||
key: CONNECTIONSTRINGS__SPACERACE
|
# name: spacerace
|
||||||
|
# key: CONNECTIONSTRINGS__SPACERACE
|
||||||
---
|
---
|
||||||
|
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
@ -124,6 +134,7 @@ 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
|
||||||
@ -135,6 +146,7 @@ spec:
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
|
namespace: spacerace
|
||||||
name: spacerace-postgres
|
name: spacerace-postgres
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
|
|||||||
@ -10,7 +10,6 @@ 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:
|
||||||
@ -50,20 +49,9 @@ spec:
|
|||||||
ingressClassName: haproxy
|
ingressClassName: haproxy
|
||||||
tls:
|
tls:
|
||||||
- hosts:
|
- hosts:
|
||||||
- storage.strix.systems
|
|
||||||
- storage.ntwl.xyz
|
- storage.ntwl.xyz
|
||||||
secretName: storage.strix.systems
|
secretName: storage.ntwl.xyz
|
||||||
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:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user