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

Add NodeNameChangeExpected condition type #8

Merged
merged 1 commit into from
Jul 25, 2023

Conversation

slintes
Copy link
Member

@slintes slintes commented Jul 22, 2023

ECOPROJECT-1465

@slintes slintes requested a review from clobrano July 22, 2023 11:14
// ProcessingType is the condition type used to signal the remediation has started and it is in progress, or has finished
ProcessingType = "Processing"
// SucceededType is the condition type used to signal whether the remediation was successful or not
SucceededType = "Succeeded"
// NodeNameChangeExpectedType is the condition type used to signal that the remediated node will have a new name
NodeNameChangeExpectedType = "NodeNameChangeExpected"
Copy link
Member

Choose a reason for hiding this comment

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

I'm assuming we are not tracking the new node, but just deleting the remediation when this condition is detected.
If this is indeed the case, maybe use a more generic condition, so it might be used in future operators as well ?
Something along the lines "Remove Remediation Regardless of healthy condition" (I'm leaving it to you to find an acceptable phrasing 😅 )

Copy link
Member Author

Choose a reason for hiding this comment

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

Not this condition only must be true, also the succeeded condition, and the node must be deleted. So it's not about "ignore node conditions", but "you won't find the new node to check conditions at all".

Copy link
Member

Choose a reason for hiding this comment

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

Not this condition only must be true, also the succeeded condition, and the node must be deleted

Would it make sense for MHC , to place this condition after success condition and node deletion are verified so in turn, for NHC it would be sufficient to only check this condition ? (that way we can have this condition used in other operators as well)

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe we have it a bit more generic without losing context:
Condition type: PermanentNodeDeletionExpected
Condition reason: RemediatedNodeHasNewName
We can add more reasons later then, e.g. when we shut down nodes instead of rebooting.
Does that make sense?
@mshitrit @clobrano

Copy link
Member Author

Choose a reason for hiding this comment

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

The condition message can have even more context, e.g. "Machine deleted on cloud provider, unhealthy node will be replaced by a node with a new name"

Copy link
Contributor

@clobrano clobrano Jul 24, 2023

Choose a reason for hiding this comment

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

I think it's a good trade-off 👍
I'm thinking on the condition message for a way to include the fact that "we cannot track the new node since it will have a new name", but I haven't come up with a good phrase yet

Copy link
Member Author

Choose a reason for hiding this comment

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

oh, I missed a reply

Would it make sense for MHC , to place this condition after success condition and node deletion are verified so in turn, for NHC it would be sufficient to only check this condition ?

hm, I would prefer to keep the scope of each condition small, and let consumers of the conditions decide what to make out of them. Letting the PermanentNodeDeletionExpected condition implicitly also mark remediation as succeeded doesn't make sense to me.

Copy link
Member Author

Choose a reason for hiding this comment

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

  • Type is updated to PermanentNodeDeletionExpected
  • I didn't add the reason, because that's remediator specific, and also NHC does not need it.

@clobrano
Copy link
Contributor

/lgtm
giving time to @mshitrit to review the reply to his comment
/hold

@mshitrit
Copy link
Member

/lgtm
/unhold

@slintes slintes merged commit 3cb76c1 into medik8s:main Jul 25, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants