Skip to content

Commit

Permalink
cdp: added resources and verbs for the cluster role
Browse files Browse the repository at this point in the history
  • Loading branch information
JonBruchim committed Dec 25, 2024
1 parent 4abe394 commit 5fd73ae
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
3 changes: 2 additions & 1 deletion helm-charts/falcon-sensor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ The following tables lists the more common configurable parameters of the chart
| `node.image.pullSecrets` | Pull secrets for private registry | None (Conflicts with node.image.registryConfigJSON) |
| `node.image.registryConfigJSON` | base64 encoded docker config json for the pull secret | None (Conflicts with node.image.pullSecrets) |
| `node.daemonset.resources` | Configure Node sensor resource requests and limits (eBPF mode only) | None (Minimum setting of 250m CPU and 500Mi memory allowed). Default for GKE Autopilot is 750m CPU and 1.5Gi memory.<br><br><div class="warning">:warning: **Warning**:<br>If you configure resources, you must configure the CPU and Memory Resource requests and limits correctly for your node instances for the node sensor to run properly!</div> |
| `falcon.cid` | CrowdStrike Customer ID (CID) | None (Required) |
| `node.cdpRolesEnabled` | Enabled the Cloud Data Protection module | `true` |
| `falcon.cid` | CrowdStrike Customer ID (CID) | None (Required) | |

`falcon.cid` and `node.image.repository` are required values.

Expand Down
22 changes: 21 additions & 1 deletion helm-charts/falcon-sensor/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.container.enabled }}
{{- if or .Values.container.enabled (and .Values.node.enabled .Values.node.cdpRolesEnabled)}}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
Expand All @@ -8,14 +8,34 @@ metadata:
app.kubernetes.io/name: {{ include "falcon-sensor.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{ if .Values.container.enabled }}
app.kubernetes.io/component: "container_sensor"
{{ else if (and .Values.node.enabled .Values.node.cdpRolesEnabled)}}
app.kubernetes.io/component: "kernel_sensor"
{{ end }}
crowdstrike.com/provider: crowdstrike
helm.sh/chart: {{ include "falcon-sensor.chart" . }}
rules:
- apiGroups:
- ""
resources:
- secrets
{{- if and .Values.node.enabled .Values.node.cdpRolesEnabled }}
- pods
- services
- nodes
- daemonsets
- replicasets
- deployments
- jobs
- ingresses
- cronjobs
- persistentvolumes
{{- end }}
verbs:
- get
{{- if and .Values.node.enabled .Values.node.cdpRolesEnabled }}
- watch
- list
{{- end }}
{{- end }}
6 changes: 5 additions & 1 deletion helm-charts/falcon-sensor/templates/clusterrolebinding.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.container.enabled }}
{{- if or .Values.container.enabled (and .Values.node.enabled .Values.node.cdpRolesEnabled) }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
Expand All @@ -8,7 +8,11 @@ metadata:
app.kubernetes.io/name: {{ include "falcon-sensor.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{ if .Values.container.enabled }}
app.kubernetes.io/component: "container_sensor"
{{ else if (and .Values.node.enabled .Values.node.cdpRolesEnabled)}}
app.kubernetes.io/component: "kernel_sensor"
{{ end }}
crowdstrike.com/provider: crowdstrike
helm.sh/chart: {{ include "falcon-sensor.chart" . }}
subjects:
Expand Down
3 changes: 3 additions & 0 deletions helm-charts/falcon-sensor/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ node:
postDelete:
enabled: true

# When enabled, Cloud data protection module is enabled
cdpRolesEnabled: true

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

0 comments on commit 5fd73ae

Please sign in to comment.