Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions deployments/helm/nvidia-device-plugin/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: node-feature-discovery
repository: https://kubernetes-sigs.github.io/node-feature-discovery/charts
version: 0.16.6
digest: sha256:b125f183a60fb079c21a266b16b9d820853eba49b07405db2b909e6d2439f77d
generated: "2024-10-30T15:15:39.497349+01:00"
version: 0.17.3
digest: sha256:6012a27c3109e9d29fb0729b38aa192a02c5ef177a971c5366449d13d9f092d0
generated: "2025-08-20T18:56:48.301032+02:00"
6 changes: 3 additions & 3 deletions deployments/helm/nvidia-device-plugin/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ apiVersion: v2
name: nvidia-device-plugin
type: application
description: A Helm chart for the nvidia-device-plugin on Kubernetes
version: "0.17.1"
appVersion: "0.17.1"
version: "0.17.3"
appVersion: "0.17.3"
kubeVersion: ">= 1.10.0-0"
home: https://github.com/NVIDIA/k8s-device-plugin

dependencies:
- name: node-feature-discovery
alias: nfd
version: "0.16.6"
version: "0.17.3"
Copy link
Member

Choose a reason for hiding this comment

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

We should bump the nfd dependency as a separate PR. It is especially confusing that we happen to have the same version here.

condition: nfd.enabled,gfd.enabled
repository: https://kubernetes-sigs.github.io/node-feature-discovery/charts
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: gpu-feature-discovery
labels:
app.kubernetes.io/name: gpu-feature-discovery
app.kubernetes.io/version: 0.17.1
app.kubernetes.io/version: 0.17.3
app.kubernetes.io/part-of: nvidia-gpu
spec:
selector:
Expand All @@ -15,11 +15,11 @@ spec:
metadata:
labels:
app.kubernetes.io/name: gpu-feature-discovery
app.kubernetes.io/version: 0.17.1
app.kubernetes.io/version: 0.17.3
app.kubernetes.io/part-of: nvidia-gpu
spec:
containers:
- image: nvcr.io/nvidia/k8s-device-plugin:v0.17.1
- image: nvcr.io/nvidia/k8s-device-plugin:v0.17.3
name: gpu-feature-discovery
command: ["/usr/bin/gpu-feature-discovery"]
volumeMounts:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: gpu-feature-discovery
labels:
app.kubernetes.io/name: gpu-feature-discovery
app.kubernetes.io/version: 0.17.1
app.kubernetes.io/version: 0.17.3
app.kubernetes.io/part-of: nvidia-gpu
spec:
selector:
Expand All @@ -15,11 +15,11 @@ spec:
metadata:
labels:
app.kubernetes.io/name: gpu-feature-discovery
app.kubernetes.io/version: 0.17.1
app.kubernetes.io/version: 0.17.3
app.kubernetes.io/part-of: nvidia-gpu
spec:
containers:
- image: nvcr.io/nvidia/k8s-device-plugin:v0.17.1
- image: nvcr.io/nvidia/k8s-device-plugin:v0.17.3
name: gpu-feature-discovery
command: ["/usr/bin/gpu-feature-discovery"]
volumeMounts:
Expand Down
6 changes: 3 additions & 3 deletions deployments/static/gpu-feature-discovery-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: gpu-feature-discovery
labels:
app.kubernetes.io/name: gpu-feature-discovery
app.kubernetes.io/version: 0.17.1
app.kubernetes.io/version: 0.17.3
app.kubernetes.io/part-of: nvidia-gpu
spec:
selector:
Expand All @@ -15,11 +15,11 @@ spec:
metadata:
labels:
app.kubernetes.io/name: gpu-feature-discovery
app.kubernetes.io/version: 0.17.1
app.kubernetes.io/version: 0.17.3
app.kubernetes.io/part-of: nvidia-gpu
spec:
containers:
- image: nvcr.io/nvidia/k8s-device-plugin:v0.17.1
- image: nvcr.io/nvidia/k8s-device-plugin:v0.17.3
name: gpu-feature-discovery
command: ["/usr/bin/gpu-feature-discovery"]
volumeMounts:
Expand Down
6 changes: 3 additions & 3 deletions deployments/static/gpu-feature-discovery-job.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ metadata:
name: gpu-feature-discovery
labels:
app.kubernetes.io/name: gpu-feature-discovery
app.kubernetes.io/version: 0.17.1
app.kubernetes.io/version: 0.17.3
app.kubernetes.io/part-of: nvidia-gpu
spec:
template:
metadata:
labels:
app.kubernetes.io/name: gpu-feature-discovery
app.kubernetes.io/version: 0.17.1
app.kubernetes.io/version: 0.17.3
app.kubernetes.io/part-of: nvidia-gpu
spec:
nodeName: NODE_NAME
containers:
- image: nvcr.io/nvidia/k8s-device-plugin:v0.17.1
- image: nvcr.io/nvidia/k8s-device-plugin:v0.17.3
name: gpu-feature-discovery
command: ["/usr/bin/gpu-feature-discovery"]
args:
Expand Down
4 changes: 2 additions & 2 deletions deployments/static/nfd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
image: quay.io/kubernetes_incubator/node-feature-discovery:v0.6.0
image: gcr.io/k8s-staging-nfd/node-feature-discovery:v0.16.6
name: nfd-master
command:
- "nfd-master"
Expand All @@ -73,7 +73,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
image: quay.io/kubernetes_incubator/node-feature-discovery:v0.6.0
image: gcr.io/k8s-staging-nfd/node-feature-discovery:v0.16.6
name: nfd-worker
command:
- "nfd-worker"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ spec:
# See https://kubernetes.io/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/
priorityClassName: "system-node-critical"
containers:
- image: nvcr.io/nvidia/k8s-device-plugin:v0.17.1
- image: nvcr.io/nvidia/k8s-device-plugin:v0.17.3
name: nvidia-device-plugin-ctr
env:
- name: PASS_DEVICE_SPECS
Expand Down
2 changes: 1 addition & 1 deletion deployments/static/nvidia-device-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ spec:
# See https://kubernetes.io/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/
priorityClassName: "system-node-critical"
containers:
- image: nvcr.io/nvidia/k8s-device-plugin:v0.17.1
- image: nvcr.io/nvidia/k8s-device-plugin:v0.17.3
name: nvidia-device-plugin-ctr
env: []
securityContext:
Expand Down
24 changes: 20 additions & 4 deletions hack/prepare-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,19 @@ pre_semver=${previous_version:1}
# Modify files in the repo to point to new release
#
# Darwin or Linux
DOCKER="docker"
if [[ "$(uname)" == "Darwin" ]]; then
SED="$DOCKER run -i --rm -v $(PWD):$(PWD) -w $(PWD) alpine:latest sed"
# Try gsed first (GNU sed installed via Homebrew)
if command -v gsed &>/dev/null; then
SED="gsed"
# Fall back to Docker if gsed not available
elif docker version &>/dev/null; then
SED="docker run -i --rm -v $(PWD):$(PWD) -w $(PWD) alpine:latest sed"
else
echo "ERROR: Neither gsed nor Docker is available on macOS."
echo "Install GNU sed with: brew install gnu-sed"
echo "Or ensure Docker Desktop is running."
exit 1
fi
else
SED="sed"
fi
Expand Down Expand Up @@ -175,10 +185,16 @@ git commit -s -m "Bump version for $release release"
echo Patching deployments to refer to $semver
find deployments/static -type f \( -name "*.yaml" -o -name "*.yml" -o -name "*.template" \) -type f ! -name "nfd.yaml" \
-exec $SED -E -i \
-e s",^([[:space:]]+)app.kubernetes.io\/version:.+$,\1app.kubernetes.io\/version: $semver," \
-e s",^([[:space:]]+)- image:.+$,\1- image: $container_image," \
-e s",^([[:space:]]*)app.kubernetes.io\/version:.+$,\1app.kubernetes.io\/version: $semver," \
Copy link

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

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

The regex pattern uses [[:space:]]* (zero or more spaces) instead of [[:space:]]+ (one or more spaces). This change could match lines that start directly with 'app.kubernetes.io/version:' without any indentation, which may not be the intended behavior and could cause unintended replacements.

Suggested change
-e s",^([[:space:]]*)app.kubernetes.io\/version:.+$,\1app.kubernetes.io\/version: $semver," \
-e s",^([[:space:]]+)app.kubernetes.io\/version:.+$,\1app.kubernetes.io\/version: $semver," \

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

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

@ArangoGutierrez was there a case that required this to be changed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I did a dry run, and the image: on the files at deployments/static were not edited.

Copy link
Member

Choose a reason for hiding this comment

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

That doesn't really make sense since the output for the following (on main) are the same:

$ grep -R -E "^\s+-\s+image:" deployments/static
deployments/static/gpu-feature-discovery-daemonset.yaml:        - image: nvcr.io/nvidia/k8s-device-plugin:v0.17.1
deployments/static/nvidia-device-plugin-compat-with-cpumanager.yml:      - image: nvcr.io/nvidia/k8s-device-plugin:v0.17.1
deployments/static/gpu-feature-discovery-job.yaml.template:        - image: nvcr.io/nvidia/k8s-device-plugin:v0.17.1
deployments/static/nvidia-device-plugin.yml:      - image: nvcr.io/nvidia/k8s-device-plugin:v0.17.1
deployments/static/gpu-feature-discovery-daemonset-with-mig-mixed.yaml:        - image: nvcr.io/nvidia/k8s-device-plugin:v0.17.1
deployments/static/gpu-feature-discovery-daemonset-with-mig-single.yaml:        - image: nvcr.io/nvidia/k8s-device-plugin:v0.17.1

and

$ grep -R -E "^\s*-\s+image:" deployments/static
deployments/static/gpu-feature-discovery-daemonset.yaml:        - image: nvcr.io/nvidia/k8s-device-plugin:v0.17.1
deployments/static/nvidia-device-plugin-compat-with-cpumanager.yml:      - image: nvcr.io/nvidia/k8s-device-plugin:v0.17.1
deployments/static/gpu-feature-discovery-job.yaml.template:        - image: nvcr.io/nvidia/k8s-device-plugin:v0.17.1
deployments/static/nvidia-device-plugin.yml:      - image: nvcr.io/nvidia/k8s-device-plugin:v0.17.1
deployments/static/gpu-feature-discovery-daemonset-with-mig-mixed.yaml:        - image: nvcr.io/nvidia/k8s-device-plugin:v0.17.1
deployments/static/gpu-feature-discovery-daemonset-with-mig-single.yaml:        - image: nvcr.io/nvidia/k8s-device-plugin:v0.17.1

Also looking at the diff here I don't see any changes where there are no leading spaces for the pattern that we're trying to match.

Copy link
Member

Choose a reason for hiding this comment

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

Also: Running on main I see the following:

$ git diff --name-only upstream/main deployments/static | cat
deployments/static/gpu-feature-discovery-daemonset-with-mig-mixed.yaml
deployments/static/gpu-feature-discovery-daemonset-with-mig-single.yaml
deployments/static/gpu-feature-discovery-daemonset.yaml
deployments/static/gpu-feature-discovery-job.yaml.template
deployments/static/nvidia-device-plugin-compat-with-cpumanager.yml
deployments/static/nvidia-device-plugin.yml

Which -- with the exception of nfd.yaml -- seems to match the changes you have here.

When comparing it directly to your branch we see:

$ git diff --name-only static_deployments  deployments/static | cat
deployments/static/nfd.yaml

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Umm I see, I'll review why on my hosts the script didn't worked as expected.

-e s",^([[:space:]]*)- image:.+$,\1- image: $container_image," \
Copy link

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

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

Similar to the previous line, changing from [[:space:]]+ to [[:space:]]* could match lines that start directly with '- image:' without any indentation, potentially causing unintended replacements in YAML files where indentation is critical.

Suggested change
-e s",^([[:space:]]*)- image:.+$,\1- image: $container_image," \
-e s",^([[:space:]]+)- image:.+$,\1- image: $container_image," \

Copilot uses AI. Check for mistakes.
{} +

if [ $? -ne 0 ]; then
echo "ERROR: Failed to patch deployments/static files"
echo "Please check if Docker is running or install GNU sed with: brew install gnu-sed"
exit 1
fi

# Patch deployments/helm/Chart.yaml
echo Patching deployments/helm/Chart.yaml to refer to $semver
$SED -i "s/^version: .*/version: \"$semver\"/" deployments/helm/nvidia-device-plugin/Chart.yaml
Expand Down
Loading