Interface PersistentVolumeClaimProps

    • Method Detail

      • getAccessModes

        @Stability(Stable)
        @Nullable
        default List<PersistentVolumeAccessMode> getAccessModes()
        Contains the access modes the volume should support.

        Default: - No access modes requirement.

      • getStorage

        @Stability(Stable)
        @Nullable
        default org.cdk8s.Size getStorage()
        Minimum storage size the volume should have.

        Default: - No storage requirement.

      • getStorageClassName

        @Stability(Stable)
        @Nullable
        default String getStorageClassName()
        Name of the StorageClass required by the claim. When this property is not set, the behavior is as follows:.

        • If the admission plugin is turned on, the storage class marked as default will be used.
        • If the admission plugin is turned off, the pvc can only be bound to volumes without a storage class.

        Default: - Not set.

      • getVolume

        @Stability(Stable)
        @Nullable
        default IPersistentVolume getVolume()
        The PersistentVolume backing this claim.

        The control plane still checks that storage class, access modes, and requested storage size on the volume are valid.

        Note that in order to guarantee a proper binding, the volume should also define a claimRef referring to this claim. Otherwise, the volume may be claimed be other pvc's before it gets a chance to bind to this one.

        If the volume is managed (i.e not imported), you can use pv.claim() to easily create a bi-directional bounded claim.

        Default: - No specific volume binding.

      • getVolumeMode

        @Stability(Stable)
        @Nullable
        default PersistentVolumeMode getVolumeMode()
        Defines what type of volume is required by the claim.

        Default: VolumeMode.FILE_SYSTEM