Skip to content

Helm upgrade is failing to patch PVC #3899

@aa-sravan

Description

@aa-sravan

Describe the bug
Unable to re-install/upgrade the helm chart as the STS is getting patched for persistentVolumeClaimRetentionPolicy .

spec:
  persistentVolumeClaimRetentionPolicy:
    whenDeleted: Retain
    whenScaled: Retain

CRD:

Template:

whenScaled: {{ .Values.metadata.logs.statefulset.persistentVolumeClaimRetentionPolicywhenScaled }}

Logs
Error: UPGRADE FAILED: failed to create patch: unable to find api field in struct StatefulSetSpec for the json field "persistentVolumeClaimRetentionPolicy" && failed to create patch: unable to find api field in struct StatefulSetSpec for the json field "persistentVolumeClaimRetentionPolicy"

Command used to install/upgrade Collection
helm upgrade --install --wait --timeout 600s -f values.yaml -n sumologic sumologic-release-name sumologic/sumologic --version 4.12.0 --create-namespace
Configuration Configuration used for Collection e.g. user-values.yaml for helm.

To Reproduce Steps to reproduce the behavior.
Upgrade the helm chart with minor changes to otel logs
Expected behavior
Helm release should upgrade without any issue

Environment (please complete the following information):
Production

  • Collection version (e.g. helm ls -n sumologic):
    sumologic-stage-ee sumologic 2 2025-03-07 14:38:58.553504137 +0000 UTC failed sumologic-4.12.0 4.12.0
  • Kubernetes version (e.g. kubectl version): 1.31
  • Cloud provider: aws
  • Others:

Anything else do we need to know Add any other context about the problem here, e.g. issue happens only occasionally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions