Skip to content

karpenter: build, package and deploy the unbounded-karpenter controller - #1120

Open
Israel Miller (imiller31) wants to merge 2 commits into
ismille/karpenter-plugin-lifecyclefrom
ismille/karpenter-plugin-packaging
Open

Israel Miller (imiller31) wants to merge 2 commits into
ismille/karpenter-plugin-lifecyclefrom
ismille/karpenter-plugin-packaging

Conversation

@imiller31

Copy link
Copy Markdown
Contributor

Stacks on #1119.

Adds the unbounded-karpenter binary and what is needed to deploy it.

What changed

  • Binary (cmd/unbounded-karpenter). Upstream Karpenter's controllers with the Unbounded cloud provider and the allocation lifecycle controller.
  • Manifests (internal/manifests, make karpenter-manifests). One rendered manifest with the upstream Karpenter CRDs taken from the pinned module, RBAC, and a two-replica leader-elected Deployment. The plugin may read MachineClasses and create, patch and delete MachineAllocations; it reads no Secrets or ConfigMaps.
  • Admission policy. A ValidatingAdmissionPolicy limits the plugin's service account to allocations it owns and keeps it from changing allocation finalizers. It fails closed.
  • Image (images/karpenter, make image-karpenter-local).
  • Integration tests (internal/integration). Run the provider and the built binary against a real API server with the generated capacity CRDs and the rendered admission policy. They skip without KUBEBUILDER_ASSETS.

Note

No provider on main serves MachineClass or MachineAllocation yet, so the plugin cannot autoscale a cluster until one lands. The AzureVM capacity adapter follows as a separate PR.

Testing

make karpenter and make karpenter-manifests.

Add the unbounded-karpenter binary: upstream Karpenter's controllers
compiled with the Unbounded cloud provider and the allocation lifecycle
controller.

make karpenter-manifests renders one manifest with the pinned upstream
Karpenter CRDs, least-privilege RBAC, the Deployment and an admission
policy that limits the plugin to allocations it owns and keeps it from
changing their finalizers. make image-karpenter-local builds the image.

Integration tests run the provider and the built binary against a real
API server with the generated capacity CRDs.
The integration tests skip without KUBEBUILDER_ASSETS, and the Test job
did not provide them, so CI built the binary but never ran the tests
that exercise it. make karpenter-test-ci provisions the pinned assets
first, the way racer-envtest-ci does.

This branch has not been deployed

No deployments
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.

1 participant