From 45ca6e9db58c01cd2a856dfcc3ddcdbe05dd2bc9 Mon Sep 17 00:00:00 2001 From: drewburr Date: Sat, 24 Aug 2024 21:04:25 -0400 Subject: [PATCH] Convert to single-replica STS --- charts/minecraft-server/templates/deployment.yaml | 8 +++----- charts/minecraft-server/values.yaml | 2 -- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/charts/minecraft-server/templates/deployment.yaml b/charts/minecraft-server/templates/deployment.yaml index 839cd9f..3df2f81 100644 --- a/charts/minecraft-server/templates/deployment.yaml +++ b/charts/minecraft-server/templates/deployment.yaml @@ -1,13 +1,11 @@ apiVersion: apps/v1 -kind: Deployment +kind: StatefulSet metadata: name: {{ include "minecraft-server.fullname" . }} labels: {{- include "minecraft-server.labels" . | nindent 4 }} spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} - {{- end }} + replicas: 1 selector: matchLabels: {{- include "minecraft-server.selectorLabels" . | nindent 6 }} @@ -28,7 +26,7 @@ spec: securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - - name: {{ .Chart.Name }} + - name: minecraft-server securityContext: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" diff --git a/charts/minecraft-server/values.yaml b/charts/minecraft-server/values.yaml index 2ee7eef..23b3849 100644 --- a/charts/minecraft-server/values.yaml +++ b/charts/minecraft-server/values.yaml @@ -2,8 +2,6 @@ # This is a YAML-formatted file. # Declare variables to be passed into your templates. -replicaCount: 1 - image: repository: nginx pullPolicy: IfNotPresent