Skip to content

Commit 91faf85

Browse files
authored
nvidia: Update addon helm charts to the latest versions (#342)
Updates the default version of the GPU operator to "v25.3.0". Updates the default version of the network operator to "25.1.0". Clean up installed CRDs by the Helm charts when disabling addon.
1 parent 22539cd commit 91faf85

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

addons/nvidia/disable

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,17 @@ import click
99

1010
SNAP = pathlib.Path(os.getenv("SNAP") or "/snap/microk8s/current")
1111
HELM = SNAP / "microk8s-helm3.wrapper"
12+
KUBECTL = SNAP / "microk8s-kubectl.wrapper"
13+
NVIDIA_CRDS = [
14+
# gpu-operator CRDs.
15+
"clusterpolicies.nvidia.com",
16+
"nvidiadrivers.nvidia.com",
17+
# network-operator CRDs.
18+
"hostdevicenetworks.mellanox.com",
19+
"ipoibnetworks.mellanox.com",
20+
"macvlannetworks.mellanox.com",
21+
"nicclusterpolicies.mellanox.com",
22+
]
1223

1324

1425
@click.command()
@@ -27,6 +38,9 @@ def main():
2738
namespace = chart.get("namespace") or "default"
2839
subprocess.run([HELM, "uninstall", name, "-n", namespace])
2940

41+
for crd in NVIDIA_CRDS:
42+
subprocess.run([KUBECTL, "delete", "crd", crd])
43+
3044
click.echo("NVIDIA support disabled")
3145

3246

addons/nvidia/enable

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def deploy_gpu_operator(
122122
@click.option("--set-as-default-runtime/--no-set-as-default-runtime", is_flag=True, hidden=True, default=None)
123123
@click.option("--gpu-operator-set-as-default-runtime/--gpu-operator-no-set-as-default-runtime", is_flag=True, default=True)
124124
@click.option("--network-operator/--no-network-operator", is_flag=True, default=False)
125-
@click.option("--network-operator-version", default="23.7.0")
125+
@click.option("--network-operator-version", default="25.1.0")
126126
@click.option("--network-operator-set", multiple=True)
127127
@click.option("--network-operator-values", multiple=True, type=click.Path(exists=True))
128128
def main(
@@ -213,7 +213,7 @@ def main(
213213

214214
# set default values
215215
if not gpu_operator_version:
216-
gpu_operator_version = "v24.6.2"
216+
gpu_operator_version = "v25.3.0"
217217

218218
# add helm repository for nvidia gpu-operator and network-operator
219219
subprocess.run([HELM, "repo", "add", "nvidia", "https://helm.ngc.nvidia.com/nvidia"])

0 commit comments

Comments
 (0)