feat: add how-to about verifying component versions with controllers#2407
Conversation
Signed-off-by: Frederic Wilhelm <frederic.wilhelm@sap.com>
Signed-off-by: Frederic Wilhelm <frederic.wilhelm@sap.com>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughUpdates controller signature verification error messages, adds a new how-to documenting controller-based component version signature verification, and modifies the controller Helm install instructions in the setup docs. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (3)
website/content/docs/getting-started/setup-controller-environment.md (1)
236-243: Make expected Helm output less version-specific to reduce doc churn.Since the command does not pin a chart version, fixed version/digest/timestamp values can age quickly.
Suggested resilient output wording
-<summary>You should see this output</summary> +<summary>You should see similar output (version, digest, and timestamp may differ)</summary> ```text -Pulled: ghcr.io/open-component-model/kubernetes/controller/chart:0.4.0 -Digest: sha256:eac0dc587a1d288f36ef1961bb69f0ffb2791e0153f86d1fdbe54ae2f36f1194 +Pulled: ghcr.io/open-component-model/kubernetes/controller/chart:<resolved-version> +Digest: sha256:<resolved-digest> NAME: ocm-k8s-toolkit -LAST DEPLOYED: Tue Apr 28 17:42:51 2026 +LAST DEPLOYED: <current-date-time></details> <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against the current code and only fix it if needed.
In
@website/content/docs/getting-started/setup-controller-environment.mdaround
lines 236 - 243, Replace the version-, digest-, and timestamp-specific Helm
output in the "You should see this output" example with generic placeholders so
the doc doesn’t age; specifically update the Pulled line (currently referencing
chart:0.4.0) to use chart:, the Digest line to
sha256:, and the LAST DEPLOYED line to
(keep NAME: ocm-k8s-toolkit as-is) in the example block in
setup-controller-environment.md so the output stays resilient when the chart is
not pinned.</details> </blockquote></details> <details> <summary>website/content/docs/how-to/verify-component-version-controller.md (2)</summary><blockquote> `232-244`: **Use “Symptom contains” wording to match wrapped controller errors.** These messages are typically prefixes in logs (followed by extra context). Wording them as exact strings can mislead copy/paste troubleshooting. <details> <summary>Proposed doc wording tweak</summary> ```diff -### Symptom: "signature verification failed for signature default" +### Symptom contains: `signature verification failed for signature default:` ... -### Symptom: "signature default not found in component" +### Symptom contains: `signature default not found in component`🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@website/content/docs/how-to/verify-component-version-controller.md` around lines 232 - 244, Update the two symptom headings and any exact-match example phrases so they indicate partial/wrapped log matching by using "Symptom contains: ..." instead of exact quoted strings; specifically change the headings currently showing "signature verification failed for signature default" and "signature default not found in component" to "Symptom contains: 'signature verification failed for signature default'" and "Symptom contains: 'signature default not found in component'", and update the surrounding guidance (including the `verify` configuration mention and the `ocm get cv ...` example) to state these are prefix/contains matches for wrapped controller errors rather than exact strings.
230-273: Consider adding a digest-verification troubleshooting entry.You already document signature and secret failures; adding the digest-failure case would complete the common controller verification errors.
Suggested section addition
## Troubleshooting +### Symptom contains: `digest verification failed for signature "default"` + +**Cause:** The signed descriptor content no longer matches the digest embedded in the signature payload. + +**Fix:** Recreate/sign the component version after descriptor changes, transfer it again, and ensure the referenced version is the newly signed one. + ### Symptom: "signature verification failed for signature default"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@website/content/docs/how-to/verify-component-version-controller.md` around lines 230 - 273, Add a troubleshooting entry for digest verification failures: describe the symptom (e.g., "digest verification failed" or "manifest digest mismatch"), explain the cause (the component's recorded digest doesn't match the actual artifact digest or the `digest` field in the `verify` configuration is wrong), and give concise remediation steps referencing the `verify` configuration, the `digest` field, and the ComponentVersion (CV) output from `ocm get cv ... -o yaml` to inspect the recorded digest and `signatures:` block; include instructions to fetch the artifact's actual digest from the registry (e.g., using an image inspection tool) and to update either the `verify.digest` value or the component's published metadata so the digests match.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@website/content/docs/getting-started/setup-controller-environment.md`:
- Around line 236-243: Replace the version-, digest-, and timestamp-specific
Helm output in the "You should see this output" example with generic
placeholders so the doc doesn’t age; specifically update the Pulled line
(currently referencing chart:0.4.0) to use chart:<resolved-version>, the Digest
line to sha256:<resolved-digest>, and the LAST DEPLOYED line to
<current-date-time> (keep NAME: ocm-k8s-toolkit as-is) in the example block in
setup-controller-environment.md so the output stays resilient when the chart is
not pinned.
In `@website/content/docs/how-to/verify-component-version-controller.md`:
- Around line 232-244: Update the two symptom headings and any exact-match
example phrases so they indicate partial/wrapped log matching by using "Symptom
contains: ..." instead of exact quoted strings; specifically change the headings
currently showing "signature verification failed for signature default" and
"signature default not found in component" to "Symptom contains: 'signature
verification failed for signature default'" and "Symptom contains: 'signature
default not found in component'", and update the surrounding guidance (including
the `verify` configuration mention and the `ocm get cv ...` example) to state
these are prefix/contains matches for wrapped controller errors rather than
exact strings.
- Around line 230-273: Add a troubleshooting entry for digest verification
failures: describe the symptom (e.g., "digest verification failed" or "manifest
digest mismatch"), explain the cause (the component's recorded digest doesn't
match the actual artifact digest or the `digest` field in the `verify`
configuration is wrong), and give concise remediation steps referencing the
`verify` configuration, the `digest` field, and the ComponentVersion (CV) output
from `ocm get cv ... -o yaml` to inspect the recorded digest and `signatures:`
block; include instructions to fetch the artifact's actual digest from the
registry (e.g., using an image inspection tool) and to update either the
`verify.digest` value or the component's published metadata so the digests
match.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 348c79db-1c86-41ca-a4ca-3271bb0de21d
📒 Files selected for processing (3)
kubernetes/controller/internal/resolution/workerpool/workerpool.gowebsite/content/docs/getting-started/setup-controller-environment.mdwebsite/content/docs/how-to/verify-component-version-controller.md
✅ Deploy Preview for ocm-website ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Signed-off-by: Frederic Wilhelm <frederic.wilhelm@sap.com>
Signed-off-by: Frederic Wilhelm <frederic.wilhelm@sap.com>
…omponent-model into add-how-to-verify-controllers
Signed-off-by: Frederic Wilhelm <frederic.wilhelm@sap.com>
Signed-off-by: Frederic Wilhelm <frederic.wilhelm@sap.com>
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
matthiasbruns
left a comment
There was a problem hiding this comment.
looks pretty good - just a few nits
Skarlso
left a comment
There was a problem hiding this comment.
Looks okay, aside from what Matthias already said. :) I agree with those.
…omponent-model into add-how-to-verify-controllers
Signed-off-by: Frederic Wilhelm <frederic.wilhelm@sap.com>
a0c587a to
489d9ce
Compare
…2407) <!-- markdownlint-disable MD041 --> #### What this PR does / why we need it Add a How-To guide for verifying component version signatures using the OCM Kubernetes controller. Currently only CLI-based verification is documented (`ocm verify cv`). This guide covers the declarative approach via the `Component` custom resource's `verify` field. The guide includes: - Two approaches via tabs: inline public key value and Kubernetes Secret reference - How the controller transitively verifies referenced component versions via embedded digests - Troubleshooting with actual error messages from the controller Also fixes typos in workerpool verification error messages. #### Which issue(s) this PR fixes Fixes #2234 --------- Signed-off-by: Frederic Wilhelm <frederic.wilhelm@sap.com> Co-authored-by: Matthias Bruns <github@matthiasbruns.com> ce7338d
What this PR does / why we need it
Add a How-To guide for verifying component version signatures using the OCM Kubernetes controller. Currently only CLI-based verification is documented (
ocm verify cv). This guide covers the declarative approach via theComponentcustom resource'sverifyfield.The guide includes:
Also fixes typos in workerpool verification error messages.
Which issue(s) this PR fixes
Fixes #2234