-
Notifications
You must be signed in to change notification settings - Fork 17
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
Bmcjob controller implementation #6
Conversation
This PR is a WIP 🏗️ Also need to rebase based on changes discussed in #5 |
Codecov Report
@@ Coverage Diff @@
## main #6 +/- ##
===========================================
- Coverage 58.49% 21.45% -37.04%
===========================================
Files 4 4
Lines 106 289 +183
===========================================
Hits 62 62
- Misses 37 219 +182
- Partials 7 8 +1
Continue to review full report at Codecov.
|
d2ab8e0
to
287106a
Compare
Please could you add to the description commentary on condition semantics. |
Signed-off-by: Aravind Ramalingam <[email protected]>
Signed-off-by: Aravind Ramalingam <[email protected]>
Signed-off-by: Aravind Ramalingam <[email protected]>
Signed-off-by: Aravind Ramalingam <[email protected]>
Signed-off-by: Aravind Ramalingam <[email protected]>
Signed-off-by: Aravind Ramalingam <[email protected]>
Signed-off-by: Aravind Ramalingam <[email protected]>
Signed-off-by: Aravind Ramalingam <[email protected]>
6cfdedc
to
ec9d0b4
Compare
Signed-off-by: Aravind Ramalingam <[email protected]>
6ecd16c
to
16fdead
Compare
Signed-off-by: Aravind Ramalingam <[email protected]>
… change Signed-off-by: Aravind Ramalingam <[email protected]>
Signed-off-by: Aravind Ramalingam <[email protected]>
…when Completed Signed-off-by: Aravind Ramalingam <[email protected]>
Based on discussions I have refactored how BMCJob and BMCTask resources are controlled. bmcjob_controller
bmctask_controller
|
Signed-off-by: Aravind Ramalingam <[email protected]>
if bmcJob.HasCondition(bmcv1alpha1.JobCompleted, bmcv1alpha1.ConditionTrue) || | ||
bmcJob.HasCondition(bmcv1alpha1.JobFailed, bmcv1alpha1.ConditionTrue) { |
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.
Why do we think Failed
is a condition? Wouldn't that just be state on the Status
(Success
or Failed
being the valid values)? In the event its Failed
a description field of some sort. This way, consumers can watch for the condition "Completed" to become true before inspecting the actual result.
I don't recall what we said about Failed
and Success
etc. I'd be OK with allowing this to pass and changing it in a separate PR (or stripping it out of this one if possible). There's a bunch of good stuff here already that we don't want to hold up.
We need to be careful that we're not encoding job state into conditions.
Signed-off-by: Aravind Ramalingam <[email protected]>
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.
I minor comment to fix in a subsequent PR.
) | ||
|
||
// PausedAnnotation is an annotation that can be applied to BaseboardManagement | ||
// object to prevent a controller from processing a resource. | ||
const PausedAnnotation = "bmc.tinkerbell.org/paused" |
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.
Rufuio.tinkerbell.org
Description
The BMCJob controller is responsible for running the Tasks (BMC actions like power and bootdev) listed on a BMCJob CR.
The controller,
Why is this needed
BMCJob is useful for performing one time actions that we want on the servers.
How Has This Been Tested?
Created a KinD cluster and tested creating and deleting BMCJob objects.
Checklist:
I have: