-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(validations): add check for BD tag presence #147
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes are good
BD can be tagged in order to reserve it to be used later or by other storage engine. If a tag is found in BD then it should not be used by cstor. This commit adds a check for this. If a tag is found in BD and is used in CSPC for cStor pool provisioning then the cStor webhook server will reject the request. Signed-off-by: Ashutosh Kumar <ashutosh.kumar@mayadata.io>
Signed-off-by: Ashutosh Kumar <ashutosh.kumar@mayadata.io>
pkg/webhook/cspc.go
Outdated
bd.Name, | ||
bd.Labels[types.HostNameLabelKey], | ||
) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have a similar check above ^^ line 409-415
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I think rebasing brought this issue back. Fixed it. Thanks.
Signed-off-by: Ashutosh Kumar <ashutosh.kumar@mayadata.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
BD can be tagged in order to reserve it to be used later or by other storage
engine. If a tag is found in BD then it should not be used by cstor. This commit
adds a check for this. If a tag is found in BD and is used in CSPC for cStor
pool provisioning then the cStor webhook server will reject the request.
NOTE: This PR https://github.com/openebs/api/pull/62/files needs to be merged first and then a rebase will be required for the current PR.
Signed-off-by: Ashutosh Kumar ashutosh.kumar@mayadata.io