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

Implement major upgrade result annotations #2727

Merged
merged 17 commits into from
Aug 28, 2024
Merged

Conversation

idanovinda
Copy link
Member

@idanovinda idanovinda commented Aug 13, 2024

In order to prevent Operator endlessly retrying on failing major version upgrade and also to be able to easily identify and be alerted on unsuccessful automated attempts, we need to implement a set of "Failed upgrade" annotations assigned to postgresql resource manifest.

Postgres-operator should annotate postgresql resource with one of the following values based on the return code of the upgrade script:

last-major-upgrade-success: <timestamp>
last-major-upgrade-failure: <timestamp>

Operator should:

  • not execute the upgrade script if running PG version < manifest PG version but last-major-upgrade-failure is set
  • remove the failure annotation if the running PG version >= manifest PG version
  • set last-major-upgrade-failure when upgrade is failed
  • set last-major-upgrade-success when upgrade is success

closes #2685

@hughcapet hughcapet marked this pull request as ready for review August 13, 2024 14:59
@FxKu FxKu added this to the 1.14.0 milestone Aug 23, 2024
e2e/tests/test_e2e.py Outdated Show resolved Hide resolved
@FxKu FxKu self-requested a review August 28, 2024 13:03
@idanovinda idanovinda merged commit 2e39812 into master Aug 28, 2024
10 checks passed
@idanovinda idanovinda deleted the major-upgrade-annotation branch August 28, 2024 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants