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

Generic provisioners #6084

Merged
merged 20 commits into from
Nov 20, 2024
Merged

Generic provisioners #6084

merged 20 commits into from
Nov 20, 2024

Conversation

begelundmuller
Copy link
Contributor

@begelundmuller begelundmuller commented Nov 12, 2024

This PR refactors the admin service to support generic provisioners. This paves the way for not only provisioning managed runtimes, but also managed ClickHouse clusters and more.

Main changes:

  • Introduces a generic Provisioner interface in admin/provisioner/provisioner.go
  • The provisioner interface centers around creating/updating/checking/removing "resources":
    • Resources are managed per deployment
    • Resources have state which the provisioner can update
    • Resources are tracked in a new database table provisioner_resources
  • Refactors the validate_deployments and check_provisioner_capacity jobs to use health check functions on the provisioner interface

Potential future work:

  • We now create a deployment with status=pending before provisioning a runtime for it. We should move completion of the deployment to a retryable background job.
  • Support updating the slots assigned to an existing deployment when the provisioner allows it.
  • The provisioner interface's Provision and CheckResource functions are very similar, particularly because Provision is also used for updates. We should consider merging these three functions into one Reconcile function.
  • Support the provisioner changing its config after the initial provisioning (by having some kind of reconcile for instance config).

@begelundmuller begelundmuller self-assigned this Nov 18, 2024
@begelundmuller begelundmuller marked this pull request as ready for review November 18, 2024 17:32
@begelundmuller begelundmuller merged commit 24e7a45 into main Nov 20, 2024
10 checks passed
@begelundmuller begelundmuller deleted the begelundmuller/generic-provisioners branch November 20, 2024 14:45
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