Repository navigation
karpenter: add the plugin module and its view of the capacity API - #1117
Open
Israel Miller (imiller31) wants to merge 1 commit into
Open
Israel Miller (imiller31) wants to merge 1 commit into
Israel Miller (imiller31) wants to merge 1 commit into
Conversation
Start the Unbounded Karpenter plugin as a nested Go module, because upstream Karpenter pins older Kubernetes libraries than the root module. The module does not import the root module. It projects the MachineClass and MachineAllocation fields it uses, and a contract test checks those projections against the generated CRDs. MachineClass is the Karpenter NodeClass: it is ready only when its Ready condition was observed for the current generation. CI lints and tests the module through make karpenter-lint and make karpenter-test.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First of four stacked PRs that add the Unbounded Karpenter plugin: upstream Karpenter compiled with one cloud provider that uses only MachineClass and MachineAllocation. It has no cloud SDK and no per-provider code, so one plugin works with every provider that serves those two resources.
This PR adds the module and the types it reads. Nothing runs yet.
What changed
plugins/karpenter). Upstream Karpenter pins older Kubernetes libraries than the root module, so the plugin is its own Go module and does not import the root module.internal/capacity). The MachineClass offering and MachineAllocation fields the plugin reads and writes.contract_test.gochecks them against the generated CRDs indeploy/machina/crd, so a schema change that the projection misses fails the test.internal/nodeclass). MachineClass is used directly as the Karpenter NodeClass, with no wrapper CRD. It reports Ready only when its Ready condition was observed for the current generation.make karpenter,karpenter-fmt,karpenter-lintandkarpenter-testdelegate to the module's Makefile. The CI lint and test jobs run the lint and test targets, because the root targets do not cover a nested module.Testing
make karpenter(lint and unit tests).