From f029baffbc594d200d6d19c94bab2a33984fe45e Mon Sep 17 00:00:00 2001 From: Jacek N Date: Fri, 10 Apr 2026 09:38:30 +0100 Subject: [PATCH 1/2] Add support for controlling PVC retention policy in 2 charts This PR adds support for controlling PVC retention policy using persistentVolumeClaimRetentionPolicy. Default behaviour doesn't change so this PR is backwards compabitle. --- charts/core/Chart.yaml | 2 +- charts/core/templates/core-sts.yaml | 4 ++++ charts/core/values.yaml | 5 +++++ charts/soroban-rpc/Chart.yaml | 2 +- charts/soroban-rpc/templates/soroban-rpc-sts.yaml | 4 ++++ charts/soroban-rpc/values.yaml | 5 +++++ 6 files changed, 20 insertions(+), 2 deletions(-) diff --git a/charts/core/Chart.yaml b/charts/core/Chart.yaml index 4392437..260a6c1 100644 --- a/charts/core/Chart.yaml +++ b/charts/core/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 name: core description: This chart will deploy Stellar Core node -version: 0.6.1 +version: 0.7.0 appVersion: "26.0.1-3109.e78c97ed0.jammy" maintainers: - name: Stellar Development Foundation diff --git a/charts/core/templates/core-sts.yaml b/charts/core/templates/core-sts.yaml index 97a3f4c..b2c6371 100644 --- a/charts/core/templates/core-sts.yaml +++ b/charts/core/templates/core-sts.yaml @@ -15,6 +15,10 @@ spec: replicas: {{ .Values.core.replicaCount }} podManagementPolicy: {{ .Values.core.podManagementPolicy }} serviceName: {{ template "common.fullname" . }} + {{- if .Values.core.persistence.persistentVolumeClaimRetentionPolicy }} + persistentVolumeClaimRetentionPolicy: + {{- toYaml .Values.core.persistence.persistentVolumeClaimRetentionPolicy | nindent 4 }} + {{- end }} selector: matchLabels: app: {{ template "common.fullname" . }} diff --git a/charts/core/values.yaml b/charts/core/values.yaml index a2a8b6b..9358cef 100644 --- a/charts/core/values.yaml +++ b/charts/core/values.yaml @@ -104,6 +104,11 @@ core: enabled: false storageClass: default size: 100G + ## Persistent volume claim retention policy for the StatefulSet. + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#persistentvolumeclaim-retention + # persistentVolumeClaimRetentionPolicy: + # whenDeleted: Retain + # whenScaled: Retain ## Validators need to publish history archives. historyProxy section # will make the chart deplo reverse proxy nginx container diff --git a/charts/soroban-rpc/Chart.yaml b/charts/soroban-rpc/Chart.yaml index 5812739..b67d4e5 100644 --- a/charts/soroban-rpc/Chart.yaml +++ b/charts/soroban-rpc/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: soroban-rpc -version: 0.4.1 +version: 0.5.0 appVersion: "26.0.0" description: Stellar RPC Helm Chart. This chart will deploy Stellar RPC server maintainers: diff --git a/charts/soroban-rpc/templates/soroban-rpc-sts.yaml b/charts/soroban-rpc/templates/soroban-rpc-sts.yaml index 7df365e..15b4baa 100644 --- a/charts/soroban-rpc/templates/soroban-rpc-sts.yaml +++ b/charts/soroban-rpc/templates/soroban-rpc-sts.yaml @@ -21,6 +21,10 @@ spec: replicas: {{ .Values.sorobanRpc.replicaCount | default 2 | int }} podManagementPolicy: {{ .Values.sorobanRpc.podManagementPolicy }} serviceName: {{ template "common.fullname" . }} + {{- if .Values.sorobanRpc.persistence.persistentVolumeClaimRetentionPolicy }} + persistentVolumeClaimRetentionPolicy: + {{- toYaml .Values.sorobanRpc.persistence.persistentVolumeClaimRetentionPolicy | nindent 4 }} + {{- end }} selector: matchLabels: app: {{ template "common.fullname" . }} diff --git a/charts/soroban-rpc/values.yaml b/charts/soroban-rpc/values.yaml index a8cc690..c4f42be 100644 --- a/charts/soroban-rpc/values.yaml +++ b/charts/soroban-rpc/values.yaml @@ -95,6 +95,11 @@ sorobanRpc: enabled: false storageClass: default size: 100G + ## Persistent volume claim retention policy for the StatefulSet. + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#persistentvolumeclaim-retention + # persistentVolumeClaimRetentionPolicy: + # whenDeleted: Retain + # whenScaled: Retain ## Soroban RPC pods do not need to be initialized in a specific order podManagementPolicy: Parallel From 8d066bea755362bbc0ddcecfded15a94030e68f0 Mon Sep 17 00:00:00 2001 From: Jacek N Date: Fri, 10 Apr 2026 09:53:56 +0100 Subject: [PATCH 2/2] Improve if statement --- charts/core/templates/core-sts.yaml | 2 +- charts/soroban-rpc/templates/soroban-rpc-sts.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/core/templates/core-sts.yaml b/charts/core/templates/core-sts.yaml index b2c6371..e14cef1 100644 --- a/charts/core/templates/core-sts.yaml +++ b/charts/core/templates/core-sts.yaml @@ -15,7 +15,7 @@ spec: replicas: {{ .Values.core.replicaCount }} podManagementPolicy: {{ .Values.core.podManagementPolicy }} serviceName: {{ template "common.fullname" . }} - {{- if .Values.core.persistence.persistentVolumeClaimRetentionPolicy }} + {{- if and .Values.core.persistence.enabled .Values.core.persistence.persistentVolumeClaimRetentionPolicy }} persistentVolumeClaimRetentionPolicy: {{- toYaml .Values.core.persistence.persistentVolumeClaimRetentionPolicy | nindent 4 }} {{- end }} diff --git a/charts/soroban-rpc/templates/soroban-rpc-sts.yaml b/charts/soroban-rpc/templates/soroban-rpc-sts.yaml index 15b4baa..6152c9f 100644 --- a/charts/soroban-rpc/templates/soroban-rpc-sts.yaml +++ b/charts/soroban-rpc/templates/soroban-rpc-sts.yaml @@ -21,7 +21,7 @@ spec: replicas: {{ .Values.sorobanRpc.replicaCount | default 2 | int }} podManagementPolicy: {{ .Values.sorobanRpc.podManagementPolicy }} serviceName: {{ template "common.fullname" . }} - {{- if .Values.sorobanRpc.persistence.persistentVolumeClaimRetentionPolicy }} + {{- if and .Values.sorobanRpc.persistence.enabled .Values.sorobanRpc.persistence.persistentVolumeClaimRetentionPolicy }} persistentVolumeClaimRetentionPolicy: {{- toYaml .Values.sorobanRpc.persistence.persistentVolumeClaimRetentionPolicy | nindent 4 }} {{- end }}