Skip to content

Commit

Permalink
fix(validation): using label instead of annotation in CSPC validation (
Browse files Browse the repository at this point in the history
…#1598)

Signed-off-by: mittachaitu <[email protected]>
  • Loading branch information
sai chaithanya authored Jan 30, 2020
1 parent 0689d00 commit 8f77fb9
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions pkg/webhook/cspc.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,12 +337,9 @@ func (poolValidator *PoolValidator) blockDeviceClaimValidation(bdcName, bdName s
"could not get block device claim for block device {%s}", bdName)
}
cspcName := bdcObject.
GetAnnotations()[string(apis.CStorPoolClusterCPK)]
GetLabels()[string(apis.CStorPoolClusterCPK)]
if cspcName != poolValidator.cspcName {
return errors.Wrapf(err,
"cann't use claimed blockdevice %s",
bdName,
)
return errors.Errorf("can't use claimed blockdevice %s", bdName)
}
return nil
}
Expand Down

0 comments on commit 8f77fb9

Please sign in to comment.