Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8c8a11d82d | |||
| ae7a2ff9c7 | |||
| 8414194867 | |||
| 342264d178 | |||
| 1cfb947ae6 | |||
| 43976cb1a1 | |||
| c6f3eab1d8 | |||
| 4ab4642c9c | |||
| 27fbe1ecac | |||
| 6f9c6c028e | |||
| 782c787430 | |||
| 7b6a43318b | |||
| ccd5b4474e | |||
| 73e90cecbb | |||
| ea5a452327 | |||
| 52388ec19f | |||
| db22643ecc | |||
| c7ca361bfd | |||
| 52aba07993 | |||
| 3f10de4965 | |||
| b1699a0c95 | |||
| 904ad9a8e8 |
@@ -0,0 +1,48 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: n8n
|
||||||
|
namespace: apps
|
||||||
|
labels:
|
||||||
|
app: n8n
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: n8n
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: n8n
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: n8n
|
||||||
|
image: n8nio/n8n:1.57.0
|
||||||
|
ports:
|
||||||
|
- containerPort: 5678
|
||||||
|
env:
|
||||||
|
- name: N8N_HOST
|
||||||
|
value: "n8n.khalisio.com"
|
||||||
|
- name: N8N_PROTOCOL
|
||||||
|
value: "https"
|
||||||
|
- name: WEBHOOK_URL
|
||||||
|
value: "https://n8n.khalisio.com/"
|
||||||
|
- name: N8N_ENCRYPTION_KEY
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: n8n-secret
|
||||||
|
key: N8N_ENCRYPTION_KEY
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 200m
|
||||||
|
memory: 256Mi
|
||||||
|
limits:
|
||||||
|
cpu: 1000m
|
||||||
|
memory: 1Gi
|
||||||
|
volumeMounts:
|
||||||
|
- name: n8n-data
|
||||||
|
mountPath: /home/node/.n8n
|
||||||
|
volumes:
|
||||||
|
- name: n8n-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: n8n-data
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
apiVersion: external-secrets.io/v1
|
||||||
|
kind: ExternalSecret
|
||||||
|
metadata:
|
||||||
|
name: n8n-secret
|
||||||
|
namespace: apps
|
||||||
|
spec:
|
||||||
|
refreshInterval: 1h
|
||||||
|
secretStoreRef:
|
||||||
|
name: orion-vault
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
target:
|
||||||
|
name: n8n-secret
|
||||||
|
creationPolicy: Owner
|
||||||
|
data:
|
||||||
|
- secretKey: N8N_SECRET_KEY
|
||||||
|
remoteRef:
|
||||||
|
key: n8n
|
||||||
|
property: N8N_SECRET_KEY
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
apiVersion: traefik.io/v1alpha1
|
||||||
|
kind: IngressRoute
|
||||||
|
metadata:
|
||||||
|
name: n8n
|
||||||
|
namespace: apps
|
||||||
|
spec:
|
||||||
|
entryPoints:
|
||||||
|
- websecure
|
||||||
|
routes:
|
||||||
|
- match: Host(`n8n.khalisio.com`)
|
||||||
|
kind: Rule
|
||||||
|
services:
|
||||||
|
- name: n8n
|
||||||
|
port: 80
|
||||||
|
tls:
|
||||||
|
secretName: n8n-tls
|
||||||
|
certResolver: letsencrypt
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: n8n-data
|
||||||
|
namespace: apps
|
||||||
|
spec:
|
||||||
|
accessModes: [ReadWriteOnce]
|
||||||
|
storageClassName: longhorn
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 5Gi
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: n8n
|
||||||
|
namespace: apps
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: n8n
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 5678
|
||||||
|
type: ClusterIP
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
apiVersion: longhorn.io/v1beta2
|
||||||
|
kind: RecurringJob
|
||||||
|
metadata:
|
||||||
|
name: daily-snapshot
|
||||||
|
namespace: longhorn-system
|
||||||
|
spec:
|
||||||
|
cron: "0 1 * * *"
|
||||||
|
task: snapshot
|
||||||
|
retain: 7
|
||||||
|
concurrency: 2
|
||||||
|
labels:
|
||||||
|
backup-tier: daily
|
||||||
|
---
|
||||||
|
apiVersion: longhorn.io/v1beta2
|
||||||
|
kind: RecurringJob
|
||||||
|
metadata:
|
||||||
|
name: weekly-backup
|
||||||
|
namespace: longhorn-system
|
||||||
|
spec:
|
||||||
|
cron: "0 3 * * 0"
|
||||||
|
task: backup
|
||||||
|
retain: 4
|
||||||
|
concurrency: 1
|
||||||
|
labels:
|
||||||
|
backup-tier: weekly
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: backups
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/managed-by: argocd
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
apiVersion: batch/v1
|
||||||
|
kind: CronJob
|
||||||
|
metadata:
|
||||||
|
name: pelican-pg-backup
|
||||||
|
namespace: backups
|
||||||
|
spec:
|
||||||
|
schedule: "0 2 * * *"
|
||||||
|
concurrencyPolicy: Forbid
|
||||||
|
successfulJobsHistoryLimit: 3
|
||||||
|
failedJobsHistoryLimit: 3
|
||||||
|
jobTemplate:
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
spec:
|
||||||
|
restartPolicy: OnFailure
|
||||||
|
containers:
|
||||||
|
- name: pg-dump
|
||||||
|
image: postgres:16-alpine
|
||||||
|
env:
|
||||||
|
- name: PGPASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: pelican-pg-backup-credentials
|
||||||
|
key: password
|
||||||
|
- name: PGHOST
|
||||||
|
value: postgresql.pelican.svc.cluster.local
|
||||||
|
- name: PGUSER
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: pelican-pg-backup-credentials
|
||||||
|
key: username
|
||||||
|
- name: PGDATABASE
|
||||||
|
value: pelican
|
||||||
|
command:
|
||||||
|
- /bin/sh
|
||||||
|
- -c
|
||||||
|
- |
|
||||||
|
set -e
|
||||||
|
BACKUP_DIR=/backups/pelican
|
||||||
|
mkdir -p "$BACKUP_DIR"
|
||||||
|
FILENAME="$BACKUP_DIR/pelican-$(date +%Y%m%d-%H%M%S).sql.gz"
|
||||||
|
pg_dump -h "$PGHOST" -U "$PGUSER" -d "$PGDATABASE" | gzip > "$FILENAME"
|
||||||
|
echo "Backup written: $FILENAME"
|
||||||
|
find "$BACKUP_DIR" -name '*.sql.gz' -mtime +7 -delete
|
||||||
|
echo "Retention cleanup done (keeping 7 days)"
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 128Mi
|
||||||
|
limits:
|
||||||
|
cpu: 500m
|
||||||
|
memory: 512Mi
|
||||||
|
volumeMounts:
|
||||||
|
- name: backup-storage
|
||||||
|
mountPath: /backups
|
||||||
|
volumes:
|
||||||
|
- name: backup-storage
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: backup-storage
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
apiVersion: external-secrets.io/v1beta1
|
||||||
|
kind: ExternalSecret
|
||||||
|
metadata:
|
||||||
|
name: pelican-pg-backup-credentials
|
||||||
|
namespace: backups
|
||||||
|
spec:
|
||||||
|
refreshInterval: 1h
|
||||||
|
secretStoreRef:
|
||||||
|
name: vault-backend
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
target:
|
||||||
|
name: pelican-pg-backup-credentials
|
||||||
|
creationPolicy: Owner
|
||||||
|
data:
|
||||||
|
- secretKey: username
|
||||||
|
remoteRef:
|
||||||
|
key: Talos Cluster/pelican/panel/db
|
||||||
|
property: DB_USER
|
||||||
|
- secretKey: password
|
||||||
|
remoteRef:
|
||||||
|
key: Talos Cluster/pelican/panel/db
|
||||||
|
property: DB_PASSWORD
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: backup-storage
|
||||||
|
namespace: backups
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
storageClassName: longhorn
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 50Gi
|
||||||
@@ -2,7 +2,7 @@ apiVersion: apps/v1
|
|||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: transmission
|
name: transmission
|
||||||
namespace: media
|
namespace: apps
|
||||||
labels:
|
labels:
|
||||||
app: transmission
|
app: transmission
|
||||||
spec:
|
spec:
|
||||||
@@ -10,76 +10,58 @@ spec:
|
|||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: transmission
|
app: transmission
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: transmission
|
app: transmission
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: gluetun
|
|
||||||
image: ghcr.io/qmcgaw/gluetun:v3.40.0
|
|
||||||
env:
|
|
||||||
- name: OPENVPN_PROVIDER
|
|
||||||
value: "PROTONVPN"
|
|
||||||
- name: OPENVPN_USERNAME
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: transmission-vpn-secret
|
|
||||||
key: username
|
|
||||||
- name: OPENVPN_PASSWORD
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: transmission-vpn-secret
|
|
||||||
key: password
|
|
||||||
- name: SERVER_COUNTRIES
|
|
||||||
value: "US"
|
|
||||||
- name: FIREWALL_ENABLED
|
|
||||||
value: "off"
|
|
||||||
- name: DOT_ENABLED
|
|
||||||
value: "true"
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
containerPort: 8000
|
|
||||||
volumeMounts:
|
|
||||||
- name: config
|
|
||||||
mountPath: /config
|
|
||||||
- name: transmission
|
- name: transmission
|
||||||
image: lscr.io/linuxserver/transmission:latest
|
image: lscr.io/linuxserver/transmission:latest
|
||||||
|
ports:
|
||||||
|
- name: web
|
||||||
|
containerPort: 9091
|
||||||
|
protocol: TCP
|
||||||
|
- name: peer
|
||||||
|
containerPort: 51413
|
||||||
|
protocol: TCP
|
||||||
|
- name: peer-udp
|
||||||
|
containerPort: 51413
|
||||||
|
protocol: UDP
|
||||||
env:
|
env:
|
||||||
- name: PUID
|
- name: PUID
|
||||||
value: "1000"
|
value: "1000"
|
||||||
- name: PGID
|
- name: PGID
|
||||||
value: "1000"
|
value: "1000"
|
||||||
- name: TZ
|
- name: TZ
|
||||||
value: "America/New_York"
|
value: "Etc/UTC"
|
||||||
- name: USER
|
|
||||||
value: "admin"
|
|
||||||
- name: PASS
|
|
||||||
value: "admin"
|
|
||||||
- name: TRANSMISSION_WEB_HOME
|
- name: TRANSMISSION_WEB_HOME
|
||||||
value: "/combui"
|
value: "/web/":"
|
||||||
- name: PEER_PORT
|
volumeMounts:
|
||||||
valueFrom:
|
- name: config
|
||||||
configMapKeyRef:
|
mountPath: /config
|
||||||
name: transmission-config
|
- name: data
|
||||||
key: peer-port
|
mountPath: /data
|
||||||
ports:
|
- name: gluetun
|
||||||
- name: http
|
image: qmcgaw/gluetun:latest
|
||||||
containerPort: 9091
|
env:
|
||||||
- name: peer
|
- name: VPN_SERVICE_PROVIDER
|
||||||
containerPort: 0
|
value: "protonvpn"
|
||||||
protocol: TCP
|
- name: VPN_TYPE
|
||||||
- name: peer-udp
|
value: "wireguard"
|
||||||
containerPort: 0
|
ports:
|
||||||
protocol: UDP
|
- name: https
|
||||||
|
containerPort: 443
|
||||||
|
protocol: TCP
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: config
|
- name: config
|
||||||
mountPath: /config
|
mountPath: /config
|
||||||
- name: downloads
|
|
||||||
mountPath: /downloads
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: config
|
- name: config
|
||||||
emptyDir: {}
|
|
||||||
- name: downloads
|
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: media-data
|
claimName: transmission-config-claim
|
||||||
|
- name: data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: transmission-data-claim
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: tailscale-operator
|
||||||
|
namespace: tailscale
|
||||||
|
labels:
|
||||||
|
app: tailscale-operator
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: tailscale-operator
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: tailscale-operator
|
||||||
|
spec:
|
||||||
|
serviceAccountName: tailscale-operator
|
||||||
|
containers:
|
||||||
|
- name: tailscale-operator
|
||||||
|
image: ghcr.io/tailscale/tailscale-operator:v1.78.0
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
env:
|
||||||
|
- name: TS_AUTH_KEY
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: tailscale-auth
|
||||||
|
key: TS_AUTH_KEY
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 128Mi
|
||||||
|
limits:
|
||||||
|
cpu: 500m
|
||||||
|
memory: 512Mi
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
apiVersion: external-secrets.io/v1
|
||||||
|
kind: ExternalSecret
|
||||||
|
metadata:
|
||||||
|
name: tailscale-auth
|
||||||
|
namespace: tailscale
|
||||||
|
spec:
|
||||||
|
refreshInterval: 1h
|
||||||
|
secretStoreRef:
|
||||||
|
name: orion-vault
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
target:
|
||||||
|
name: tailscale-auth
|
||||||
|
creationPolicy: Owner
|
||||||
|
data:
|
||||||
|
- secretKey: TS_AUTH_KEY
|
||||||
|
remoteRef:
|
||||||
|
key: secret/tailscale
|
||||||
|
property: TS_AUTH_KEY
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: tailscale
|
||||||
|
labels:
|
||||||
|
app: tailscale
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: tailscale-operator
|
||||||
|
namespace: tailscale
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: tailscale-operator
|
||||||
|
rules:
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods", "services", "secrets", "configmaps", "nodes"]
|
||||||
|
verbs: ["get", "list", "watch"]
|
||||||
|
- apiGroups: ["networking.k8s.io"]
|
||||||
|
resources: ["ingresses"]
|
||||||
|
verbs: ["get", "list", "watch", "update"]
|
||||||
|
- apiGroups: ["tailscale.com"]
|
||||||
|
resources: ["*"]
|
||||||
|
verbs: ["*"]
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: tailscale-operator
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: tailscale-operator
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: tailscale-operator
|
||||||
|
namespace: tailscale
|
||||||
Reference in New Issue
Block a user