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

Do not mark suspended resource as not ready #162

Merged
merged 1 commit into from
Nov 25, 2020
Merged

Conversation

hiddeco
Copy link
Member

@hiddeco hiddeco commented Nov 25, 2020

If a resource is marked as suspended we should not perform any
reconciliation action for the resource at all.

This includes updating the status of the resource to a
Ready==False state, as this is not an accurate representation of
the resource's state: we have been told to no longer look at it
and with that our last observation freezes in time.

Resource deletions are the sole exception to actions (not) being
performed, as we are duty-bound to remove our finalizer from the
resource to make a deletion succeed.

To make the suspend state still visible to the user, a column has
been added to the Custom Resource Definition which prints the
.spec.suspend of every HelmRelease.

❯ kubectl get helmrelease
NAME          READY   STATUS                             SUSPENDED   AGE
podinfo       True    Release reconciliation succeeded   true        22m
podinfo-git   True    Release reconciliation succeeded   false       22m

Ref: fluxcd/flux2#507

@hiddeco hiddeco requested a review from stefanprodan November 25, 2020 18:21
If a resource is marked as suspended we should not perform any
reconciliation action for the resource at all.

This includes updating the status of the resource to a
`Ready==False` state, as this is not an accurate representation of
the resource's state: we have been told to no longer look at it
and with that our last observation freezes in time.

Resource deletions are the sole exception to actions (not) being
performed, as we are duty-bound to remove our finalizer from the
resource to make a deletion succeed.

To make the suspend state still visible to the user, a column has
been added to the Custom Resource Definition which prints the
`.spec.suspend` of every HelmRelease.

Signed-off-by: Hidde Beydals <hello@hidde.co>
@hiddeco hiddeco changed the title Do not mark suspended release as not ready Do not mark suspended resource as not ready Nov 25, 2020
Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

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

LGTM 💯

@hiddeco hiddeco merged commit 0976bc5 into main Nov 25, 2020
@hiddeco hiddeco deleted the suspend-refactor branch November 25, 2020 19:41
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.

2 participants