carlosedp / cluster-monitoring

Cluster monitoring stack for clusters based on Prometheus Operator
MIT License
740 stars 201 forks source link

Persistant Volme Claim Issue #164

Closed dw86uk closed 1 month ago

dw86uk commented 1 year ago

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"}}},

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!

kolvin commented 1 year ago

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 :)

carlosedp commented 1 month ago

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