Skip to content

Commit

Permalink
Merge pull request #91 from falcon-pioupiou/use-serviceaccount-for-in…
Browse files Browse the repository at this point in the history
…jector

Enable and Allow the customization of serviceAccountName
  • Loading branch information
redhatrises authored Mar 3, 2022
2 parents 9ee208c + a382d5d commit ee5c380
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 19 deletions.
4 changes: 2 additions & 2 deletions helm-charts/falcon-sensor/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ 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.7.1
version: 1.8.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
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 1.7.1
appVersion: 1.8.0

keywords:
- CrowdStrike
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ subjects:
name: system:authenticated
{{- end }}
- kind: ServiceAccount
name: crowdstrike-falcon-sa
name: {{ .Values.serviceAccount }}
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ spec:
- name: {{ include "falcon-sensor.name" . }}-tls-certs
secret:
secretName: {{ include "falcon-sensor.name" . }}-tls
serviceAccountName: {{ .Values.serviceAccount }}
---
apiVersion: v1
kind: Secret
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/falcon-sensor/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ spec:
- name: falconstore
hostPath:
path: /opt/CrowdStrike/falconstore
serviceAccountName: crowdstrike-falcon-sa
serviceAccountName: {{ .Values.serviceAccount }}
terminationGracePeriodSeconds: {{ .Values.node.terminationGracePeriod }}
hostNetwork: true
hostPID: true
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/falcon-sensor/templates/node_scc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ requiredDropCapabilities:
defaultAddCapabilities:
allowedCapabilities:
users:
- crowdstrike-falcon-sa
- {{ .Values.serviceAccount }}
groups:
volumes:
- configMap
Expand Down
4 changes: 1 addition & 3 deletions helm-charts/falcon-sensor/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: crowdstrike-falcon-sa
name: {{ .Values.serviceAccount }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ include "falcon-sensor.name" . }}
app.kubernetes.io/name: {{ include "falcon-sensor.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/component: "all_sensors"
Expand Down
19 changes: 11 additions & 8 deletions helm-charts/falcon-sensor/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "object",
"required": [
"cid"
],
],
"properties": {
"cid": {
"type": "string",
Expand All @@ -21,13 +21,13 @@
"type": "object",
"required": [
"enabled"
],
],
"properties": {
"daemonset": {
"type": "object",
"required": [
"updateStrategy"
],
],
"properties": {
"annotations": {
"type": "object"
Expand Down Expand Up @@ -66,7 +66,7 @@
"repository",
"pullPolicy",
"tag"
],
],
"properties": {
"pullPolicy": {
"type": "string",
Expand Down Expand Up @@ -102,7 +102,7 @@
"type": "object",
"required": [
"enabled"
],
],
"properties": {
"certExpiration": {
"type": "integer",
Expand Down Expand Up @@ -132,7 +132,7 @@
"repository",
"pullPolicy",
"tag"
],
],
"properties": {
"pullPolicy": {
"type": "string",
Expand All @@ -142,7 +142,7 @@
"pullSecrets": {
"type": "object",
"properties": {
"enable": {
"enable": {
"type": "boolean",
"default": "false"
}
Expand Down Expand Up @@ -174,6 +174,9 @@
}
}
}
},
"serviceAccount": {
"type": "string"
}
}
}
}
8 changes: 5 additions & 3 deletions helm-charts/falcon-sensor/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,15 @@ container:
tag: "latest"

resources:
# limits:
# cpu: 100m
# memory: 128Mi
# limits:
# cpu: 100m
# memory: 128Mi
requests:
cpu: 10m
memory: 20Mi

serviceAccount: crowdstrike-falcon-sa

falcon:
cid:
aid:
Expand Down

0 comments on commit ee5c380

Please sign in to comment.