Skip to content

Commit

Permalink
feat(falcon-sensor): allow helm hook manifests to be disabled
Browse files Browse the repository at this point in the history
Signed-off-by: congiv <[email protected]>
  • Loading branch information
congiv committed Apr 13, 2024
1 parent 2aa1642 commit 1d0b85b
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 4 deletions.
2 changes: 1 addition & 1 deletion helm-charts/falcon-sensor/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.26.1
version: 1.27.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/falcon-sensor/templates/node_cleanup.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.node.enabled }}
{{- if and .Values.node.enabled .Values.node.hooks.postDelete.enabled }}
apiVersion: apps/v1
kind: DaemonSet
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.node.enabled }}
{{- if and .Values.node.enabled .Values.node.hooks.postDelete.enabled }}
{{- if .Values.node.image.registryConfigJSON }}
{{- $registry := .Values.node.image.registryConfigJSON }}
apiVersion: v1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if and .Values.node.enabled .Values.node.hooks.postDelete.enabled }}
apiVersion: v1
kind: ServiceAccount
metadata:
Expand All @@ -10,4 +11,5 @@ metadata:
helm.sh/chart: {{ include "falcon-sensor.chart" . }}
annotations:
"helm.sh/hook": post-delete
"helm.sh/hook-weight": "0"
"helm.sh/hook-weight": "0"
{{- end }}
14 changes: 14 additions & 0 deletions helm-charts/falcon-sensor/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,20 @@
"type": "integer",
"default": "30",
"pattern": "^[0-9]+$"
},
"hooks": {
"type": "object",
"properties": {
"postDelete": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"default": "true"
}
}
}
}
}
}
},
Expand Down
5 changes: 5 additions & 0 deletions helm-charts/falcon-sensor/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ node:
# How long to wait for Falcon pods to stop gracefully
terminationGracePeriod: 30

hooks:
# Settings for the node post-delete helm hook
postDelete:
enabled: true

container:
# When enabled, Helm chart deploys the Falcon Container Sensor to Pods through Webhooks
enabled: false
Expand Down

0 comments on commit 1d0b85b

Please sign in to comment.