Pterodactyl++

This commit is contained in:
Danny Bessems 2025-06-07 13:21:56 +10:00
parent a09a513977
commit 30ada6e0f2
15 changed files with 301 additions and 0 deletions

View File

@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: pterodactyl

View File

@ -0,0 +1,17 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: pterodactyl
namespace: argo-cd
spec:
destination:
namespace: pterodactyl
server: https://kubernetes.default.svc
project: default
source:
path: services/Pterodactyl
repoURL: https://code.spamasaurus.com/djpbessems/Kubernetes.K3s.installLog.git
targetRevision: HEAD
syncPolicy:
automated:
selfHeal: true

View File

@ -0,0 +1,86 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: pterodactyl
namespace: pterodactyl
labels:
app: pterodactyl
spec:
replicas: 1
selector:
matchLabels:
app: pterodactyl
template:
metadata:
labels:
app: pterodactyl
spec:
containers:
- name: app
image: ghcr.io/pterodactyl/panel:latest
imagePullPolicy: Always
env:
- name: APP_URL
value: https://games.spamasaurus.com
- name: DB_HOST
value: pterodactyl.pterodactyl.svc.cluster.local
- name: DB_PORT
value: '3306'
- name: REDIS_HOST
value: pterodactyl.pterodactyl.svc.cluster.local
envFrom:
- secretRef:
name: pterodactyl-db-secret
ports:
- name: web
containerPort: 80
volumeMounts:
- mountPath: /app/var
name: flexvolsmb-pterodactyl-data
- mountPath: /etc/nginx/http.d/
name: flexvolsmb-pterodactyl-proxy
- mountPath: /app/storage/logs
name: flexvolsmb-pterodactyl-logs
- name: db
image: mariadb:10.5
args:
- --default-authentication-plugin=mysql_native_password
env:
- name: MYSQL_DATABASE
value: panel
- name: MYSQL_USER
value: pterodactyl
envFrom:
- secretRef:
name: pterodactyl-db-secret
volumeMounts:
- name: flexvolsmb-pterodactyl-db
mountPath: var/lib/mysql
ports:
- name: db
containerPort: 3306
# livenessProbe:
# exec:
# command: ["pg_isready" ,"-U" ,"$POSTGRES_USER", "-d" ,"$POSTGRES_DATABASE"]
- name: redis
image: redis:alpine
ports:
- name: redis
containerPort: 6379
# volumeMounts:
# - name: flexvolsmb-pterodactyl-redis
# mountPath: /data
volumes:
- name: flexvolsmb-pterodactyl-data
persistentVolumeClaim:
claimName: flexvolsmb-pterodactyl-data
- name: flexvolsmb-pterodactyl-proxy
persistentVolumeClaim:
claimName: flexvolsmb-pterodactyl-proxy
- name: flexvolsmb-pterodactyl-db
persistentVolumeClaim:
claimName: flexvolsmb-pterodactyl-db
- name: flexvolsmb-pterodactyl-logs
persistentVolumeClaim:
claimName: flexvolsmb-pterodactyl-logs

View File

@ -0,0 +1,17 @@
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: pterodactyl
namespace: pterodactyl
spec:
entryPoints:
- websecure
routes:
- match: Host(`games.spamasaurus.com`)
kind: Rule
services:
- name: pterodactyl
port: 80
middlewares:
- name: security-headers@file
# - name: compression@file

View File

@ -0,0 +1,19 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: flexvolsmb-pterodactyl-data
namespace: pterodactyl
spec:
capacity:
storage: 1Gi
accessModes:
- ReadWriteMany
storageClassName: flexvolsmb-pterodactyl-data
flexVolume:
driver: mount/smb
secretRef:
name: flexvolsmb-credentials
options:
opts: file_mode=0600,dir_mode=0700,uid=100,gid=101,iocharset=utf8,nobrl
server: 192.168.154.195
share: /K3s.Volumes/pterodactyl/data

View File

@ -0,0 +1,19 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: flexvolsmb-pterodactyl-db
namespace: pterodactyl
spec:
capacity:
storage: 1Gi
accessModes:
- ReadWriteMany
storageClassName: flexvolsmb-pterodactyl-db
flexVolume:
driver: mount/smb
secretRef:
name: flexvolsmb-credentials
options:
opts: file_mode=0600,dir_mode=0700,uid=999,gid=999,iocharset=utf8,nobrl
server: 192.168.154.195
share: /K3s.Volumes/pterodactyl/db

View File

@ -0,0 +1,19 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: flexvolsmb-pterodactyl-logs
namespace: pterodactyl
spec:
capacity:
storage: 1Gi
accessModes:
- ReadWriteMany
storageClassName: flexvolsmb-pterodactyl-logs
flexVolume:
driver: mount/smb
secretRef:
name: flexvolsmb-credentials
options:
opts: file_mode=0600,dir_mode=0700,uid=100,gid=101,iocharset=utf8,nobrl
server: 192.168.154.195
share: /K3s.Volumes/pterodactyl/logs

View File

@ -0,0 +1,19 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: flexvolsmb-pterodactyl-proxy
namespace: pterodactyl
spec:
capacity:
storage: 1Gi
accessModes:
- ReadWriteMany
storageClassName: flexvolsmb-pterodactyl-proxy
flexVolume:
driver: mount/smb
secretRef:
name: flexvolsmb-credentials
options:
opts: file_mode=0600,dir_mode=0700,uid=100,gid=101,iocharset=utf8,nobrl
server: 192.168.154.195
share: /K3s.Volumes/pterodactyl/proxy

View File

@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: flexvolsmb-pterodactyl-data
namespace: pterodactyl
spec:
accessModes:
- ReadWriteMany
storageClassName: flexvolsmb-pterodactyl-data
resources:
requests:
storage: 1Gi

View File

@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: flexvolsmb-pterodactyl-db
namespace: pterodactyl
spec:
accessModes:
- ReadWriteMany
storageClassName: flexvolsmb-pterodactyl-db
resources:
requests:
storage: 1Gi

View File

@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: flexvolsmb-pterodactyl-logs
namespace: pterodactyl
spec:
accessModes:
- ReadWriteMany
storageClassName: flexvolsmb-pterodactyl-logs
resources:
requests:
storage: 1Gi

View File

@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: flexvolsmb-pterodactyl-proxy
namespace: pterodactyl
spec:
accessModes:
- ReadWriteMany
storageClassName: flexvolsmb-pterodactyl-proxy
resources:
requests:
storage: 1Gi

View File

@ -0,0 +1,16 @@
apiVersion: bitnami.com/v1alpha1
kind: SealedSecret
metadata:
creationTimestam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rrNxTGV87KudhAw2F/Rq9Bo4p6B6wDji4bIChwZ4OF+mwwMnNR0+Jy7pnG9BeiVMP4FZ9uG2LY5kU7mOhcr71FLGcWiDAGpsPNUKJuyWPGfnwVanho9IR93eTot0oX33quf4gbYWiF19EyFX+ig6D7Rvf4svVkURa8UkwSa5vSbz+fKBVgwD5GB/XL/ZCTSldMEb7xVVGJ+p9vKRnIn0KyEjz60pEYXo0oRwlAAkhh2WLN3iRYP5NgpdX5J1ED40Gnz6yMqWyBzhVNRrFz+on4PGbEkhTvxmVQxJjbGzkh4sAcjrjqN2vlMNhXYNAGwBRDUvzJBJC4W1C8f6VZ7+1dVdXi3UQPo64coE+qAOH52ZyTXUXCcnhPLEZMgLNpdZ5pEEruhu2M5zVo5N1Pt9Fn36ie0WjIacz56VjpmZT8=
template:
metadata:
creationTimestamp: null
name: flexvolsmb-credentials
namespace: pterodactyl
type: mount/smb

View File

@ -0,0 +1,19 @@
apiVersion: bitnami.com/v1alpha1
kind: SealedSecret
metadata:
creationTimestamp: null
name: pterodactyl-db-secret
namespace: pterodactyl
spec:
encryptedData:
DB_PASSWORD: AgBPIDe8E4g5ue5RpQd1JSMOPevGn2vaQSttFx1GVhH8gYR7bBMXnTlpxtp6wkCM4Xpbsvc6I/eFMvEaIL5nkdD8Bv/R2OfWrHp5U0RNQwkRP5XyDwWSYSOlvAXh8aBAkiZCopv9P32QZl7EnOvx1wNexvhzaOolkSipMLBQ/T+Z6POI0EB1DaYYFgUEatjc10GwNIHOjAU3NKY3Ka3QoQXtIF5lkDlwz20jd/iKMCSJsi75eBIDhrHN5xsK8wenBMrSnxePTg0C+9L9bX17sqLZx7PQkrxRtNe+bWaFqD8tKnPC53IKYgagoK6S3YFgA5JMOTdcIoQwb9bKbH8Cg+/IBvToTcx7ofMq27Ed8cmvrn8yJeTazq1YzuWh1mfPLjTD3ioIrPeEzAEx4pacN4Rb/oaAUGjO99JmeyAHmGybCnDFfbYTqDILPrn/Jh25Dc6g3ORG7DIS6h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tvr38SWgObepjgV1alSR1Ee6VFyhrWqg0SwPSpix7+aglMTKrUfGRazatNgxGG/5PJu4hMNaezvH5bCk5eGPEGVgFJhuwEPsdOusf3J+JsL0OW8Ly0v3t3Re44ADIAq9F9cCO/esT0gqMsrrVD61+ke5q4UrmsN0bcUDCA7rOp+M3gnA8KTXhFap0ZQbATx/7VMpGgRWlKHiHE4mNo+Kjcog0vCJlvLHOW+sguXH1S1LDrtfGmHvnTWu/FEw/MO4aXwzmSeK/BbxtdUjSizL9hwgil0tAoPjqtMJ3CQMlbHKrXjL3tNfAMlSPZt1jG6XeFQpTfem1WpxwbTmHPVgK/+Ps8b4kLF7dXAI8m1arK6QCqsZCiqo5ToSehDueAQUfjicWf/7i11YAgT6XhXBfKSBIBmS9Y4LOoakGBT5gctEEZi2i5pZaUSjuKjez/raw33LT6twOjeLpynO8KfOW1K9EGIUM9XDFc5LQciYAmeCHdU8nNSa1Pk/ZwKUPeG01V8NotvGJtV4pUl9POSY7x/hguEoz+n0w6nuIHAHBCoTo4iNu757wZDPn8QeJhTpYKJ2qR5gvYxoBOuLqaxr059X8TfakrLoCRxn5XTcyztXi63bR5/OWBRJ8ChPzhmSZZOfeS90Q3Tc4kpuIBDA==
template:
metadata:
creationTimestamp: null
labels:
app: pterodactyl
name: pterodactyl-db-secret
namespace: pterodactyl
type: Opaque

View File

@ -0,0 +1,18 @@
apiVersion: v1
kind: Service
metadata:
name: pterodactyl
namespace: pterodactyl
spec:
ports:
- protocol: TCP
name: web
port: 80
- protocol: TCP
name: db
port: 3306
- protocol: TCP
name: redis
port: 6379
selector:
app: pterodactyl