Skip to content

Commit

Permalink
controller: add capability for Spec.Filesystem.Provisioned
Browse files Browse the repository at this point in the history
    - That user can use the old config to provision the longhornV1

Signed-off-by: Vicente Cheng <vicente.cheng@suse.com>
  • Loading branch information
Vicente-Cheng committed Sep 23, 2024
1 parent b6e7af2 commit 6801eb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controller/blockdevice/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func (c *Controller) finalizeBlockDevice(oldBd, newBd *diskv1.BlockDevice, devPa
}

func (c *Controller) generateProvisioner(device *diskv1.BlockDevice) (provisioner.Provisioner, error) {
if device.Spec.Provisioner == nil && device.Status.ProvisionPhase != diskv1.ProvisionPhaseProvisioned {
if device.Spec.Provisioner == nil && !device.Spec.FileSystem.Provisioned && device.Status.ProvisionPhase != diskv1.ProvisionPhaseProvisioned {
return nil, nil
}
logrus.Infof("Generate provisioner from device %s, content: %v", device.Name, device.Spec.Provisioner)
Expand Down

0 comments on commit 6801eb7

Please sign in to comment.