-
Notifications
You must be signed in to change notification settings - Fork 20
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
controller: add disk tags to BlockDeviceSpec #60
controller: add disk tags to BlockDeviceSpec #60
Conversation
bbedf62
to
ff30429
Compare
1d25abf
to
6fb818d
Compare
Need new Longhorn deployment script, depends on harvester/vagrant-rancherd#8 |
daef788
to
5dc1578
Compare
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.
Just to make sure I understand, this is meant to take tags defined via either harvester or longhorn, and add them to the block device spec, and then to the block device status. If so, it looks like it should generally do the right thing, I just have a couple of comments.
Commit 25afa25 ("controller: add disk tags to BlockDeviceSpec") does two things - it updates go.mod etc. with new/updated dependencies, and it also makes those changes to the controller. I'd suggest splitting that into two separate commits, one for the dependency update, and one for the main code change.
5dc1578
to
cf85698
Compare
Good suggestions, I split another commit for it. That will make the review easier. Thanks for the suggestion. |
78bb1b8
to
dea6895
Compare
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
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.
Oops, no, wait a sec - I read the code but didn't check the tests, one of which has failed: https://github.com/harvester/node-disk-manager/actions/runs/7112001697/job/19361613496?pr=60
This failed because |
e562c5e
to
6f9e796
Compare
Depends on harvester/go-common#8 BTW, CI is also fixed now. |
6f9e796
to
da5036b
Compare
Hi @tserong, Please help recheck this PR. |
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!
28a192d
to
a4b5452
Compare
- Also bump golangci-lint to v1.55.2 Signed-off-by: Vicente Cheng <[email protected]>
a4b5452
to
06cd1f0
Compare
71c2e5c
to
d206949
Compare
621f73f
to
58b3658
Compare
Signed-off-by: Vicente Cheng <[email protected]>
- for slice related functions Signed-off-by: Vicente Cheng <[email protected]>
- we do not need the long jitter Signed-off-by: Vicente Cheng <[email protected]>
Now, the BlockDevices CR will handle its disk Tags. These tags will deploy to the Longhorn node. Some related fields, - Blockdevice.Spec.Tags: Harvester defined disk Tags - Blockdevice.Status.Tags: disk Tags from longhorn nodes and Harvester defined - disk.Tags of nodes.longhorn.io: disk Tags defined by both harvester and longhorn - change the variable name from needUpdated -> updated, that will make it more readable. Signed-off-by: Vicente Cheng <[email protected]>
- deploy longhorn v1.5.3 - update the deployment CRD - Add tags with provision - Remove tags from provisioned blockdevice - Add tags to provisioned blockdevice - Add more info with upgrade operation Signed-off-by: Vicente Cheng <[email protected]>
58b3658
to
3b62c68
Compare
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, thanks!
@Mergifyio backport v0.6.x |
✅ Backports have been created
|
Problem:
We want to add tags when we add extra disks.
(We need to add tags after we provision the disk )
Solution:
Add
Tags
to BlockDeviceSpec, then the controller can add it when provisioningRelated Issue:
harvester/harvester#2717
Test plan:
nodes.longhorn.io
. The related disk should have the same tags.Tasks