#1723  OneDev helm image doesn't seem to deploy Persistent Volume
Closed
Ruben Flinterman opened 3 months ago

OneDev helm image (helm repo add onedev https://dl.cloudsmith.io/public/onedev/onedev/helm/charts) doesn't seem to deploy Persistent Volume. Therefore, the pod stays on pending and is not reachable.

  Normal  FailedBinding  9s (x102 over 25m)  persistentvolume-controller  no persistent volumes available for this claim and no storage class is set
Robin Shen commented 3 months ago

Seems that your cluster does not have a default storage class. In this case, you will need to specify storage class explicitly via --set persistence.storageClassName=<a storage class name>. Check here for all storage related settings:

https://code.onedev.io/onedev/server/~files/cccb411fbfebdd31b89a3e9ecc9d578e31aa9f0a/server-product/helm/values.yaml?position=source-255.1-263.15-1

Ruben Flinterman commented 3 months ago

Thank you!

The following indeed worked for me:

# onedev-pv.yaml
apiVersion: v1
kind: PersistentVolume
metadata:
  name: onedev-pv
  namespace: onedev
spec:
  capacity:
    storage: 100Gi
  accessModes:
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Retain
  storageClassName: onedev-storage
  hostPath:
    path: /kubernetes/pv/onedev
helm install onedev onedev/onedev -n onedev --create-namespace --set persistence.storageClassName=onedev-storage
Robin Shen changed state to 'Closed' 3 months ago
Previous Value Current Value
Open
Closed
issue 1 of 1
Type
Bug
Priority
Normal
Assignee
Affected Versions
onedev-9.7.0
Labels
No labels
Issue Votes (0)
Watchers (3)
Reference
onedev/server#1723
Please wait...
Page is in error, reload to recover