OCPSTRAT-3624: Add GCP disk license passthrough support - #184
OCPSTRAT-3624: Add GCP disk license passthrough support#184redhat-chai-bot wants to merge 2 commits into
Conversation
Pass the Licenses field from GCPDisk spec through to the GCP AttachedDiskInitializeParams when creating instances. This enables users to specify license URLs on disks for BYOL and software licensing tracking scenarios. The vendored openshift/api GCPDisk struct is temporarily updated to include the Licenses field, pending the merge of openshift/api#2980. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@redhat-chai-bot: This pull request references OCPSTRAT-3624 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the feature to target either version "5.0.0." or "openshift-5.0.0.", but it targets "openshift-5.1" instead. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Warning Review limit reached
Next review available in: 85 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (38)
📒 Files selected for processing (1)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
WalkthroughThe machine reconciler now forwards provider disk licenses to GCP disk initialization requests. Tests verify configured licenses and omitted license lists. ChangesDisk license propagation
Estimated code review effort: 1 (Trivial) | ~5 minutes Mergeability Score: ⚪ Minimal · up to This localized change passes configured GCP disk licenses through during instance creation while preserving nil behavior; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ 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 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/retest Updated with AI-generated. Review for accuracy. |
Add go.mod replace directive pointing to the openshift/api fork branch (redhat-chai-bot/api@mapi-gcp-disk-licenses) which includes the GCPDisk.Licenses field with Pattern validation. This replaces the temporary manual vendor edit with the proper vendored version. The replace directive should be removed once openshift/api#2980 is merged and the dependency is updated normally. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@redhat-chai-bot: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary
Passes
Licensesfrom theGCPDiskspec through tocompute.AttachedDiskInitializeParams.Licenseswhen creating GCP instances via the Machine API reconciler.This enables specifying GCP license self-link URLs (e.g. for on-demand Windows licensing on bare metal nodes) in the Machine spec, which are then applied to the disk during instance provisioning.
Changes
reconciler.go: AddedLicenses: disk.Licensesto theAttachedDiskInitializeParamsstruct construction (~line 332)reconciler_test.go: Added 2 test cases:Disk licenses are passed through to the GCP API call— verifies populated licenses flow throughNil disk licenses preserves existing behavior— verifies backward compatibilityvendor/.../types_gcpprovider.go: Temporarily addedLicenses []stringto the vendoredGCPDiskstruct (pending openshift/api#2980 merge and vendor bump)Dependencies
Jira
OCPSTRAT-3624
Note
GCP documentation states the
AttachedDiskInitializeParams.Licensesfield may be reserved for Google's use. CI/E2E testing will determine whether this approach works for on-demand Windows licensing. If not, an alternative approach (creating a standalone disk with licenses viadisks.insert, then attaching it) would be needed."AI-generated. Review for accuracy.
@damdo requested in Slack thread
Summary by CodeRabbit
Bug Fixes
Tests