From 2ac150f83f59f124b2249142de8c558114d4ab7a Mon Sep 17 00:00:00 2001 From: Tyler Perkins Date: Fri, 10 Nov 2023 15:15:39 -0500 Subject: [PATCH] Add factorio --- games/factorio/factorio-deployment.yaml | 29 +++++++++++++++++++++++++ games/factorio/factorio-pvc.yaml | 13 +++++++++++ games/factorio/factorio-service.yaml | 19 ++++++++++++++++ 3 files changed, 61 insertions(+) create mode 100644 games/factorio/factorio-deployment.yaml create mode 100644 games/factorio/factorio-pvc.yaml create mode 100644 games/factorio/factorio-service.yaml diff --git a/games/factorio/factorio-deployment.yaml b/games/factorio/factorio-deployment.yaml new file mode 100644 index 0000000..47f3498 --- /dev/null +++ b/games/factorio/factorio-deployment.yaml @@ -0,0 +1,29 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: factorio + namespace: games-ns +spec: + replicas: 1 + selector: + matchLabels: + app: games + template: + metadata: + labels: + app: games + spec: + containers: + - name: factorio + image: factoriotools/factorio + ports: + - containerPort: 34179 + - containerPort: 27015 + volumeMounts: + - name: factorio-save + mountPath: /factorio + volumes: + - name: factorio-save + persistentVolumeClaim: + claimName: factorio-pvc + diff --git a/games/factorio/factorio-pvc.yaml b/games/factorio/factorio-pvc.yaml new file mode 100644 index 0000000..049b3dc --- /dev/null +++ b/games/factorio/factorio-pvc.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: factorio-pvc + namespace: games-ns +spec: + accessModes: + - ReadWriteOnce + storageClassName: longhorn + resources: + requests: + storage: 8Gi + diff --git a/games/factorio/factorio-service.yaml b/games/factorio/factorio-service.yaml new file mode 100644 index 0000000..eeafdeb --- /dev/null +++ b/games/factorio/factorio-service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: factorio-service + namespace: games-ns +spec: + selector: + app: games + ports: + - name: Factorio + protocol: UDP + port: 34197 + targetPort: 34197 + - name: Factorio-TUI + protocol: TCP + port: 27015 + targetPort: 27015 + type: LoadBalancer +