PromucFlow_constructor/deploy/helm/templates/persistentVolume.yaml

41 lines
1.3 KiB
YAML
Raw Normal View History

{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim.enabled) ( .Values.autoscaling.enabled) }}
apiVersion: v1
kind: PersistentVolume
metadata:
feat: allow persistent volume name to be overridden in the helm chart (#38752) ## Description Exposes a value under the `persistence` key to allow the PV name to be overridden. This was requested by a customer that does multiple deploys of Appsmith per cluster in different namespaces with the same Helm release name. Since PV's are not namespaced, the deploy was failing. Fixes #`Issue Number` _or_ Fixes `Issue URL` > [!WARNING] > _If no issue exists, please create an issue first, and check with the maintainers if the issue is valid._ ## Automation /ok-to-test tags="" ### :mag: Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!WARNING] > Tests have not run on the HEAD 8a0e2ba2354c9a6742ca5d1a31d87559408325ec yet > <hr>Thu, 23 Jan 2025 14:35:55 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added ability to override Persistent Volume (PV) name in Helm chart. - Enhanced configuration options for multi-namespace deployments. - **Improvements** - Introduced more flexible naming strategy for Persistent Volume resources. - Updated PersistentVolume and PersistentVolumeClaim resources to utilize the new naming convention. - Updated application version from 3.6.0 to 3.6.1. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-01-29 08:19:59 +00:00
name: {{ include "appsmith.pvName" . }}
spec:
capacity:
storage: {{ .Values.persistence.size | quote }}
volumeMode: Filesystem # Mount volume into Pod as a directory.
accessModes:
{{- range .Values.persistence.accessModes }}
- {{ . | quote }}
{{- end }}
persistentVolumeReclaimPolicy: {{ .Values.persistence.reclaimPolicy }}
{{- if .Values.persistence.localStorage }}
local:
path: {{ .Values.persistence.storagePath }} # Path to the directory this PV refers to.
nodeAffinity: # nodeAffinity is required when using local volumes.
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
{{- toYaml .Values.persistence.localCluster | nindent 12 }}
{{- end }}
{{- if .Values.persistence.storageClass }}
{{- if (eq "-" .Values.persistence.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.persistence.storageClass }}"
{{- end }}
{{- end }}
{{- if .Values.persistence.efs.enabled }}
csi:
driver: {{ .Values.persistence.efs.driver }}
nfs:
volumeHandle: {{ .Values.persistence.efs.volumeHandle }}
{{ end }}
{{- end }}