Skip to content

[Suggestion] - Add common labels to PersistentVolumeClaim resources #1139

Description

@grawert

Suggestion

The common label feature is important for proper resource management. Especially for backups/restore using Velero or OADP on OCP Kubernetes clusters. For a proper backup configuration not only PODs but also PVCs must be labeled in order to be backed up correctly. Unfortunately the common labels definable in the Atlassian Helm charts is only labeling the STS/PODs but not the PVCs. Hence the request to add the common.labels.commonLabels to PVCs as well. That includes the shared-home, local-home and additionalVolumeClaimTemplates.

{{- if .Values.volumes.localHome.persistentVolumeClaim.create }}
- apiVersion: v1
  kind: PersistentVolumeClaim
  metadata:
    name: local-home
    labels:
      {{- include "common.labels.commonLabels" . | nindent 6 }}
  spec:
    accessModes: [ "ReadWriteOnce" ]
    {{- if .Values.volumes.localHome.persistentVolumeClaim.storageClassName }}
    storageClassName: {{ .Values.volumes.localHome.persistentVolumeClaim.storageClassName | quote }}
    {{- end }}
    {{- with .Values.volumes.localHome.persistentVolumeClaim.resources }}
    resources:
      {{- toYaml . | nindent 6 }}
    {{- end }}
{{- end }}

Please let me know your thoughts on this. I am willing to provide the PR.

Product

Jira, Confluence

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions