-
Notifications
You must be signed in to change notification settings - Fork 115
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
add support for draining single nodes #843
Conversation
With this change if a single node needs to drain to make configure changes it will remove pods using SR-IOV devices, but in case if a reboot is needed we just go and reboot. This is an improvements from the skipDrain option we have in the sriovOperatorConfig where in case of only draining is needed to make the configuration change running pods using sriov will lost the VFs in runtime... Signed-off-by: Sebastian Sch <[email protected]>
Thanks for your PR,
To skip the vendors CIs, Maintainers can use one of:
|
Pull Request Test Coverage Report for Build 13242265777Details
💛 - Coveralls |
@@ -22,6 +22,13 @@ type SriovNetworkPoolConfigSpec struct { | |||
// even if maxUnavailable is greater than one. | |||
MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` | |||
|
|||
// SkipDrainOnReboot defines if the operator should make a full no drain before reboot |
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.
What does "full no drain" mean?
@@ -172,6 +178,7 @@ func (dr *DrainReconcile) tryDrainNode(ctx context.Context, node *corev1.Node) ( | |||
} | |||
reqLogger.Info("Max node allowed to be draining at the same time", "MaxParallelNodeConfiguration", maxUnv) | |||
reqLogger.Info("Count of draining", "drainingNodes", current) | |||
reqLogger.Info("Check Skip Drain on boot config", "SkipDrainOnReboot", nodePool.Spec.SkipDrainOnReboot) |
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.
skip drain on reboot ?
// This is useful for single node deployments instead of using the skipDrain from the operatorConfig. | ||
// This will allow the operator to drain pods using sriov devices when drain is needed on single node | ||
// instead of just removing the VF's from running pods that is the case if skipDrain is used. | ||
SkipDrainOnReboot bool `json:"skipDrainOnReboot,omitempty"` |
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.
to consider:
implicitly skip drain if reboot requested in case of a single node cluster.
deprecate in favor of #850 |
With this change if a single node needs to drain to make configure changes it will remove pods using SR-IOV devices, but in case if a reboot is needed we just go and reboot.
This is an improvements from the skipDrain option we have in the sriovOperatorConfig where in case of only draining is needed to make the configuration change running pods using sriov will lost the VFs in runtime...