From 509a7fa4dcfeaaa006816cbac006989363bdd076 Mon Sep 17 00:00:00 2001 From: Scott Davidson <49713135+sd109@users.noreply.github.com> Date: Wed, 23 Jul 2025 03:52:27 +0100 Subject: [PATCH] Switch to StatefulSet resources for stateful components (#8985) ### What problem does this PR solve? Switch to Kubernetes StatefulSet resources for MySQL, Minio and vector DB since these are stateful application components. This makes operations such as helm upgrade smoother since the default container update strategy becomes a sequential rolling update of each pod. Also fixes a bug in the name template for the Minio stateful set resource to align it with the naming convention used for other components. ### Type of change - [X] Bug Fix (non-breaking change which fixes an issue) --- helm/templates/elasticsearch.yaml | 2 +- helm/templates/infinity.yaml | 2 +- helm/templates/minio.yaml | 4 ++-- helm/templates/mysql.yaml | 2 +- helm/templates/opensearch.yaml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/helm/templates/elasticsearch.yaml b/helm/templates/elasticsearch.yaml index 9db9c9a8e..02e064548 100644 --- a/helm/templates/elasticsearch.yaml +++ b/helm/templates/elasticsearch.yaml @@ -19,7 +19,7 @@ spec: storage: {{ .Values.elasticsearch.storage.capacity }} --- apiVersion: apps/v1 -kind: Deployment +kind: StatefulSet metadata: name: {{ include "ragflow.fullname" . }}-es labels: diff --git a/helm/templates/infinity.yaml b/helm/templates/infinity.yaml index 6ccdff051..3821a31a9 100644 --- a/helm/templates/infinity.yaml +++ b/helm/templates/infinity.yaml @@ -19,7 +19,7 @@ spec: storage: {{ .Values.infinity.storage.capacity }} --- apiVersion: apps/v1 -kind: Deployment +kind: StatefulSet metadata: name: {{ include "ragflow.fullname" . }}-infinity labels: diff --git a/helm/templates/minio.yaml b/helm/templates/minio.yaml index 7a5cb1a5d..f01062c6e 100644 --- a/helm/templates/minio.yaml +++ b/helm/templates/minio.yaml @@ -19,9 +19,9 @@ spec: storage: {{ .Values.minio.storage.capacity }} --- apiVersion: apps/v1 -kind: Deployment +kind: StatefulSet metadata: - name: ragflow-minio-deployment + name: {{ include "ragflow.fullname" . }}-minio labels: {{- include "ragflow.labels" . | nindent 4 }} app.kubernetes.io/component: minio diff --git a/helm/templates/mysql.yaml b/helm/templates/mysql.yaml index 2ec6dcd78..f6a3e80da 100644 --- a/helm/templates/mysql.yaml +++ b/helm/templates/mysql.yaml @@ -19,7 +19,7 @@ spec: storage: {{ .Values.mysql.storage.capacity }} --- apiVersion: apps/v1 -kind: Deployment +kind: StatefulSet metadata: name: {{ include "ragflow.fullname" . }}-mysql labels: diff --git a/helm/templates/opensearch.yaml b/helm/templates/opensearch.yaml index 4dc97d9c9..889a634b7 100644 --- a/helm/templates/opensearch.yaml +++ b/helm/templates/opensearch.yaml @@ -19,7 +19,7 @@ spec: storage: {{ .Values.opensearch.storage.capacity }} --- apiVersion: apps/v1 -kind: Deployment +kind: StatefulSet metadata: name: {{ include "ragflow.fullname" . }}-opensearch labels: