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 report success before package deployment is ready #4647

Merged
merged 1 commit into from
Sep 20, 2023

Conversation

turkenh
Copy link
Member

@turkenh turkenh commented Sep 20, 2023

Description of your changes

The post establish hook reporting success early before the provider/function deployment has an Available condition resulting the fluctuation in the health of the provider as follows:

❯ kubectl get providers.pkg.crossplane.io -w
NAME            INSTALLED   HEALTHY   PACKAGE                                                    AGE
provider-helm                         xpkg.upbound.io/crossplane-contrib/provider-helm:v0.15.0   0s
provider-helm   True        Unknown   xpkg.upbound.io/crossplane-contrib/provider-helm:v0.15.0   1s
provider-helm   True        True      xpkg.upbound.io/crossplane-contrib/provider-helm:v0.15.0   21s # <--- 
provider-helm   True        False     xpkg.upbound.io/crossplane-contrib/provider-helm:v0.15.0   22s # <--- 
provider-helm   True        True      xpkg.upbound.io/crossplane-contrib/provider-helm:v0.15.0   27s

Note that it reports unhealthy after reporting healthy.

This PR fixes this situation by properly handling Deployment not having the available status at all. Now it becomes as follow:

❯ kubectl get providers.pkg.crossplane.io -w
NAME            INSTALLED   HEALTHY   PACKAGE                                                    AGE
provider-helm                         xpkg.upbound.io/crossplane-contrib/provider-helm:v0.15.0   0s
provider-helm   True        Unknown   xpkg.upbound.io/crossplane-contrib/provider-helm:v0.15.0   1s
provider-helm   True        False     xpkg.upbound.io/crossplane-contrib/provider-helm:v0.15.0   22s
provider-helm   True        False     xpkg.upbound.io/crossplane-contrib/provider-helm:v0.15.0   22s
provider-helm   True        True      xpkg.upbound.io/crossplane-contrib/provider-helm:v0.15.0   29s

I have:

  • Read and followed Crossplane's contribution process.
  • Added or updated unit and E2E tests for my change.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR, if necessary.
  • Opened a PR updating the docs, if necessary.

Signed-off-by: Hasan Turken <turkenh@gmail.com>
@turkenh turkenh requested a review from a team as a code owner September 20, 2023 12:29
@turkenh turkenh merged commit 6615a11 into crossplane:master Sep 20, 2023
16 of 17 checks passed
@turkenh turkenh deleted the are-you-ready branch September 20, 2023 12:51
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.

None yet

3 participants