Compare commits
42 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3ab8a15189 | |||
| 38703cfa9f | |||
| 6f85288138 | |||
| 484a0a1f79 | |||
| 8827f5f8d1 | |||
| e24a9e4389 | |||
| 928b3dcfce | |||
| b7fa149297 | |||
| 2f6bd457b7 | |||
| 9a3f5ba344 | |||
| 0f667bdb5b | |||
| 2aeb3be256 | |||
| 77fded0e99 | |||
| 9be88040a3 | |||
| 8ec36c72fb | |||
| 4a14e3f6d0 | |||
| c045e7698c | |||
| e9673606c8 | |||
| 29e90352cb | |||
| c87944b3c3 | |||
| dd00e71632 | |||
| 0e225e1278 | |||
| da8a88b949 | |||
| 0a53d8e0c8 | |||
| 1fe9a17874 | |||
| f8318860c8 | |||
| 45f6a49863 | |||
| 6a88b2d6dd | |||
| 92ac61ff37 | |||
| af05ba5105 | |||
| 90fded0414 | |||
| e13d468bbf | |||
| 6e4c3d75ad | |||
| f7141b5d49 | |||
| b127b5969d | |||
| 395924acca | |||
| 002df812ad | |||
| ef6365f0bd | |||
| 4eafe1a274 | |||
| 5f017dcb7d | |||
| b3f293dfae | |||
| d5c5df166f |
@@ -0,0 +1,6 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: apps
|
||||||
|
labels:
|
||||||
|
kubernetes.io/metadata.name: apps
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: game-servers
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: game-servers
|
||||||
|
app.kubernetes.io/managed-by: orion
|
||||||
@@ -0,0 +1,121 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: wings-ark-sa
|
||||||
|
namespace: game-servers
|
||||||
|
labels:
|
||||||
|
app: wings-ark-sa
|
||||||
|
game: ark-sa
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: wings-ark-sa
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: wings-ark-sa
|
||||||
|
game: ark-sa
|
||||||
|
spec:
|
||||||
|
nodeSelector:
|
||||||
|
kubernetes.io/arch: amd64
|
||||||
|
affinity:
|
||||||
|
podAntiAffinity:
|
||||||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- labelSelector:
|
||||||
|
matchExpressions:
|
||||||
|
- key: game
|
||||||
|
operator: In
|
||||||
|
values: [ark-sa]
|
||||||
|
topologyKey: "kubernetes.io/hostname"
|
||||||
|
volumes:
|
||||||
|
- name: wings-config
|
||||||
|
secret:
|
||||||
|
secretName: wings-ark-sa-config
|
||||||
|
- name: game-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: wings-ark-sa-data
|
||||||
|
- name: docker-socket
|
||||||
|
emptyDir: {}
|
||||||
|
- name: autostart-token
|
||||||
|
secret:
|
||||||
|
secretName: pelican-autostart-key
|
||||||
|
containers:
|
||||||
|
- name: dind
|
||||||
|
image: docker:dind
|
||||||
|
args:
|
||||||
|
- "--storage-driver=vfs"
|
||||||
|
- "--iptables=false"
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
volumeMounts:
|
||||||
|
- name: docker-socket
|
||||||
|
mountPath: /var/run/docker.sock
|
||||||
|
env:
|
||||||
|
- name: DOCKER_TLS_CERTDIR
|
||||||
|
value: ""
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: "500m"
|
||||||
|
memory: "512Mi"
|
||||||
|
limits:
|
||||||
|
cpu: "1"
|
||||||
|
memory: "1Gi"
|
||||||
|
- name: wings
|
||||||
|
image: ghcr.io/pelican-dev/wings:latest
|
||||||
|
command:
|
||||||
|
- /bin/sh
|
||||||
|
- -c
|
||||||
|
- |
|
||||||
|
export DOCKER_HOST=tcp://localhost:2375
|
||||||
|
exec wings
|
||||||
|
envFrom:
|
||||||
|
- secretRef:
|
||||||
|
name: wings-ark-sa-config
|
||||||
|
env:
|
||||||
|
- name: DOCKER_HOST
|
||||||
|
value: tcp://localhost:2375
|
||||||
|
- name: WATCHDOG_ENABLED
|
||||||
|
value: "true"
|
||||||
|
volumeMounts:
|
||||||
|
- name: wings-config
|
||||||
|
mountPath: /etc/pterodactyl
|
||||||
|
readOnly: true
|
||||||
|
- name: game-data
|
||||||
|
mountPath: /mnt/server
|
||||||
|
- name: docker-socket
|
||||||
|
mountPath: /var/run/docker.sock
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: "2"
|
||||||
|
memory: "4Gi"
|
||||||
|
limits:
|
||||||
|
cpu: "4"
|
||||||
|
memory: "8Gi"
|
||||||
|
- name: game-autostart
|
||||||
|
image: curlimages/curl:latest
|
||||||
|
command:
|
||||||
|
- /bin/sh
|
||||||
|
- -c
|
||||||
|
- |
|
||||||
|
while true; do
|
||||||
|
sleep 60
|
||||||
|
curl -sf -X POST "https://pelican.khalisio.com/api/client/servers/3fd0b08d-7393-4d0f-b11c-bad5e1d1f771/power" \
|
||||||
|
-H "Authorization: Bearer $(cat /etc/secrets/autostart/api_key)" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{"signal":"start"}' > /dev/null 2>&1 || true
|
||||||
|
done
|
||||||
|
volumeMounts:
|
||||||
|
- name: autostart-token
|
||||||
|
mountPath: /etc/secrets/autostart
|
||||||
|
readOnly: true
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: "50m"
|
||||||
|
memory: "64Mi"
|
||||||
|
limits:
|
||||||
|
cpu: "100m"
|
||||||
|
memory: "128Mi"
|
||||||
|
restartPolicy: Always
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
apiVersion: external-secrets.io/v1beta1
|
||||||
|
kind: ExternalSecret
|
||||||
|
metadata:
|
||||||
|
name: wings-ark-sa-config
|
||||||
|
namespace: game-servers
|
||||||
|
spec:
|
||||||
|
refreshInterval: 1h
|
||||||
|
secretStoreRef:
|
||||||
|
name: vault
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
target:
|
||||||
|
name: wings-ark-sa-config
|
||||||
|
creationPolicy: Owner
|
||||||
|
data:
|
||||||
|
- secretKey: WINGS_UUID
|
||||||
|
remoteRef:
|
||||||
|
key: wings/ark-sa
|
||||||
|
property: uuid
|
||||||
|
- secretKey: WINGS_TOKEN
|
||||||
|
remoteRef:
|
||||||
|
key: wings/ark-sa
|
||||||
|
property: token
|
||||||
|
- secretKey: LOCALE
|
||||||
|
remoteRef:
|
||||||
|
key: wings/ark-sa
|
||||||
|
property: locale
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
apiVersion: traefik.containo.us/v1alpha1
|
||||||
|
kind: IngressRoute
|
||||||
|
metadata:
|
||||||
|
name: wings-ark-sa-api
|
||||||
|
namespace: game-servers
|
||||||
|
spec:
|
||||||
|
entryPoints:
|
||||||
|
- websecure
|
||||||
|
tls:
|
||||||
|
secretName: wings-ark-sa-tls
|
||||||
|
routes:
|
||||||
|
- match: Host(`wings-ark-sa.khalisio.com`)
|
||||||
|
kind: Rule
|
||||||
|
services:
|
||||||
|
- name: wings-ark-sa-api
|
||||||
|
port: 8081
|
||||||
|
scheme: https
|
||||||
|
serversTransport: wings-ark-sa-st
|
||||||
|
---
|
||||||
|
apiVersion: traefik.io/v1alpha1
|
||||||
|
kind: ServersTransport
|
||||||
|
metadata:
|
||||||
|
name: wings-ark-sa-st
|
||||||
|
namespace: game-servers
|
||||||
|
spec:
|
||||||
|
serverTransport:
|
||||||
|
insecureSkipVerify: true
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: wings-ark-sa-data
|
||||||
|
namespace: game-servers
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
storageClassName: longhorn
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 150Gi
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: wings-ark-sa-api
|
||||||
|
namespace: game-servers
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- name: api
|
||||||
|
port: 8081
|
||||||
|
targetPort: 8081
|
||||||
|
protocol: TCP
|
||||||
|
- name: sftp
|
||||||
|
port: 2023
|
||||||
|
targetPort: 2023
|
||||||
|
protocol: TCP
|
||||||
|
selector:
|
||||||
|
app: wings-ark-sa
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: wings-ark-sa-game
|
||||||
|
namespace: game-servers
|
||||||
|
annotations:
|
||||||
|
metallb.universe.tf/address-pool: default-lb-pool
|
||||||
|
spec:
|
||||||
|
type: LoadBalancer
|
||||||
|
loadBalancerIP: 10.4.4.200
|
||||||
|
ports:
|
||||||
|
- name: ark-game
|
||||||
|
port: 7777
|
||||||
|
protocol: UDP
|
||||||
|
targetPort: 7777
|
||||||
|
- name: ark-query
|
||||||
|
port: 27015
|
||||||
|
protocol: UDP
|
||||||
|
targetPort: 27015
|
||||||
|
- name: ark-tcp
|
||||||
|
port: 27016
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 27016
|
||||||
|
selector:
|
||||||
|
app: wings-ark-sa
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: media-data
|
||||||
|
namespace: media
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
storageClassName: longhorn
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 500Gi
|
||||||
@@ -5,7 +5,7 @@ metadata:
|
|||||||
namespace: media
|
namespace: media
|
||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteMany
|
- ReadWriteOnce
|
||||||
storageClassName: longhorn
|
storageClassName: longhorn
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
name: readarr-config
|
|
||||||
namespace: media
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 2Gi
|
|
||||||
storageClassName: longhorn
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
name: readarr-books
|
|
||||||
namespace: media
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 2Gi
|
|
||||||
storageClassName: longhorn
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: readarr
|
|
||||||
namespace: media
|
|
||||||
labels:
|
|
||||||
app: readarr
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: readarr
|
|
||||||
strategy:
|
|
||||||
type: Recreate
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: readarr
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: readarr
|
|
||||||
image: lscr.io/linuxserver/readarr:latest
|
|
||||||
ports:
|
|
||||||
- containerPort: 8787
|
|
||||||
name: http
|
|
||||||
env:
|
|
||||||
- name: PUID
|
|
||||||
value: "1000"
|
|
||||||
- name: PGID
|
|
||||||
value: "1000"
|
|
||||||
- name: TZ
|
|
||||||
value: UTC
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 100m
|
|
||||||
memory: 256Mi
|
|
||||||
limits:
|
|
||||||
cpu: "1"
|
|
||||||
memory: 1Gi
|
|
||||||
volumeMounts:
|
|
||||||
- name: config
|
|
||||||
mountPath: /config
|
|
||||||
- name: books
|
|
||||||
mountPath: /books
|
|
||||||
- name: downloads
|
|
||||||
mountPath: /downloads
|
|
||||||
volumes:
|
|
||||||
- name: config
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: readarr-config
|
|
||||||
- name: books
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: media-data
|
|
||||||
- name: downloads
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: readarr-books
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
apiVersion: networking.k8s.io/v1
|
|
||||||
kind: Ingress
|
|
||||||
metadata:
|
|
||||||
name: readarr
|
|
||||||
namespace: media
|
|
||||||
annotations:
|
|
||||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
|
||||||
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
|
||||||
spec:
|
|
||||||
tls:
|
|
||||||
- hosts:
|
|
||||||
- readarr.khalisio.com
|
|
||||||
secretName: readarr-tls
|
|
||||||
rules:
|
|
||||||
- host: readarr.khalisio.com
|
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- path: /
|
|
||||||
pathType: Prefix
|
|
||||||
backend:
|
|
||||||
service:
|
|
||||||
name: readarr
|
|
||||||
port:
|
|
||||||
name: http
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: readarr
|
|
||||||
namespace: media
|
|
||||||
spec:
|
|
||||||
selector:
|
|
||||||
app: readarr
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
protocol: TCP
|
|
||||||
port: 8787
|
|
||||||
targetPort: 8787
|
|
||||||
type: ClusterIP
|
|
||||||
@@ -10,6 +10,8 @@ spec:
|
|||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: sonarr
|
app: sonarr
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
@@ -17,30 +19,38 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: sonarr
|
- name: sonarr
|
||||||
image: lscr.io/linuxserver/sonarr:develop
|
image: lscr.io/linuxserver/sonarr:latest
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8989
|
- containerPort: 8989
|
||||||
|
name: http
|
||||||
env:
|
env:
|
||||||
- name: PUID
|
- name: PUID
|
||||||
value: "1000"
|
value: "1000"
|
||||||
- name: PGID
|
- name: PGID
|
||||||
value: "1000"
|
value: "1000"
|
||||||
- name: TZ
|
- name: TZ
|
||||||
value: UTC
|
value: Etc/UTC
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: config
|
- name: config
|
||||||
mountPath: /config
|
mountPath: /config
|
||||||
- name: tv
|
|
||||||
mountPath: /tv
|
|
||||||
- name: downloads
|
- name: downloads
|
||||||
mountPath: /downloads
|
mountPath: /downloads
|
||||||
|
- name: media-data
|
||||||
|
mountPath: /media
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 256Mi
|
||||||
|
limits:
|
||||||
|
cpu: 500m
|
||||||
|
memory: 512Mi
|
||||||
volumes:
|
volumes:
|
||||||
- name: config
|
- name: config
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: sonarr-config
|
claimName: sonarr-config
|
||||||
- name: tv
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: media-data
|
|
||||||
- name: downloads
|
- name: downloads
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: sonarr-downloads
|
claimName: sonarr-downloads
|
||||||
|
- name: media-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: media-data
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: pelican
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: pelican
|
||||||
|
app.kubernetes.io/managed-by: orion
|
||||||
Reference in New Issue
Block a user