Skip to content

Commit

Permalink
feat: Added persistentVolumeClaimRetentionPolicy to the spec for logs…
Browse files Browse the repository at this point in the history
… and metrics statefulsets (#3885)

* Added persistentVolumeClaimRetentionPolicy to the spec for logs and metrics statefulsets

* Readme updates and changelog

* Update the default kind image to v1.32.0
  • Loading branch information
rnishtala-sumo authored Feb 5, 2025
1 parent 567f5f3 commit 01dd014
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 3 deletions.
1 change: 1 addition & 0 deletions .changelog/3885.added.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added persistentVolumeClaimRetentionPolicy to the spec for logs and metrics statefulsets
2 changes: 2 additions & 0 deletions deploy/helm/sumologic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@ The following table lists the configurable parameters of the Sumo Logic chart an
| `metadata.metrics.statefulset.priorityClassName` | Priority class name for metrics metadata enrichment (otelcol) pods. | `Nil` |
| `metadata.metrics.statefulset.podLabels` | Additional labels for metrics metadata enrichment (otelcol) pods. | `{}` |
| `metadata.metrics.statefulset.podAnnotations` | Additional annotations for metrics metadata enrichment (otelcol) pods. | `{}` |
| `metadata.metrics.statefulset.persistentVolumeClaimRetentionPolicywhenScaled` | configures the volume retention behavior that applies when the replica count of the StatefulSet is reduced; for example, when scaling down the set.pods. | `Retain` |
| `metadata.metrics.statefulset.containers.otelcol.livenessProbe` | Liveness probe settings for the logs otelcol container. | `{"initialDelaySeconds": 15, "periodSeconds": 15, "timeoutSeconds": 10, "failureThreshold": 3}` |
| `metadata.metrics.statefulset.containers.otelcol.readinessProbe` | Readiness probe settings for the logs otelcol container. | `{"initialDelaySeconds": 5, "periodSeconds": 10, "timeoutSeconds": 3, "failureThreshold": 3}` |
| `metadata.metrics.statefulset.containers.otelcol.securityContext` | The securityContext configuration for otelcol container for metrics metadata enrichment statefulset. | `{}` |
Expand Down Expand Up @@ -507,6 +508,7 @@ The following table lists the configurable parameters of the Sumo Logic chart an
| `metadata.logs.statefulset.priorityClassName` | Priority class name for logs metadata enrichment (otelcol) pods. | `Nil` |
| `metadata.logs.statefulset.podLabels` | Additional labels for logs metadata enrichment (otelcol) pods. | `{}` |
| `metadata.logs.statefulset.podAnnotations` | Additional annotations for logs metadata enrichment (otelcol) pods. | `{}` |
| `metadata.logs.statefulset.persistentVolumeClaimRetentionPolicywhenScaled` | configures the volume retention behavior that applies when the replica count of the StatefulSet is reduced; for example, when scaling down the set.pods. | `Retain` |
| `metadata.logs.statefulset.extraEnvVars` | Additional environment variables for logs metadata enrichment (otelcol) pods. | `Nil` |
| `metadata.logs.statefulset.extraVolumes` | Additional volumes for logs metadata enrichment (otelcol) pods. | `Nil` |
| `metadata.logs.statefulset.extraVolumeMounts` | Additional volume mounts for logs metadata enrichment (otelcol) pods. | `Nil` |
Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/sumologic/templates/logs/otelcol/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ spec:
{{- if eq (include "metadata.logs.autoscaling.enabled" .) "false" }}
replicas: {{ .Values.metadata.logs.statefulset.replicaCount }}
{{- end }}
persistentVolumeClaimRetentionPolicy:
whenScaled: {{ .Values.metadata.logs.statefulset.persistentVolumeClaimRetentionPolicywhenScaled }}
template:
metadata:
annotations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ spec:
{{- if eq (include "metadata.metrics.autoscaling.enabled" .) "false" }}
replicas: {{ .Values.metadata.metrics.statefulset.replicaCount }}
{{- end }}
persistentVolumeClaimRetentionPolicy:
whenScaled: {{ .Values.metadata.logs.statefulset.persistentVolumeClaimRetentionPolicywhenScaled }}
template:
metadata:
annotations:
Expand Down
4 changes: 4 additions & 0 deletions deploy/helm/sumologic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1639,6 +1639,8 @@ metadata:
podLabels: {}
## Add custom annotations only to metrics sts pods
podAnnotations: {}
## Persistent Volume Claim retention policy (onScale)
persistentVolumeClaimRetentionPolicywhenScaled: Retain

## Set securityContext for containers running in pods in metrics statefulset.
containers:
Expand Down Expand Up @@ -1741,6 +1743,8 @@ metadata:
podLabels: {}
## Add custom annotations only to logs sts pods
podAnnotations: {}
## Persistent Volume Claim retention policy (onScale)
persistentVolumeClaimRetentionPolicywhenScaled: Retain

## Set securityContext for containers running in pods in logs statefulset.
containers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ spec:
app: RELEASE-NAME-sumologic-otelcol-logs
serviceName: RELEASE-NAME-sumologic-otelcol-logs-headless
podManagementPolicy: "Parallel"
persistentVolumeClaimRetentionPolicy:
whenScaled: Retain
template:
metadata:
annotations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ spec:
serviceName: RELEASE-NAME-sumologic-otelcol-logs-headless
podManagementPolicy: "Parallel"
replicas: 4
persistentVolumeClaimRetentionPolicy:
whenScaled: Retain
template:
metadata:
annotations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ spec:
app: RELEASE-NAME-sumologic-otelcol-metrics
serviceName: RELEASE-NAME-sumologic-otelcol-metrics-headless
podManagementPolicy: "Parallel"
persistentVolumeClaimRetentionPolicy:
whenScaled: Retain
template:
metadata:
annotations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ spec:
serviceName: RELEASE-NAME-sumologic-otelcol-metrics-headless
podManagementPolicy: "Parallel"
replicas: 4
persistentVolumeClaimRetentionPolicy:
whenScaled: Retain
template:
metadata:
annotations:
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/kind_images.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"supported": [
"kindest/node:v1.32.0@sha256:c48c62eac5da28cdadcf560d1d8616cfa6783b58f0d94cf63ad1bf49600cb027",
"kindest/node:v1.29.0@sha256:eaa1450915475849a73a9227b8f201df25e55e268e5d619312131292e324d570",
"kindest/node:v1.28.0@sha256:b7a4cad12c197af3ba43202d3efe03246b3f0793f162afb40a33c923952d5b31",
"kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72",
"kindest/node:v1.26.6@sha256:6e2d8b28a5b601defe327b98bd1c2d1930b49e5d8c512e1895099e4504007adb",
"kindest/node:v1.25.11@sha256:227fa11ce74ea76a0474eeefb84cb75d8dad1b08638371ecf0e86259b35be0c8",
"kindest/node:v1.24.15@sha256:7db4f8bea3e14b82d12e044e25e34bd53754b7f2b0e9d56df21774e6f66a70ab"
"kindest/node:v1.25.11@sha256:227fa11ce74ea76a0474eeefb84cb75d8dad1b08638371ecf0e86259b35be0c8"
],
"default": "kindest/node:v1.29.0@sha256:eaa1450915475849a73a9227b8f201df25e55e268e5d619312131292e324d570"
"default": "kindest/node:v1.32.0@sha256:c48c62eac5da28cdadcf560d1d8616cfa6783b58f0d94cf63ad1bf49600cb027"
}

0 comments on commit 01dd014

Please sign in to comment.