Skip to content

Support use of PVC created dynamically via volumeClaimTemplates when persistence is enabled & existingClaim is not specified #282

@sivarama-p-raju

Description

@sivarama-p-raju

The current templating logic on the statefulset does not support use of the PVC dynamically created by the claim template when Values.persistence.enabled is true and .Values.persistence.existingClaim is not specified.

Could you please let me know your thoughts about updating the below on the chart:

        {{- if and .Values.persistence.enabled .Values.persistence.existingClaim }}
        - name: {{ $fullName }}
          persistentVolumeClaim:
            {{- with .Values.persistence.existingClaim }}
            claimName: {{ tpl . $ }}
            {{- end }}
        {{- else if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}                # Add
        - name: {{ $fullName }}                                                                               # Add
          persistentVolumeClaim:                                                                              # Add
            claimName: {{ $fullName }}                                                                        # Add
        {{- else if not .Values.persistence.enabled }}
        - name: {{ $fullName }}
          emptyDir: {}
        {{- end }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions