Add Go SDK for GPUs#688
Closed
pteranodan wants to merge 6 commits into
Closed
Conversation
b795e7c to
68292a4
Compare
Contributor
|
/ok-to-test 68292a4 |
Signed-off-by: Dan Huenecke <dhuenecke@nvidia.com>
Signed-off-by: Dan Huenecke <dhuenecke@nvidia.com>
Signed-off-by: Dan Huenecke <dhuenecke@nvidia.com>
Signed-off-by: Dan Huenecke <dhuenecke@nvidia.com>
68292a4 to
0ec601a
Compare
Signed-off-by: Dan Huenecke <dhuenecke@nvidia.com>
866111e to
2c8bdb0
Compare
2c8bdb0 to
85c962d
Compare
Signed-off-by: Dan Huenecke <dhuenecke@nvidia.com>
85c962d to
0cd9651
Compare
0cd9651 to
d6c5c46
Compare
Contributor
Author
|
Closing this PR in favor of #692 to avoid fighting git/github ui after squashed version didn't share enough common history |
15 tasks
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.
Summary
This PR introduces a Go SDK for the NVIDIA Device API, enabling Kubernetes-native patterns (Informers, Listers,
controller-runtime) over a node-local gRPC connection via generated clients.It also slightly refactors the internal protobuf representations in the
apimodule to ensure seamless compatibility with the Kubernetes ecosystem without changing the core of the API.Key Changes
1. API Module Refactor (
api/)Refactored the API layer to support stricter interface compliance and standard client machinery:
ObjectMetaandListMetamessage types to satisfymetav1interface requirements without needing custom conversions.resource_versionfields to enable the optimistic concurrency and Watch semantics required by K8s caching layers.GetOptionsandListOptionsmessage types to satisfy standard Kubernetes client APIs.deepcopymethods) handled by a centralized code-generator library viamake code-gen.2. Go Client SDK (
client-go/)Adds a generated client that provides the standard
client-goexperience over a node-local gRPC connection via Unix domain sockets (UDS).Clientset(and Fakes),Listers, andInformers.3. Code Generation (
code-generator)Introduces a dedicated directory for managing all code generation:
kube_codegen.sh, a reusable library for orchestrating generation of Go bindings, gRPC interfaces, helpers, and clients (and fakes).client-genwhich handles gRPC service mapping to the standard K8s client interfaces.3. Documentation & Examples
fake-serverto mock the Device API for local development/verification.README.md's,DEVELOPMENT.md's, andCONFIGURATION.md's.Future Extensibility
Update,Patch) to existing resources only requires updating the// +genclienttags in the API module, implementing the corresponding service methods on the server.client-genmachinery.apimodule with standard markers will automatically generate the full stack: DeepCopy methods, Proto-to-Go conversions, Typed Clients (and Fakes), Informers, and Listers.Type of Change
Component(s) Affected
Testing
Checklist
Review Guidance
This PR includes a significant amount of generated code which is collapsed by default in the diff (via
.gitattributes).Files to Skip:
api/**/zz_generated.*.go(DeepCopy, Conversions, etc.)*.pb.go(Protobuf bindings)client-go/{client,informers,listers}/**(Standard K8s client machinery)Focus Areas:
api/(Go types),client-go/nvgrpc/(Connection logic), andcode-generator/client-go/examples/