diff --git a/bitnami/nats/Chart.yaml b/bitnami/nats/Chart.yaml index 7d5b4bb311a60b..b5a137237dfe11 100644 --- a/bitnami/nats/Chart.yaml +++ b/bitnami/nats/Chart.yaml @@ -31,4 +31,4 @@ maintainers: name: nats sources: - https://github.com/bitnami/charts/tree/main/bitnami/nats -version: 8.3.5 +version: 8.4.0 diff --git a/bitnami/nats/README.md b/bitnami/nats/README.md index 15302d20dee3cc..7cfd174e1ae81b 100644 --- a/bitnami/nats/README.md +++ b/bitnami/nats/README.md @@ -337,14 +337,17 @@ As an alternative, you can use of the preset configurations for pod affinity, po ### Persistence parameters -| Name | Description | Value | -| -------------------------- | ------------------------------------------------------------------- | ------------------- | -| `persistence.enabled` | Enable NATS data persistence using PVC(s) | `false` | -| `persistence.storageClass` | PVC Storage Class for NATS data volume | `""` | -| `persistence.accessModes` | PVC Access modes | `["ReadWriteOnce"]` | -| `persistence.size` | PVC Storage Request for NATS data volume | `8Gi` | -| `persistence.annotations` | Annotations for the PVC | `{}` | -| `persistence.selector` | Selector to match an existing Persistent Volume for NATS's data PVC | `{}` | +| Name | Description | Value | +| -------------------------------------------------- | ------------------------------------------------------------------------------ | ------------------- | +| `persistence.enabled` | Enable NATS data persistence using PVC(s) | `false` | +| `persistence.storageClass` | PVC Storage Class for NATS data volume | `""` | +| `persistence.accessModes` | PVC Access modes | `["ReadWriteOnce"]` | +| `persistence.size` | PVC Storage Request for NATS data volume | `8Gi` | +| `persistence.annotations` | Annotations for the PVC | `{}` | +| `persistence.selector` | Selector to match an existing Persistent Volume for NATS's data PVC | `{}` | +| `persistentVolumeClaimRetentionPolicy.enabled` | Enable Persistent volume retention policy for postgresql Statefulset | `false` | +| `persistentVolumeClaimRetentionPolicy.whenScaled` | Volume retention behavior when the replica count of the StatefulSet is reduced | `Retain` | +| `persistentVolumeClaimRetentionPolicy.whenDeleted` | Volume retention behavior that applies when the StatefulSet is deleted | `Retain` | ### Other parameters diff --git a/bitnami/nats/templates/statefulset.yaml b/bitnami/nats/templates/statefulset.yaml index c58364984145a2..27a5483a09e378 100644 --- a/bitnami/nats/templates/statefulset.yaml +++ b/bitnami/nats/templates/statefulset.yaml @@ -224,6 +224,11 @@ spec: {{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 8 }} {{- end }} {{- if .Values.persistence.enabled }} + {{- if .Values.persistentVolumeClaimRetentionPolicy.enabled }} + persistentVolumeClaimRetentionPolicy: + whenDeleted: {{ .Values.persistentVolumeClaimRetentionPolicy.whenDeleted }} + whenScaled: {{ .Values.persistentVolumeClaimRetentionPolicy.whenScaled }} + {{- end }} volumeClaimTemplates: - metadata: name: data diff --git a/bitnami/nats/values.yaml b/bitnami/nats/values.yaml index 24b661dd376681..2bce9dea87ffdd 100644 --- a/bitnami/nats/values.yaml +++ b/bitnami/nats/values.yaml @@ -940,6 +940,19 @@ persistence: ## app: my-app ## selector: {} +## Persistent Volume Claim Retention Policy +## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#persistentvolumeclaim-retention +## +persistentVolumeClaimRetentionPolicy: + ## @param persistentVolumeClaimRetentionPolicy.enabled Enable Persistent volume retention policy for postgresql Statefulset + ## + enabled: false + ## @param persistentVolumeClaimRetentionPolicy.whenScaled Volume retention behavior when the replica count of the StatefulSet is reduced + ## + whenScaled: Retain + ## @param persistentVolumeClaimRetentionPolicy.whenDeleted Volume retention behavior that applies when the StatefulSet is deleted + ## + whenDeleted: Retain ## @section Other parameters ## NATS Pod Disruption Budget configuration