Skip to content
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

Merged
merged 3 commits into from
Aug 6, 2020

Conversation

sonasingh46
Copy link
Contributor

@sonasingh46 sonasingh46 commented Aug 3, 2020

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

pkg/webhook/cspc.go Outdated Show resolved Hide resolved
pkg/webhook/cspc.go Outdated Show resolved Hide resolved
Copy link
Contributor

@mittachaitu mittachaitu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes are good

Ashutosh Kumar added 2 commits August 6, 2020 10:31
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>
bd.Name,
bd.Labels[types.HostNameLabelKey],
)
}
Copy link
Contributor

@prateekpandey14 prateekpandey14 Aug 6, 2020

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

Copy link
Contributor Author

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>
Copy link
Contributor

@prateekpandey14 prateekpandey14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@prateekpandey14 prateekpandey14 merged commit d9023cb into openebs-archive:master Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants