Skip to content
Closed
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
8 changes: 8 additions & 0 deletions tests/scripts/update-clusterpolicy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,14 @@ test_custom_labels_override() {

operands="nvidia-driver-daemonset nvidia-container-toolkit-daemonset nvidia-operator-validator gpu-feature-discovery nvidia-dcgm-exporter nvidia-device-plugin-daemonset"

# Wait for the operator to update the DaemonSet pod templates with new labels (driver daemonset as representative).
echo "Waiting for DaemonSet pod template to be updated with new labels..."
kubectl wait daemonset -n "$TEST_NAMESPACE" nvidia-driver-daemonset --for=jsonpath='{.spec.template.metadata.labels.cloudprovider}'=aws --timeout=120s

# Delete driver pod to force recreation with updated labels. Existing pods are not automatically restarted due to the DaemonSet OnDelete updateStrategy.
echo "Deleting driver pod to trigger recreation with updated labels..."
kubectl delete pod -n "$TEST_NAMESPACE" -l app=nvidia-driver-daemonset --ignore-not-found

# The labels override triggers a rollout of all gpu-operator operands, so we wait for the driver upgrade to transition to "upgrade-done" state.
wait_for_driver_upgrade_done

Expand Down