From 8d8ac220a89da2d4f2d5ccd69a0c20420357fe7d Mon Sep 17 00:00:00 2001 From: Didi Rothacker Date: Thu, 26 Sep 2024 22:31:23 +0200 Subject: [PATCH 1/7] use service type LoadBalancer, different keys for YAML port indexes --- cluster/service.yaml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/cluster/service.yaml b/cluster/service.yaml index 7672a87..580bf9a 100644 --- a/cluster/service.yaml +++ b/cluster/service.yaml @@ -6,17 +6,18 @@ metadata: labels: app: satisfactory spec: - type: NodePort + type: LoadBalancer + allocateLoadBalancerNodePorts: true + externalTrafficPolicy: Cluster + internalTrafficPolicy: Cluster ports: - - port: 7777 - nodePort: 7777 + - name: "game" + port: 7777 protocol: UDP - name: "game" targetPort: 7777 - - port: 7777 - nodePort: 7777 + - name: "gametcp" + port: 7777 protocol: TCP - name: "gametcp" targetPort: 7777 selector: - app: satisfactory \ No newline at end of file + app: satisfactory From c74d678e885873d94e2775fa5fd2e485b89161bf Mon Sep 17 00:00:00 2001 From: Didi Rothacker Date: Thu, 26 Sep 2024 22:34:09 +0200 Subject: [PATCH 2/7] fix gametcp port name and YAML indexes; separate config from cache volume --- cluster/statefulset.yaml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/cluster/statefulset.yaml b/cluster/statefulset.yaml index 70c89d8..c1cb840 100644 --- a/cluster/statefulset.yaml +++ b/cluster/statefulset.yaml @@ -31,18 +31,27 @@ spec: - name: STEAMBETA value: "false" ports: - - containerPort: 7777 - name: "gameTCP" + - name: "gametcp" + containerPort: 7777 protocol: TCP - - containerPort: 7777 - name: "game" + - name: "game" + containerPort: 7777 protocol: UDP volumeMounts: - - name: satisfactory-data + - name: satisfactory-config mountPath: /config + - name: satisfactory-server-cache + mountPath: /config/gamefiles volumeClaimTemplates: - metadata: - name: satisfactory-data + name: satisfactory-config + spec: + accessModes: [ "ReadWriteOnce" ] + resources: + requests: + storage: 1Gi + - metadata: + name: satisfactory-server-cache spec: accessModes: [ "ReadWriteOnce" ] resources: From a90257e96e92d50b58eb160a689a3a13467a783d Mon Sep 17 00:00:00 2001 From: Didi Rothacker Date: Thu, 26 Sep 2024 22:44:22 +0200 Subject: [PATCH 3/7] add comment for loadBalancerIP --- cluster/service.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cluster/service.yaml b/cluster/service.yaml index 580bf9a..02a37bd 100644 --- a/cluster/service.yaml +++ b/cluster/service.yaml @@ -10,6 +10,8 @@ spec: allocateLoadBalancerNodePorts: true externalTrafficPolicy: Cluster internalTrafficPolicy: Cluster +# might be necessary for your cluster: +# loadBalancerIP: ports: - name: "game" port: 7777 From f07dbb9d6d037f06dff5ea13ff80c5d80d48597f Mon Sep 17 00:00:00 2001 From: Robert Thomas <31854736+wolveix@users.noreply.github.com> Date: Thu, 26 Sep 2024 21:59:42 +0100 Subject: [PATCH 4/7] Update statefulset.yaml --- cluster/statefulset.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cluster/statefulset.yaml b/cluster/statefulset.yaml index c1cb840..644747d 100644 --- a/cluster/statefulset.yaml +++ b/cluster/statefulset.yaml @@ -40,7 +40,7 @@ spec: volumeMounts: - name: satisfactory-config mountPath: /config - - name: satisfactory-server-cache + - name: satisfactory-data mountPath: /config/gamefiles volumeClaimTemplates: - metadata: From bf12bfa4efe0f67bb37025f5cba8200b05089b30 Mon Sep 17 00:00:00 2001 From: Robert Thomas <31854736+wolveix@users.noreply.github.com> Date: Thu, 26 Sep 2024 22:02:58 +0100 Subject: [PATCH 5/7] Update service.yaml --- cluster/service.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cluster/service.yaml b/cluster/service.yaml index 02a37bd..478420e 100644 --- a/cluster/service.yaml +++ b/cluster/service.yaml @@ -17,7 +17,7 @@ spec: port: 7777 protocol: UDP targetPort: 7777 - - name: "gametcp" + - name: "api" port: 7777 protocol: TCP targetPort: 7777 From c8c48c7df862e44df022aea1495de9d682f7ead6 Mon Sep 17 00:00:00 2001 From: Robert Thomas <31854736+wolveix@users.noreply.github.com> Date: Thu, 26 Sep 2024 22:04:57 +0100 Subject: [PATCH 6/7] Update statefulset.yaml --- cluster/statefulset.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cluster/statefulset.yaml b/cluster/statefulset.yaml index 644747d..e15fa65 100644 --- a/cluster/statefulset.yaml +++ b/cluster/statefulset.yaml @@ -31,7 +31,7 @@ spec: - name: STEAMBETA value: "false" ports: - - name: "gametcp" + - name: "api" containerPort: 7777 protocol: TCP - name: "game" From 0c0b7c333f88cc6a1122acce04a64899020e7bd6 Mon Sep 17 00:00:00 2001 From: Robert Thomas <31854736+wolveix@users.noreply.github.com> Date: Thu, 26 Sep 2024 22:05:16 +0100 Subject: [PATCH 7/7] Update statefulset.yaml --- cluster/statefulset.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cluster/statefulset.yaml b/cluster/statefulset.yaml index e15fa65..5b3ccea 100644 --- a/cluster/statefulset.yaml +++ b/cluster/statefulset.yaml @@ -51,7 +51,7 @@ spec: requests: storage: 1Gi - metadata: - name: satisfactory-server-cache + name: satisfactory-data spec: accessModes: [ "ReadWriteOnce" ] resources: