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

feat(spc): add capability to specify allowed BD tags on SPC #1748

Merged
merged 3 commits into from
Sep 8, 2020

Conversation

sonasingh46
Copy link
Contributor

This commit adds the capability to specify allowed BD tags on SPC via
annotations.
The annotation key is cstor.openebs.io/allowed-bd-tags and the allowed value
is comma-separated strings.
For example "fast,slow" is a possible value, and in this case SPC provisioner
will reject BDs that have a BD tag (openebs.io/block-device-tag) present on
it and the value is other than fast or slow.

Signed-off-by: Ashutosh Kumar ashutosh.kumar@mayadata.io

This commit adds capability to specify allowed BD tags on SPC via
annotations.
The annotation key is `cstor.openebs.io/allowed-bd-tags` and allowed value
is comma separated strings.
For example "fast,slow" is a possible value and in this case SPC provisioner
will reject BDs that have a BD tag (`openebs.io/block-device-tag`) present on
it and the value is other than fast or slow.

Signed-off-by: Ashutosh Kumar <ashutosh.kumar@mayadata.io>
Copy link
Contributor

@akhilerm akhilerm left a comment

Choose a reason for hiding this comment

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

looks good. given some nitpick comments.

Signed-off-by: Ashutosh Kumar <ashutosh.kumar@mayadata.io>
Copy link

@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

pkg/blockdevice/v1alpha1/blockdevice.go Outdated Show resolved Hide resolved
@@ -809,3 +809,295 @@ func TestFilterNonReleasedDevices(t *testing.T) {
})
}
}

func TestBDTagFilter(t *testing.T) {

Choose a reason for hiding this comment

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

Nice UT... I like the tag names:+1:

Signed-off-by: Ashutosh Kumar <ashutosh.kumar@mayadata.io>
@sonasingh46 sonasingh46 added the pr/ready-to-merge PR has enough approvals and ready to merge label Sep 8, 2020
@mittachaitu mittachaitu merged commit 73e7013 into openebs-archive:master Sep 8, 2020
mittachaitu pushed a commit to mittachaitu/maya that referenced this pull request Sep 11, 2020
…archive#1748)

* feat(spc): add capability to specify allowed BD tags on SPC

This commit adds the capability to specify allowed BD tags on SPC via
annotations. The annotation key is `openebs.io/allowed-bd-tags` and the
allowed value is comma separated strings.
For example: "fast,slow" is a possible value and in this case SPC provisioner
will reject BDs that have a BD tag (`openebs.io/block-device-tag`) present on
it and the value is other than fast or slow.

Signed-off-by: Ashutosh Kumar <ashutosh.kumar@mayadata.io>
prateekpandey14 pushed a commit that referenced this pull request Sep 11, 2020
* feat(spc): add capability to specify allowed BD tags on SPC

This commit adds the capability to specify allowed BD tags on SPC via
annotations. The annotation key is `openebs.io/allowed-bd-tags` and the
allowed value is comma separated strings.
For example: "fast,slow" is a possible value and in this case SPC provisioner
will reject BDs that have a BD tag (`openebs.io/block-device-tag`) present on
it and the value is other than fast or slow.

Signed-off-by: Ashutosh Kumar <ashutosh.kumar@mayadata.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-review pr/ready-to-merge PR has enough approvals and ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants