crc icon indicating copy to clipboard operation
crc copied to clipboard

create `LVMCluster` resource on `crc start`

Open anjannath opened this issue 1 year ago • 2 comments

after https://github.com/crc-org/snc/issues/867 openshift bundles will have the LVMS operator installed in the cluster, to make use of it we need to create the LVMCluster crd resource provided by the operator to have the necessary storage class, CSI drivers setup to handle dynamic provisioning of the PVCs

to create the LVMCluster resource we also need to provide the disk to be used for creating the lvm volumes, so we need to also create a second disk image for the vm.

apiVersion: lvm.topolvm.io/v1alpha1
kind: LVMCluster
metadata:
  name: my-lvmcluster
spec:
  storage:
    deviceClasses:
    - name: vg1
      fstype: ext4 
      default: true
      deviceSelector: 
        paths:
        - /dev/disk/by-path/pci-0000:87:00.0-nvme-1
        - /dev/disk/by-path/pci-0000:88:00.0-nvme-1
        forceWipeDevicesAndDestroyAllData: true
      thinPoolConfig:
        name: thin-pool-1
        sizePercent: 90 
        overprovisionRatio: 10

Todo

  • [ ] add creation of second disk image in drivers (vfkit, libvirt and hyper-v drivers)
  • [ ] add a config option to enable users to choose if they want to use LVMS operator
  • [ ] create disk and LVMCluster resource during crc start

anjannath avatar Apr 03 '24 05:04 anjannath

add a config option to enable users to choose if they want to use LVMS operator

why a config option?

cfergeau avatar Apr 03 '24 08:04 cfergeau

add a config option to enable users to choose if they want to use LVMS operator

why a config option?

initially, i thought of having a config option to enable/disable the topolvm, and also keep the hostpath-provisioner that we have currently, but it doesn't have any usefulness for users, it was just a thought to be able to test quickly the new topolvm without removing the hostpath-provisioner

anjannath avatar Apr 09 '24 12:04 anjannath

this is not needed anymore, installation of the operator is now handled in snc, by https://github.com/crc-org/snc/pull/877

anjannath avatar Jun 06 '24 11:06 anjannath