Skip to content

fix: allow RHEL host subscriptions with custom driver repo config - #2890

Open
rahulait wants to merge 1 commit into
NVIDIA:mainfrom
rahulait:fix-rhel-repoconfig-host-subscription
Open

rahulait wants to merge 1 commit into
NVIDIA:mainfrom
rahulait:fix-rhel-repoconfig-host-subscription

Conversation

@rahulait

@rahulait rahulait commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes: #2817

Fixes RHEL driver installation when a custom repository is used alongside the host’s Red Hat subscription repositories.
Users can now configure:

driver:
  repoConfig:
    configMapName: custom-repos
    useHostSubscription: true

This mounts both the custom repository and the host RHEL subscription configuration, allowing DNF to access BaseOS/AppStream packages as well as additional custom repositories.
The default behavior is unchanged: when useHostSubscription is omitted, repoConfig remains suitable for air-gapped installations and host subscription mounts are skipped.

Checklist

  • No secrets, sensitive information, or unrelated changes
  • Lint checks passing (make lint)
  • Generated assets in-sync (make validate-generated-assets)
  • Go mod artifacts in-sync (make validate-modules)
  • Test cases are added for new code paths

Testing


Devin Review

@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

📝 Walkthrough

Walkthrough

Adds UseHostSubscription to both driver repository API versions and Helm configuration. RHEL subscription mounts are retained when repository configuration is enabled and host subscription use is explicitly enabled. Controller and driver state tests cover custom repositories, host subscription mounts, repeated transformation, configuration propagation, and unique mount paths.

Priority: ➖ Normal

Severity of issue fixed: Medium

Merge Risk: 🔵 Low · up to dd333

The feature remains usable through CRDs, but OLM metadata and regression coverage are incomplete. Address the generated CSV and test assertions before relying on the combined repository behavior.


Comment @coderabbitai help to get the list of available commands.

coderabbitai[bot]

This comment was marked as resolved.

@rahulait
rahulait force-pushed the fix-rhel-repoconfig-host-subscription branch from 4a2b17e to dd333ec Compare September 11, 2026 21:32
@rahulait

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.

devin-ai-integration[bot]

This comment was marked as resolved.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Quiet mode is enabled, so only the most important comments were posted inline. Other review comments are grouped below.

🟡 Other comments (3)
api/nvidia/v1/clusterpolicy_types.go-1284-1288 (1)

1284-1288: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Regenerate the CSV metadata for useHostSubscription.

The CRD schemas and deepcopy files already include this field. However, the generated CSV contains no descriptor for either API type, although both Go fields use +operator-sdk:gen-csv markers. Regenerate the CSV so OLM metadata exposes useHostSubscription.

controllers/transforms_test.go-4800-4800 (1)

4800-4800: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Assert the custom repository volume and mount in the combined case.

TransformDriver adds test-repo-config and mounts custom.repo at /etc/yum.repos.d/custom.repo. The current helpers inspect only subscription-prefixed volumes, so the test still passes if either custom repository contribution is removed. Add assertions for both resources.

internal/state/driver_test.go-671-682 (1)

671-682: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Assert the custom repository volume and mount in the combined case.

When repoConfigEnabled and useHostSubscription are both true, getDriverAdditionalConfigs adds the test-repo-config ConfigMap volume and mount. The test only checks subscription entries and unique mount paths, so removing the custom repository volume and mount would leave every assertion passing. Add assertions for both to cover the required coexistence behavior.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: QUIET

Plan: Enterprise

Run ID: e10c688b-e835-415e-884b-391d65097ece

📥 Commits

Reviewing files that changed from the base of the PR and between 3fc63e2 and dd333ec.

⛔ Files ignored due to path filters (6)
  • bundle/manifests/nvidia.com_clusterpolicies.yaml is excluded by !bundle/manifests/nvidia.com_*.yaml
  • bundle/manifests/nvidia.com_nvidiadrivers.yaml is excluded by !bundle/manifests/nvidia.com_*.yaml
  • config/crd/bases/nvidia.com_clusterpolicies.yaml is excluded by !config/crd/bases/**
  • config/crd/bases/nvidia.com_nvidiadrivers.yaml is excluded by !config/crd/bases/**
  • deployments/gpu-operator/crds/nvidia.com_clusterpolicies.yaml is excluded by !deployments/gpu-operator/crds/**
  • deployments/gpu-operator/crds/nvidia.com_nvidiadrivers.yaml is excluded by !deployments/gpu-operator/crds/**
📒 Files selected for processing (9)
  • api/nvidia/v1/clusterpolicy_types.go
  • api/nvidia/v1alpha1/nvidiadriver_types.go
  • controllers/object_controls.go
  • controllers/transforms_test.go
  • deployments/gpu-operator/templates/nvidiadriver.yaml
  • deployments/gpu-operator/values.yaml
  • internal/consts/consts.go
  • internal/state/driver_test.go
  • internal/state/driver_volumes.go

Included review availability: Your plan provides up to 12 included reviews per hour; 10 remain after this review.

@rahulait
rahulait force-pushed the fix-rhel-repoconfig-host-subscription branch from dd333ec to 15944ad Compare September 14, 2026 14:34
devin-ai-integration[bot]

This comment was marked as resolved.

@rahulait
rahulait force-pushed the fix-rhel-repoconfig-host-subscription branch from 15944ad to a69d6be Compare September 14, 2026 15:49
devin-ai-integration[bot]

This comment was marked as resolved.

@rahulait
rahulait force-pushed the fix-rhel-repoconfig-host-subscription branch from a69d6be to 6da402f Compare September 14, 2026 16:12
devin-ai-integration[bot]

This comment was marked as resolved.

@rahulait
rahulait force-pushed the fix-rhel-repoconfig-host-subscription branch 2 times, most recently from 08a509c to 05fc8ec Compare September 14, 2026 16:59
devin-ai-integration[bot]

This comment was marked as resolved.

Signed-off-by: Rahul Sharma <rahulsharm@nvidia.com>
@rahulait
rahulait force-pushed the fix-rhel-repoconfig-host-subscription branch from 05fc8ec to 3c174b2 Compare September 14, 2026 17:27
@rahulait rahulait assigned rahulait and unassigned rahulait Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Cannot use custom repoConfig together with RHEL host subscription repositories after #2391

1 participant