✨ Backport "Allow disable automated cleaning"#239
Conversation
78a5026 to
6ebd0ec
Compare
6ebd0ec to
2a21e68
Compare
2a21e68 to
0a052c1
Compare
82708ac to
a0847f0
Compare
a0847f0 to
08ea2c9
Compare
|
/test-integration |
| // during provisioning and deprovisioning. | ||
| // +kubebuilder:default:=metadata | ||
| // +kubebuilder:validation:Enum:=metadata;disabled | ||
| AutomatedCleaningMode string `json:"automatedCleaningMode,omitempty"` |
There was a problem hiding this comment.
same as above, Field name is not descriptive.
AutomatedDiskCleaningMode ?
There was a problem hiding this comment.
This is has been already implemented as AutomatedDiskCleaningMode, so changing it here means I need to replace it in BMO as well and in release-0.4 branch. I agree that it might not fully explain what it does, but for that reason I've added documentation.
| // during provisioning and deprovisioning. | ||
| // +kubebuilder:default:=metadata | ||
| // +kubebuilder:validation:Enum:=metadata;disabled | ||
| AutomatedCleaningMode string `json:"automatedCleaningMode,omitempty"` |
There was a problem hiding this comment.
Field name is not descriptive enough, AutomatedCleaningMode
What is it cleaning ? disk ?
Which disk is it cleaning ? non-boot disk ?
There was a problem hiding this comment.
It is about secondary storage (i.e. hosted storage). I think having a good documentation will answer those questions.
| if err := m.client.Update(ctx, m3m); err != nil { | ||
| return errors.Wrapf(err, "failed to update metal3Machine: %s", m3m.Name) | ||
| } | ||
| m.Log.Info("Synchronized automatedCleaningMode field value between Metal3MachineTemplate %v/%v and Metal3MachineMachine %v/%v", m.Metal3MachineTemplate.Namespace, m.Metal3MachineTemplate.Name, m3m.Namespace, m3m.Name) |
There was a problem hiding this comment.
No error may not guarantee proper state change. What if you do assertion on the returned object to see if the field has actually been changed ?
There was a problem hiding this comment.
Right, I added a conditional, do you think that would be good enough?
| properties: | ||
| automatedCleaningMode: | ||
| default: metadata | ||
| description: When set to disabled, automated cleaning will |
There was a problem hiding this comment.
See earlier comment. The two lines could be made to be on the same line
There was a problem hiding this comment.
Please, see my comment above
08ea2c9 to
cd4ed5e
Compare
cd4ed5e to
b2929f3
Compare
|
/cc @furkatgofurov7 |
|
/lgtm |
|
/test-integration |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: furkatgofurov7 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
Backport automated cleaning feature to the master.