Skip to content

Revert "Stop defaulting deprecated cdi.default in ClusterPolicy" - #2865

Closed
tariq1890 wants to merge 1 commit into
mainfrom
revert-pr-2796
Closed

Revert "Stop defaulting deprecated cdi.default in ClusterPolicy"#2865
tariq1890 wants to merge 1 commit into
mainfrom
revert-pr-2796

Conversation

@tariq1890

Copy link
Copy Markdown
Contributor

This reverts commit 2346486.

  • We do not typically make non-additive changes to a CRD
  • This change was made in response to an ArgoCD behaviour, which is just one among several tools for Kubernetes application deployment
  • The issue is well-known and there is a well-documented solution. Enabling server-side diff strategy in ArgoCD fixes the issue for Argo users who face this problem. That is a better solution than making an upstream CRD schema change

This reverts commit 2346486.

Signed-off-by: Tariq Ibrahim <tibrahim@nvidia.com>
@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The change adds a Kubernetes kubebuilder default of false to the deprecated CDIConfigSpec.Default field.

Merge Risk: ⚪ Minimal · up to 4fa1e

This restores the deprecated CDI field’s prior false default and updates the distributed CRD manifests consistently. No merge-blocking product risk is currently evident.


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

@tariq1890

Copy link
Copy Markdown
Contributor Author

Closing as this Revert PR targets the cherrypick commit as opposed to the original commit.

@tariq1890 tariq1890 closed this Sep 5, 2026
@tariq1890
tariq1890 deleted the revert-pr-2796 branch September 5, 2026 00:29

@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.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: QUIET

Plan: Enterprise

Run ID: ac6158e7-513a-4066-a63d-6c8881964c72

📥 Commits

Reviewing files that changed from the base of the PR and between 08c40bc and 4fa1eda.

⛔ Files ignored due to path filters (3)
  • bundle/manifests/nvidia.com_clusterpolicies.yaml is excluded by !bundle/manifests/nvidia.com_*.yaml
  • config/crd/bases/nvidia.com_clusterpolicies.yaml is excluded by !config/crd/bases/**
  • deployments/gpu-operator/crds/nvidia.com_clusterpolicies.yaml is excluded by !deployments/gpu-operator/crds/**
📒 Files selected for processing (1)
  • api/nvidia/v1/clusterpolicy_types.go

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


// Deprecated: This field is no longer used. Setting cdi.enabled=true will configure CDI as the default mechanism for making GPUs accessible to containers.
// +kubebuilder:validation:Optional
// +kubebuilder:default=false

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Regenerate and justify this released CRD change before merging.

Line 1970 changes the default for an existing ClusterPolicy field. After the generated CRD is applied, requests that omit spec.cdi.default can persist false. The deprecated field is not used by CDIConfigSpec.IsEnabled(), so this can change stored objects and ArgoCD diffs without changing CDI runtime behavior.

The cohort includes only api/nvidia/v1/clusterpolicy_types.go. Regenerate and commit the CRD assets and deepcopy output required by this API-type change. Document why the changed default is safe for already-applied ClusterPolicy resources.

As per path instructions, api/**/*.go contains released CRDs; changed +kubebuilder:default values are major API changes, and editing these types requires regenerated deepcopy and CRD assets.

Source: Path instructions

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.

1 participant