Skip to content

Commit

Permalink
Merge pull request #340 from JonBruchim/main
Browse files Browse the repository at this point in the history
sensor | clusterrole | add resources and verbs
  • Loading branch information
redhatrises authored Jan 16, 2025
2 parents 6513c4e + 4cc915f commit 1f83467
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
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 .Values.node.enabled }}
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 .Values.node.enabled }}
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 }}
- pods
- services
- nodes
- daemonsets
- replicasets
- deployments
- jobs
- ingresses
- cronjobs
- persistentvolumes
{{- end }}
verbs:
- get
{{- if .Values.node.enabled }}
- 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 .Values.node.enabled }}
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 .Values.node.enabled }}
app.kubernetes.io/component: "kernel_sensor"
{{ end }}
crowdstrike.com/provider: crowdstrike
helm.sh/chart: {{ include "falcon-sensor.chart" . }}
subjects:
Expand Down

0 comments on commit 1f83467

Please sign in to comment.