Skip to content

[Feature]: add webhook to validate nvidiadriver CR requests #2282

@rahulait

Description

@rahulait

Requestor: @rajathagasthya

Summary

Introduce a validating admission webhook for NVIDIA Driver Custom Resources (CRs) to detect and reject overlapping CR definitions, ensuring that only mutually exclusive NVIDIA Driver CRs are admitted into the cluster.

Motivation

In environments where multiple NVIDIA Driver CRs are defined, there is currently no safeguard preventing overlapping specifications (e.g., targeting the same nodes or GPUs). Multiple NVIDIA Driver CRs may unintentionally target the same set of nodes due to overlapping nodeSelector labels.

Proposal

Implement a Kubernetes validating admission webhook that intercepts CREATE and UPDATE operations for NVIDIA Driver CRs and enforces non-overlapping targeting rules.

The webhook will:

Evaluate the effective node selection criteria of the incoming CR
Compare it against all existing NVIDIA Driver CRs in the cluster
Detect overlaps in targeted node sets
Reject the request if any overlap is found

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureissue/PR that proposes a new feature or functionalitylifecycle/frozen

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions