Skip to content

Commit

Permalink
[bitnami/nats] Add PersistentVolumeRetentionPolicy (#29371)
Browse files Browse the repository at this point in the history
  • Loading branch information
rblaine95 authored Sep 12, 2024
1 parent 230423b commit 15d5c40
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 12 deletions.
8 changes: 6 additions & 2 deletions bitnami/nats/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Changelog

## 8.3.5 (2024-09-06)
## 8.4.0 (2024-09-12)

* [bitnami/nats] Release 8.3.5 ([#29253](https://github.com/bitnami/charts/pull/29253))
* [bitnami/nats] Add `PersistentVolumeRetentionPolicy` ([#29371](https://github.com/bitnami/charts/pull/29371))

## <small>8.3.5 (2024-09-06)</small>

* [bitnami/nats] Release 8.3.5 (#29253) ([a1687c9](https://github.com/bitnami/charts/commit/a1687c981454b4ec06fbc05993a6c498e5b29bcd)), closes [#29253](https://github.com/bitnami/charts/issues/29253)

## <small>8.3.4 (2024-08-30)</small>

Expand Down
2 changes: 1 addition & 1 deletion bitnami/nats/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
21 changes: 12 additions & 9 deletions bitnami/nats/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 NATS 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

Expand Down Expand Up @@ -461,4 +464,4 @@ Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
5 changes: 5 additions & 0 deletions bitnami/nats/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions bitnami/nats/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 NATS 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
Expand Down
Binary file added readme-generator
Binary file not shown.

0 comments on commit 15d5c40

Please sign in to comment.