Skip to content

Commit 37cec7e

Browse files
authored
fix: delete gpunode ignore notFound err (#51)
1 parent a7d5e95 commit 37cec7e

File tree

4 files changed

+3
-4
lines changed

4 files changed

+3
-4
lines changed

charts/tensor-fusion/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 1.2.2
18+
version: 1.2.3
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

charts/tensor-fusion/templates/admission-webhooks/mutating-webhook.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ webhooks:
1919
- v1
2020
operations:
2121
- CREATE
22-
- UPDATE
2322
resources:
2423
- pods
2524
sideEffects: None

config/webhook/manifests.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ webhooks:
2020
- v1
2121
operations:
2222
- CREATE
23-
- UPDATE
2423
resources:
2524
- pods
2625
sideEffects: None

internal/controller/node_controller.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,13 @@ func (r *NodeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.
9999
return ctrl.Result{}, err
100100
}
101101
if !matched {
102+
102103
// delete gpunode if no matched pool
103104
if err := r.Client.Delete(ctx, &tfv1.GPUNode{
104105
ObjectMeta: metav1.ObjectMeta{
105106
Name: node.Name,
106107
},
107-
}); err != nil {
108+
}); err != nil && !errors.IsNotFound(err) {
108109
return ctrl.Result{}, fmt.Errorf("can not delete gpuNode(%s) : %w", node.Name, err)
109110
}
110111
return ctrl.Result{}, nil

0 commit comments

Comments
 (0)