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
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,10 @@ metadata:
"apiVersion": "nvidia.com/v1alpha1",
"kind": "GPUCluster",
"metadata": {
"name": "gpu-cluster"
"name": "gpu-cluster",
"finalizers": [
"gpucluster.nvidia.com/dra-resourceclaim"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is somewhat of a behavior change. We're pre-adding the finalizer instead of adding it after the operator's first reconcile. If the operator never comes up during helm install, you cannot delete this CR without manually removing the finalizer. I'd rather have one way to add and remove the finalizer. Not a strong opinion, but I'm not entirely sure this change is worth it.

This also means we need to maintain this finalizer in multiple places instead of a single constant in the controller.

]
},
"spec": {
"draDriver": {
Expand Down
2 changes: 2 additions & 0 deletions deployments/gpu-operator/templates/gpucluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ metadata:
# keep helm from also deleting it.
annotations:
"helm.sh/resource-policy": keep
finalizers:
- gpucluster.nvidia.com/dra-resourceclaim
spec:
draDriver:
{{- if .Values.draDriver.repository }}
Expand Down
Loading