cluster-monitoring icon indicating copy to clipboard operation
cluster-monitoring copied to clipboard

Persistant Volme Claim Issue

Open dw86uk opened this issue 2 years ago • 1 comments

I've got a PC - rook-ceph-block but when I setup the vars.jsonnet file to use it...

// Persistent volume configuration enablePersistence: { // Setting these to false, defaults to emptyDirs. prometheus: true, grafana: true, // If using a pre-created PV, fill in the names below. If blank, they will use the default StorageClass prometheusPV: '', grafanaPV: '', // If required to use a specific storageClass, keep the PV names above blank and fill the storageClass name below. storageClass: 'rook-ceph-block', // Define the PV sizes below prometheusSizePV: '20Gi', grafanaSizePV: '20Gi', },

I get the following issue when I come to deploy

` The PersistentVolumeClaim "grafana-storage" is invalid: spec: Forbidden: spec is immutable after creation except resources.requests for bound claims core.PersistentVolumeClaimSpec{ AccessModes: {"ReadWriteOnce"}, Selector: nil, Resources: {Requests: {s"storage": {i: {...}, s: "20Gi", Format: "BinarySI"}}},

  • VolumeName: "pvc-ec99737a-4568-4c0b-9540-81a01a51a3c3",
  • VolumeName: "", StorageClassName: &"rook-ceph-block", VolumeMode: &"Filesystem", ... // 2 identical fields } `

Am I setting the vars.jsonnet file incorrectly? I have other pods connecting to this PV correctly so thats definately working. Thanks and great project btw!

dw86uk avatar Oct 01 '22 16:10 dw86uk

Hey @dw86uk 👋🏻

You're getting this error because you have already deployed and created a PVC for grafana+promethus

Update your vars.jsonnet here to set the IDs of your existing PVCs then re-run the make commands to re-deploy :)

kolvin avatar Feb 12 '23 15:02 kolvin

Thanks @kolvin for helping-out. If needed, reopen the issue @dw86uk .

carlosedp avatar May 30 '24 20:05 carlosedp