Skip to content

[Feature]: Support custom GPG keys for private repositories in Driver CRD #2668

Description

@botinca

Description## Motivation

In restricted or air-gapped Kubernetes environments, deploying the GPU Operator requires using private package repositories (mirrors) to download the necessary driver dependencies. The NvidiaDriver CRD already provides parameters like certConfig for custom TLS certificates and repoConfig for private package manager repositories.
However, many enterprise-grade private mirrors use their own GPG keys for package signing and validation. Currently, there is no native way in the NvidiaDriver CRD spec to pass a custom GPG key to the driver installer pods, leaving a critical configuration gap for secure, private setups.

Current Workarounds

To make the driver daemonset pull packages from a signed private repository, users currently have to resort to two less-than-ideal workarounds:

  1. Disabling security validation entirely by setting trusted=yes inside the repoConfig sources list, which violates security policies in production environments.
    2. Explicitly defining the key inline inside the sources list configuration using the signed-by option:

deb [signed-by=/etc/apt/sources.list.d/aptly-noble.asc] http://ubuntu.mirror ubuntu main

While this method works, it forces files to be mounted or generated in paths where they don't natively belong (e.g., placing .asc keyrings directly inside /etc/apt/sources.list.d/), which can lead to friction and conflicts during standard OS/APT operations inside the container.

Proposed Solution

It would be highly logical to introduce a gpgKeyConfig parameter alongside the existing certConfig and repoConfig. This would allow mounting a ConfigMap containing custom GPG public keys directly into the trusted keyring directories of the driver containers (e.g., /usr/share/keyrings/ or /etc/apt/trusted.gpg.d/ for Debian/Ubuntu).
Proposed CRD Spec Structure:

apiVersion: ://nvidia.comkind: NvidiaDrivermetadata:
name: nvidia-driverspec:
driver:
repoConfig:
configMapName: "custom-repo-config"
certConfig:
name: "custom-registry-certs"
gpgKeyConfig: # Proposed field
configMapName: "custom-gpg-keys"

The Operator would then automatically pick up this ConfigMap and safely mount it to the correct path depending on the underlying Linux distribution running inside the driver daemonset container.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureissue/PR that proposes a new feature or functionalitylifecycle/frozenneeds-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