Skip to content

[Bug]: Deprecated cdi.default CRD default causes persistent Argo CD drift #2795

Description

@dentiny

Describe the bug
Hi team, I found there's inconsistency between cluster policy definition and helm-rendered cluster policy, which leads to ArgoCD keep reporting out-of-sync.

The issue is

The deprecated spec.cdi.default field is no longer rendered by the ClusterPolicy Helm template.
The rendered resource therefore contains:

spec:
  cdi:
    enabled: true

However, the ClusterPolicy CRD still defines spec.cdi.default with a schema default of false.
The corresponding Go API definition also marks the field as deprecated and unused while retaining +kubebuilder:default=false.
After the rendered resource is applied, the Kubernetes API server adds the default:

spec:
  cdi:
    enabled: true
    default: false

This creates a persistent difference:

Desired: spec.cdi.default is absent
Live:    spec.cdi.default is false

Argo CD reports the ClusterPolicy as OutOfSync. Re-syncing cannot resolve the difference because the API server adds the field again after every apply.

To Reproduce
N/A

Expected behavior
These two files are kept in sync.

Environment (please provide the following information):

  • GPU Operator Version: v26.3.3
  • OS: N/A, unrelated
  • Kernel Version: N/A, unrelated
  • Container Runtime Version: N/A, unrelated
  • Kubernetes Distro and Version: N/A, unrelated

Information to attach (optional if deemed irrelevant)

  • kubernetes pods status: kubectl get pods -n OPERATOR_NAMESPACE
  • kubernetes daemonset status: kubectl get ds -n OPERATOR_NAMESPACE
  • If a pod/ds is in an error state or pending state kubectl describe pod -n OPERATOR_NAMESPACE POD_NAME
  • If a pod/ds is in an error state or pending state kubectl logs -n OPERATOR_NAMESPACE POD_NAME --all-containers
  • Output from running nvidia-smi from the driver container: kubectl exec DRIVER_POD_NAME -n OPERATOR_NAMESPACE -c nvidia-driver-ctr -- nvidia-smi
  • containerd logs journalctl -u containerd > containerd.log

Collecting full debug bundle (optional):

N/A

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugIssue/PR to expose/discuss/fix a bugneeds-triageissue or PR has not been assigned a priority-px label

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions