Issue
You want to re-create the operations center PVC to apply a storageclass change.
Environment
Resolution
You can re-create the PVC and its information by following these steps:
- Backup the CJOC following this article
- Stop the CJOC statefulset (
kubectl scale statefulset cjoc --replicas=0
) - Delete the CJOC PVC
- Recreate the PVC, depending on the StorageClass being used:
If the StorageClass you want to use is the default StorageClass, just start the CJOC with kubectl scale statefulset cjoc --replicas=1
. This will create a new PVC.
If the StorageClass you want to use is not the default StorageClass, add the StorageClass name to the .Persistence.StorageClass value in the helm values:
Persistence:
# Persistence.StorageClass -- Persistent Volume Storage Class for Jenkins Home
# If defined, storageClassName: <storageClass>.
# If set to "-", storageClassName: "", which disables dynamic provisioning.
# If undefined (the default) or set to null, the default storage class will be used,
# unless specified otherwise below.
# If setting OperationsCenter.Platform == gke, a storage class backed with
# SSD drives will be created by this chart and used automatically.
#
# StorageClass: "-"
StorageClass: <nameOfTheStorageClass>
Then apply the value with helm upgrade
. This should create a new PVC and start CJOC.
5) Stop the CJOC with kubectl scale statefulset cjoc –replicas=0
6) Restore the CJOC from backup manually as explained in restore manually.
0 Comments