Recovery: API and docs - #102
Open
tkatila wants to merge 2 commits into
Open
Conversation
ContentImageVerifier no longer speaks in API types nor knows anything about firmware. Its single method is VerifyImage(ctx, ImageVerifyRequest), where the request carries the image reference, pull secret, TLS setting and the expected files as plain fields, so any caller can use the verifier without owning a GPUFirmwareUpdate. An empty Files list means "reachability only" and resolves the manifest with remote.Head instead of pulling every layer and streaming the export. Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
There was a problem hiding this comment.
Pull request overview
This PR introduces the new GPU recovery API surface and documentation, and refactors firmware-update content image verification to use a generic request shape (aligning with the referenced fwupdate PR #101 direction).
Changes:
- Add
GPURecoveryPlanv1alpha1 API types, register them in the scheme, and include generated deepcopy + CRD manifests (plus Helm CRD sync). - Add recovery documentation (
RECOVERY.md) and link it fromREADME.md, plus add samples and RBAC helper roles. - Refactor
ContentImageVerifierto a genericVerifyImage(ctx, ImageVerifyRequest)and update firmware-update controller/tests accordingly (including a reachability-only fast path).
Reviewed changes
Copilot reviewed 19 out of 20 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| RECOVERY.md | Adds detailed recovery workflow documentation and usage guidance. |
| README.md | Adds a “GPU recovery” section and links to RECOVERY.md. |
| PROJECT | Registers the new GPURecoveryPlan API with kubebuilder project config. |
| Makefile | Syncs the new recovery CRD into the Helm chart CRDs directory. |
| internal/controller/gpufirmwareupdate_controller.go | Updates firmware content-image verification to use generic VerifyImage request. |
| internal/controller/gpufirmwareupdate_controller_test.go | Updates tests for new verifier interface and request/file shapes. |
| internal/controller/contentimage_verifier.go | Generalizes verifier interface/types and adds reachability-only verification path. |
| internal/controller/contentimage_verifier_test.go | Adds a unit test for path normalization helper. |
| config/samples/recoveryplan/kustomization.yaml | Adds kustomize sample scaffold for recovery plan. |
| config/samples/recoveryplan/gpurecoveryplan.yaml | Provides a commented sample GPURecoveryPlan manifest. |
| config/rbac/kustomization.yaml | Wires recovery plan admin/editor/viewer helper ClusterRoles into kustomization. |
| config/rbac/gpurecoveryplan_*_role.yaml | Adds helper ClusterRoles for recovery plan RBAC. |
| config/crd/kustomization.yaml | Includes the new recovery plan CRD base. |
| config/crd/bases/intel.com_gpurecoveryplans.yaml | Generated GPURecoveryPlan CRD definition. |
| charts/gpu-base-operator/crds/gpurecoveryplans.yaml | Helm chart CRD copy of the generated recovery plan CRD. |
| api/v1alpha1/zz_generated.deepcopy.go | Generated deep-copies for new API types. |
| api/v1alpha1/groupversion_info.go | Registers GPURecoveryPlan types in the scheme. |
| api/v1alpha1/gpurecoveryplan_types.go | Defines the new GPURecoveryPlan API types and validation markers. |
Files not reviewed (1)
- api/v1alpha1/zz_generated.deepcopy.go: Generated file
Suppressed comments (1)
api/v1alpha1/gpurecoveryplan_types.go:279
- GoldenFirmwareSource’s comment says "At least one of ContainerSource or VolumeSource must be set", but the docs (and the state machine) describe cases where goldenFirmware is absent/empty and the event should move to missing-goldenfw. The comment should reflect that empty is allowed (and VolumeSource is not supported yet).
// GoldenFirmwareSource describes where the firmware file is located.
// At least one of ContainerSource or VolumeSource must be set.
type GoldenFirmwareSource struct {
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
tkatila
force-pushed
the
recovery-api-docs
branch
from
August 31, 2026 14:09
6f89daf to
dfaa651
Compare
Introduce the cluster-scoped GPURecoveryPlan kind: a plan per GPU model, an admin-approval model over the recovery events the operator reports, and the reset/reflash types it can run. This is the API surface only, so it can be reviewed before the implementation lands. There is no controller, no webhook and no kubectl plugin here, and the CRD is not yet reconciled by anything — RECOVERY.md describes the whole feature, including the parts (metrics, the kubectl gpurecovery plugin) that arrive with the implementation. Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
tkatila
force-pushed
the
recovery-api-docs
branch
from
August 31, 2026 15:36
dfaa651 to
1dca0f7
Compare
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.
Includes also the fwupdate PR #101 content though it's not required for anything.
Please note, the main content in this PR is the
gpurecoveryplan_types.goandRECOVERY.md. The CRD yamls and copy functions are generated.