From 5428c326f348d96b65e272c619855be1ef69d8cd Mon Sep 17 00:00:00 2001 From: michaelell Date: Fri, 26 Jan 2024 13:02:36 -0500 Subject: [PATCH 1/2] modify deployment and chart for opionated deployment --- chart/templates/deployments.yaml | 2 ++ chart/values.yaml | 2 ++ k8s/deployment.yaml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/chart/templates/deployments.yaml b/chart/templates/deployments.yaml index 73e9789..5c55893 100644 --- a/chart/templates/deployments.yaml +++ b/chart/templates/deployments.yaml @@ -9,6 +9,8 @@ spec: matchLabels: app.kubernetes.io/component: "{{ .Release.Name }}-server" template: + strategy: + type: "{{ .Values.server.strategy }}" metadata: annotations: {{- with .Values.server.annotations }} diff --git a/chart/values.yaml b/chart/values.yaml index 3c53bf2..4fa0f67 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -56,6 +56,8 @@ server: - name: rcon containerPort: 25575 protocol: UDP + # -- (string) Change the deployment strategy + strategy: Recreate # -- (dict) Change the service configuration. # If you change those, make sure to change the server.config and server.ports accordingly. diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml index cfca36c..9d56e3a 100644 --- a/k8s/deployment.yaml +++ b/k8s/deployment.yaml @@ -6,6 +6,8 @@ metadata: name: palworld-server spec: replicas: 1 + strategy: + type: Recreate selector: matchLabels: app: palworld-server From 18e558fb00f3405abc238dbc242588e778866c59 Mon Sep 17 00:00:00 2001 From: Mercwri Date: Fri, 26 Jan 2024 22:18:42 -0500 Subject: [PATCH 2/2] fix strategy placement in chart --- chart/templates/deployments.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chart/templates/deployments.yaml b/chart/templates/deployments.yaml index 5c55893..ade424a 100644 --- a/chart/templates/deployments.yaml +++ b/chart/templates/deployments.yaml @@ -8,9 +8,9 @@ spec: selector: matchLabels: app.kubernetes.io/component: "{{ .Release.Name }}-server" + strategy: + type: "{{ .Values.server.strategy }}" template: - strategy: - type: "{{ .Values.server.strategy }}" metadata: annotations: {{- with .Values.server.annotations }}