Skip to content

add basic plumbing for provider startup checks#194

Merged
turkenf merged 1 commit intocrossplane-contrib:mainfrom
jastang:bootcheck
Jul 21, 2025
Merged

add basic plumbing for provider startup checks#194
turkenf merged 1 commit intocrossplane-contrib:mainfrom
jastang:bootcheck

Conversation

@jastang
Copy link
Copy Markdown
Member

@jastang jastang commented Jul 21, 2025

Description of your changes

This PR proposes a simple approach to enable custom startup checks on the provider. As a concrete example, users may run their workloads in highly regulated environments where the provider should not start if the environment is not properly configured.

This implements the default path, which is a no-op. It uses a combination of an init() hook and go build tags to:

  • minimize code branching (build-time isolation)
  • ensure critical checks run before anything else (fail fast)
  • not require access to additional flags, env, or setup

Users can implement an array of preflight checks as separate files in this repository or a fork, and supply GO_TAGS=<..> to build an image with a specific one.

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable to ensure this PR is ready for review.

How has this code been tested

locally built xpkg installation.

Signed-off-by: Jason Tang <jason@upbound.io>
Copy link
Copy Markdown
Collaborator

@jeanduplessis jeanduplessis left a comment

Choose a reason for hiding this comment

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

LGTM

@turkenf turkenf merged commit 7599dfd into crossplane-contrib:main Jul 21, 2025
8 checks 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.

4 participants