Skip to content

Commit 715f4aa

Browse files
feat: Add the whenDeleted option to the PVC retention policy (#3904)
1 parent 272ed55 commit 715f4aa

File tree

7 files changed

+8
-0
lines changed

7 files changed

+8
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1515

1616
- feat: Allow custom pod annotations in the CRD configMap (setup) [#3901]
1717
- feat: Add a configuration knob to disable PersistentVolumeClaim retention policy [#3902]
18+
- feat: Add the whenDeleted option to the PersistentVolumeClaim retention policy [#3904]
1819

1920
[#3901]: https://github.com/SumoLogic/sumologic-kubernetes-collection/pull/3901
2021
[#3902]: https://github.com/SumoLogic/sumologic-kubernetes-collection/pull/3902
22+
[#3904]: https://github.com/SumoLogic/sumologic-kubernetes-collection/pull/3904
2123
[v4.12.1]: https://github.com/SumoLogic/sumologic-kubernetes-collection/releases/v4.12.1
2224

2325
## [v4.12.0]

deploy/helm/sumologic/templates/logs/otelcol/statefulset.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ spec:
1818
{{- end }}
1919
{{- if .Values.sumologic.persistentVolumeClaimRetentionPolicyEnabled}}
2020
persistentVolumeClaimRetentionPolicy:
21+
whenDeleted: Retain
2122
whenScaled: {{ .Values.metadata.logs.statefulset.persistentVolumeClaimRetentionPolicywhenScaled }}
2223
{{- end}}
2324
template:

deploy/helm/sumologic/templates/metrics/otelcol/statefulset.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ spec:
1818
{{- end }}
1919
{{- if .Values.sumologic.persistentVolumeClaimRetentionPolicyEnabled}}
2020
persistentVolumeClaimRetentionPolicy:
21+
whenDeleted: Retain
2122
whenScaled: {{ .Values.metadata.logs.statefulset.persistentVolumeClaimRetentionPolicywhenScaled }}
2223
{{- end }}
2324
template:

tests/helm/testdata/goldenfile/metadata_logs_otc_statefulset/basic.output.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ spec:
1717
serviceName: RELEASE-NAME-sumologic-otelcol-logs-headless
1818
podManagementPolicy: "Parallel"
1919
persistentVolumeClaimRetentionPolicy:
20+
whenDeleted: Retain
2021
whenScaled: Retain
2122
template:
2223
metadata:

tests/helm/testdata/goldenfile/metadata_logs_otc_statefulset/custom.output.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ spec:
1818
podManagementPolicy: "Parallel"
1919
replicas: 4
2020
persistentVolumeClaimRetentionPolicy:
21+
whenDeleted: Retain
2122
whenScaled: Retain
2223
template:
2324
metadata:

tests/helm/testdata/goldenfile/metadata_metrics_otc_statefulset/basic.output.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ spec:
1717
serviceName: RELEASE-NAME-sumologic-otelcol-metrics-headless
1818
podManagementPolicy: "Parallel"
1919
persistentVolumeClaimRetentionPolicy:
20+
whenDeleted: Retain
2021
whenScaled: Retain
2122
template:
2223
metadata:

tests/helm/testdata/goldenfile/metadata_metrics_otc_statefulset/custom.output.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ spec:
1818
podManagementPolicy: "Parallel"
1919
replicas: 4
2020
persistentVolumeClaimRetentionPolicy:
21+
whenDeleted: Retain
2122
whenScaled: Retain
2223
template:
2324
metadata:

0 commit comments

Comments
 (0)