Closed Milindkg97 closed 1 year ago
@dirsigler
We are trying to implement this using Terraform.
I don't think its possible to use an existing PVC in this chart right now. As far as I see the values.yaml defines
# If this option is set to false a StateFulset instead of a Deployment is used
useDeploy: true
So it will use the deployment.yaml template, however in the Deployment.yaml template it only has a mention for the PVC created in the pvc.yaml.
volumes:
- name: storage
persistentVolumeClaim:
claimName: {{ include "uptime-kuma.fullname" . }}-pvc <<< Name from pvc.yaml
The pvc.yaml right now only allows "not creating" the volume if the existing claim is defined.
{{- if and .Values.useDeploy (not .Values.volume.existingClaim) }}
{{- if and .Values.volume.enabled (not .Values.volume.existingClaim) }}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ include "uptime-kuma.fullname" . }}-pvc
labels:
{{- include "uptime-kuma.labels" . | nindent 4 }}
The solution for this problem is just doing something like this in the deployment.yaml
volumes:
- name: storage
persistentVolumeClaim:
{{- if not .Values.volume.existingClaim }}
claimName: {{ include "uptime-kuma.fullname" . }}-pvc
{{- else }}
claimName: {{ .Values.volume.existingClaim }}
{{- end }}
The existing PV setup requires to pass in an object, can you share an example of how to attach our own PV/PVC via the values.yaml file