Skip to content

Conversation

dtantsur
Copy link
Member

@dtantsur dtantsur commented Apr 8, 2025

Per somewhat hidden documentation [1], we must inspect the Progressing
condition and its Reason. Available is still True directly after an update
because the old replica is still running.

On top of that, stop reconciliation with a fatal error when the
deployment no longer progresses.

Unfortunately, client-go does not expose the necessary Reason constants,
so I have to hardcode them based on the values from the documentation
and real-world testing.

[1] https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#complete-deployment

Signed-off-by: Dmitry Tantsur dtantsur@protonmail.com

Per somewhat hidden documentation [1], we must inspect the Progressing
condition and its Reason. Available is still True directly after an update
because the old replica is still running.

On top of that, stop reconciliation with a fatal error when the
deployment no longer progresses.

Unfortunately, client-go does not expose the necessary Reason constants,
so I have to hardcode them based on the values from the documentation
and real-world testing.

[1] https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#complete-deployment

Signed-off-by: Dmitry Tantsur <dtantsur@protonmail.com>
@metal3-io-bot metal3-io-bot requested review from Rozzii and tuminoid April 8, 2025 12:55
@metal3-io-bot metal3-io-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Apr 8, 2025
@dtantsur dtantsur added this to the IrSO - v0.4 milestone Apr 8, 2025
@dtantsur
Copy link
Member Author

dtantsur commented Apr 9, 2025

/hold

Even this is not enough.

@metal3-io-bot metal3-io-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 9, 2025
Signed-off-by: Dmitry Tantsur <dtantsur@protonmail.com>
@dtantsur
Copy link
Member Author

/hold cancel

I think this approach works

@metal3-io-bot metal3-io-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 10, 2025
@dtantsur
Copy link
Member Author

/cc @lentzi90

Your expertise is needed here. This patch is an outcome of trial-and-error. I don't think there are better options but I might very well be missing something.

@metal3-io-bot metal3-io-bot requested a review from lentzi90 April 10, 2025 07:14
Copy link
Member

@Rozzii Rozzii left a comment

Choose a reason for hiding this comment

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

/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Apr 10, 2025
Copy link
Member

@lentzi90 lentzi90 left a comment

Choose a reason for hiding this comment

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

It looks correct to me. It is quite ridiculous how hard it is to determine if a deployment is in good shape or not...
/approve

@metal3-io-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lentzi90

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@metal3-io-bot metal3-io-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 11, 2025
@metal3-io-bot metal3-io-bot merged commit 9408c15 into metal3-io:main Apr 11, 2025
13 checks passed
@dtantsur dtantsur deleted the deploy-complete branch April 11, 2025 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants