Skip to content

Commit 8506bd7

Browse files
committed
Allow post-delete job to be disabled
There are situations where the modifications performed by the NFD need to be preserved even after its removal. One such use case arises when NFD is installed as part of another project. By design, uninstalling the parent project does not remove all its components. However, the remaining components still rely on the labels created by NFD. If NFD is removed, these labels will be deleted, causing dependent components to fail. To maintain system integrity and ensure continued functionality, adding the 'postDeleteCleanup' option that allows any modifications made by NFD to be preserved upon its removal. Signed-off-by: Aleksey Senin <[email protected]>
1 parent af706a8 commit 8506bd7

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

deployment/helm/node-feature-discovery/templates/post-delete-job.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if .Values.postDeleteCleanup }}
12
apiVersion: v1
23
kind: ServiceAccount
34
metadata:
@@ -96,3 +97,5 @@ spec:
9697
tolerations:
9798
{{- toYaml . | nindent 8 }}
9899
{{- end }}
100+
{{- end }}
101+

deployment/helm/node-feature-discovery/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ featureGates:
1515

1616
priorityClassName: ""
1717

18+
postDeleteCleanup: true
19+
1820
master:
1921
enable: true
2022
extraArgs: []

docs/deployment/helm.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ Chart parameters are available.
164164
| `prometheus.labels` | dict | {} | Specifies labels for use with the prometheus operator to control how it is selected |
165165
| `prometheus.scrapeInterval` | string | 10s | Specifies the interval by which metrics are scraped |
166166
| `priorityClassName` | string | | The name of the PriorityClass to be used for the NFD pods. |
167+
| `postDeleteCleanup` | bool | true | Controls behavior of post-delete hook. |
167168

168169
Metrics are configured to be exposed using prometheus operator API's by
169170
default. If you want to expose metrics using the prometheus operator

0 commit comments

Comments
 (0)