lvm-localpv icon indicating copy to clipboard operation
lvm-localpv copied to clipboard

validate parameters volgroup with vgpattern in StorageClass

Open mittachaitu opened this issue 3 years ago • 3 comments

Describe the problem/challenge you have If the user specifies both volgroup & vgpattern in StorageClass parameters currently, volgroup will take more precedence and in end, LVM volume will be created on user-specified volgroup. This behavior is good if volgroup value is sub-pattern of vgpattern but if both volgroup and vgpattern differs then CSI driver should error out about discrepancy instead of silently accepting the changes.

Note: Since volgroup is a subpattern of vgpattern good to have only vgpattern support.

Describe the solution you'd like [A clear and concise description of what you want to happen.]

  • Add validation during CreateVolume request if both volgroup and vgpattern are specified and if they are not matching then the driver should error out.

Note: This validation will also handle backward compatibility issues.

Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.] No

Environment:

  • LVM Driver version
  • Kubernetes version (use kubectl version):
  • Kubernetes installer & version:
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):

mittachaitu avatar Jun 21 '21 14:06 mittachaitu