From 22616bdba56b36d4340e94c9b89b451735330ace Mon Sep 17 00:00:00 2001 From: ThomasCardin Date: Mon, 2 Dec 2024 08:35:43 -0500 Subject: [PATCH] satisfactory server --- kubernetes/apps/argo-apps/kustomization.yaml | 1 + .../apps/satisfactory-server/argo-app.yaml | 21 +++++++ .../satisfactory-server/base/deployment.yaml | 58 +++++++++++++++++++ .../apps/satisfactory-server/base/svc.yaml | 22 +++++++ .../satisfactory-server/kustomization.yaml | 5 ++ 5 files changed, 107 insertions(+) create mode 100644 kubernetes/apps/satisfactory-server/argo-app.yaml create mode 100644 kubernetes/apps/satisfactory-server/base/deployment.yaml create mode 100644 kubernetes/apps/satisfactory-server/base/svc.yaml create mode 100644 kubernetes/apps/satisfactory-server/kustomization.yaml diff --git a/kubernetes/apps/argo-apps/kustomization.yaml b/kubernetes/apps/argo-apps/kustomization.yaml index 8106d8d..8430f31 100644 --- a/kubernetes/apps/argo-apps/kustomization.yaml +++ b/kubernetes/apps/argo-apps/kustomization.yaml @@ -7,6 +7,7 @@ resources: - ../trilium-notes/ - ../ollama/ - ../jobscrapper/ + - ../satisfactory-server/ # System applications - ../../system/cert-manager diff --git a/kubernetes/apps/satisfactory-server/argo-app.yaml b/kubernetes/apps/satisfactory-server/argo-app.yaml new file mode 100644 index 0000000..843d502 --- /dev/null +++ b/kubernetes/apps/satisfactory-server/argo-app.yaml @@ -0,0 +1,21 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: satisfactory + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + destination: + server: https://kubernetes.default.svc + namespace: satisfactory + source: + repoURL: https://github.com/ThomasCardin/homelab.git + path: kubernetes/apps/satisfactory-server/base + targetRevision: HEAD + syncPolicy: + automated: + selfHeal: true + syncOptions: + - CreateNamespace=true diff --git a/kubernetes/apps/satisfactory-server/base/deployment.yaml b/kubernetes/apps/satisfactory-server/base/deployment.yaml new file mode 100644 index 0000000..491c110 --- /dev/null +++ b/kubernetes/apps/satisfactory-server/base/deployment.yaml @@ -0,0 +1,58 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: satisfactory +spec: + selector: + matchLabels: + app: satisfactory + serviceName: "satisfactory" + replicas: 1 + template: + metadata: + labels: + app: satisfactory + spec: + containers: + - name: satisfactory + image: ghcr.io/thomascardin/satisfactory-server:latest + env: + - name: DEBUG + value: "false" + - name: MAXPLAYERS + value: "2" + - name: PGID + value: "1000" + - name: PUID + value: "1000" + - name: SKIPUPDATE + value: "false" + - name: STEAMBETA + value: "false" + ports: + - name: "api" + containerPort: 7777 + protocol: TCP + - name: "game" + containerPort: 7777 + protocol: UDP + volumeMounts: + - name: satisfactory-config + mountPath: /config + - name: satisfactory-data + mountPath: /config/gamefiles + volumeClaimTemplates: + - metadata: + name: satisfactory-config + spec: + accessModes: [ "ReadWriteOnce" ] + resources: + requests: + storage: 1Gi + - metadata: + name: satisfactory-data + spec: + accessModes: [ "ReadWriteOnce" ] + resources: + requests: + storage: 50Gi \ No newline at end of file diff --git a/kubernetes/apps/satisfactory-server/base/svc.yaml b/kubernetes/apps/satisfactory-server/base/svc.yaml new file mode 100644 index 0000000..4bcab6b --- /dev/null +++ b/kubernetes/apps/satisfactory-server/base/svc.yaml @@ -0,0 +1,22 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: satisfactory + labels: + app: satisfactory +spec: + type: ClusterIP + externalTrafficPolicy: Cluster + internalTrafficPolicy: Cluster + ports: + - name: "game" + port: 7777 + protocol: UDP + targetPort: 7777 + - name: "api" + port: 7777 + protocol: TCP + targetPort: 7777 + selector: + app: satisfactory \ No newline at end of file diff --git a/kubernetes/apps/satisfactory-server/kustomization.yaml b/kubernetes/apps/satisfactory-server/kustomization.yaml new file mode 100644 index 0000000..36c4b6f --- /dev/null +++ b/kubernetes/apps/satisfactory-server/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - argo-app.yaml \ No newline at end of file