Skip to content

Option to keep mongodb PVCΒ #95

@bumpow

Description

@bumpow

Provide the option through helm values to keep the mongodb PVC after uninstalling the chart to avoid losing the bind to the corresponding PV with hyperdx's state.

I thought I could create a PR to contribute directly but it looks like I'm not allowed to push to a new branch. However, the changes are simple enough that I can just paste them here.

charts/hdx-oss-v2/values.yaml

  mongodb:
    ...
    persistence:
      enabled: true
      dataSize: 10Gi
+     keepPVC: true
    livenessProbe:
      enabled: true
      initialDelaySeconds: 10

charts/hdx-oss-v2/templates/claims/persistent-volume-claims.yaml

    name: {{ include "hdx-oss.fullname" . }}-mongodb
    labels:
      {{- include "hdx-oss.labels" . | nindent 4 }}
+   {{- if .Values.mongodb.persistence.keepPVC }}
+   annotations:
+     helm.sh/resource-policy: keep
+   {{- end }}
  spec:
    accessModes:
      - ReadWriteOnce

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