Skip to content

Commit 69c4573

Browse files
authored
Merge pull request #313 from CrowdStrike/mhyson/kac-visibility
wip: add cluster visibility to falcon-kac
2 parents a5dddfb + 7e141a2 commit 69c4573

File tree

4 files changed

+168
-2
lines changed

4 files changed

+168
-2
lines changed

helm-charts/falcon-kac/Chart.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 1.1.2
18+
version: 1.2.0-rc.1
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
23-
appVersion: 1.1.2
23+
appVersion: 1.2.0
2424

2525
keywords:
2626
- CrowdStrike

helm-charts/falcon-kac/templates/deployment_webhook.yaml

+79
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,80 @@ spec:
168168
name: crowdstrike-falcon-vol0
169169
- mountPath: /var/private
170170
name: crowdstrike-falcon-vol1
171+
- args:
172+
- "client"
173+
- "-app=watcher"
174+
env:
175+
- name: __CS_POD_NAMESPACE
176+
valueFrom:
177+
fieldRef:
178+
apiVersion: v1
179+
fieldPath: metadata.namespace
180+
- name: __CS_POD_NAME
181+
valueFrom:
182+
fieldRef:
183+
apiVersion: v1
184+
fieldPath: metadata.name
185+
- name: __CS_POD_NODENAME
186+
valueFrom:
187+
fieldRef:
188+
apiVersion: v1
189+
fieldPath: spec.nodeName
190+
{{ if not .Values.clusterVisibility.resourceSnapshots.enabled -}}
191+
- name: __CS_SNAPSHOTS_ENABLED
192+
value: "false"
193+
{{- end }}
194+
{{ if .Values.clusterVisibility.resourceSnapshots.interval -}}
195+
- name: __CS_SNAPSHOT_INTERVAL
196+
value: {{ .Values.clusterVisibility.resourceSnapshots.interval }}
197+
{{- end }}
198+
{{- if not .Values.clusterVisibility.resourceWatcher.enabled -}}
199+
- name: __CS_WATCH_EVENTS_ENABLED
200+
value: "false"
201+
{{- end }}
202+
envFrom:
203+
- configMapRef:
204+
name: {{ include "falcon-kac.fullname" . }}-config
205+
image: {{ include "falcon-kac.image" . }}
206+
imagePullPolicy: {{ .Values.image.pullPolicy }}
207+
livenessProbe:
208+
failureThreshold: 3
209+
httpGet:
210+
path: /livez
211+
port: 4080
212+
scheme: HTTP
213+
periodSeconds: 10
214+
successThreshold: 1
215+
timeoutSeconds: 1
216+
name: falcon-watcher
217+
ports:
218+
- containerPort: 4080
219+
name: healthcheck
220+
resources:
221+
{{- toYaml .Values.falconWatcherResources | nindent 10 }}
222+
securityContext:
223+
allowPrivilegeEscalation: false
224+
capabilities:
225+
drop:
226+
- ALL
227+
readOnlyRootFilesystem: true
228+
runAsNonRoot: true
229+
startupProbe:
230+
failureThreshold: 30
231+
httpGet:
232+
path: /startz
233+
port: 4080
234+
scheme: HTTP
235+
periodSeconds: 2
236+
successThreshold: 1
237+
timeoutSeconds: 1
238+
volumeMounts:
239+
- mountPath: /tmp
240+
name: crowdstrike-falcon-vol0
241+
- mountPath: /var/private
242+
name: crowdstrike-falcon-vol1
243+
- mountPath: /var/falcon-watcher
244+
name: crowdstrike-falcon-vol2
171245
- envFrom:
172246
- configMapRef:
173247
name: {{ include "falcon-kac.fullname" . }}-config
@@ -206,6 +280,8 @@ spec:
206280
name: crowdstrike-falcon-vol0
207281
- mountPath: /var/private/
208282
name: crowdstrike-falcon-vol1
283+
- mountPath: /var/falcon-watcher
284+
name: crowdstrike-falcon-vol2
209285
nodeSelector:
210286
kubernetes.io/os: linux
211287
priorityClassName: system-cluster-critical
@@ -232,6 +308,9 @@ spec:
232308
- name: crowdstrike-falcon-vol1
233309
emptyDir:
234310
sizeLimit: 4Ki
311+
- name: crowdstrike-falcon-vol2
312+
emptyDir:
313+
sizeLimit: 64Mi
235314
---
236315
apiVersion: admissionregistration.k8s.io/v1
237316
kind: ValidatingWebhookConfiguration

helm-charts/falcon-kac/values.schema.json

+54
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,33 @@
159159
}
160160
}
161161
},
162+
"clusterVisibility": {
163+
"type": "object",
164+
"properties": {
165+
"resourceSnapshots": {
166+
"type": "object",
167+
"properties": {
168+
"enabled": {
169+
"type": "boolean",
170+
"default": "true"
171+
},
172+
"interval": {
173+
"type": "string",
174+
"default": "22h"
175+
}
176+
}
177+
},
178+
"resourceWatcher": {
179+
"type": "object",
180+
"properties": {
181+
"enabled": {
182+
"type": "boolean",
183+
"default": "true"
184+
}
185+
}
186+
}
187+
}
188+
},
162189
"annotations": {
163190
"type": "object",
164191
"default": {}
@@ -196,6 +223,33 @@
196223
}
197224
}
198225
},
226+
"falconWatcherResources": {
227+
"type": "object",
228+
"properties": {
229+
"requests": {
230+
"type": "object",
231+
"properties": {
232+
"cpu": {
233+
"type": "string"
234+
},
235+
"memory": {
236+
"type": "string"
237+
}
238+
}
239+
},
240+
"limits": {
241+
"type": "object",
242+
"properties": {
243+
"cpu": {
244+
"type": "string"
245+
},
246+
"memory": {
247+
"type": "string"
248+
}
249+
}
250+
}
251+
}
252+
},
199253
"falconClientResources": {
200254
"type": "object",
201255
"properties": {

helm-charts/falcon-kac/values.yaml

+33
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,31 @@ falcon:
5656
tags:
5757
provisioning_token:
5858

59+
# These variables can be used to customize the way KAC provides visibility into
60+
# resources on your Kubernetes cluster. The variables are initially set to the
61+
# default values which will be used if they are commented out.
62+
clusterVisibility:
63+
# KAC snapshots Kubernetes resources on a periodic basis and sends them to CrowdStrike
64+
# cloud. This enables long living resources to be maintained in CrowdStrike cloud databases.
65+
resourceSnapshots:
66+
# If set to false, the snapshots are not taken and you may not see long lived
67+
# Kubernetes resources in Falcon UI after about 7 days.
68+
enabled: true
69+
# The time interval between periodic snapshots. The default value of 22 hours is
70+
# also the maximum value allowed. Minimum allowed value is 30 minutes. The format
71+
# for this variable is HHhMMm. Some examples are 12h, 45m and 1h30m.
72+
interval: 22h
73+
74+
# KAC watches Kubernetes cluster continuously for any action - creation, updates and deletion -
75+
# on resources and sends events with the resource representation and the type of action
76+
# to the CrowdStrike cloud.
77+
resourceWatcher:
78+
# If set to false, KAC does not watch the Kubernetes cluster and you will not be ables
79+
# to see the latest state of the Kubernetes resources in the Falcon UI until a resource
80+
# snapshot has been taken. Any resources deleted when KAC does not watch the Kubernetes
81+
# cluster will not be shown as deleted in the Falcon UI.
82+
enabled: true
83+
5984
# Falcon KAC can usually discover the clusterName automatically so setting clusterName here is normally
6085
# not necessary, but in some cases the clusterName cannot be discovered by the KAC, e.g. for self-hosted
6186
# kubernetes clusters such as MicroK8s. In those case, the clusterName can be manually set here.
@@ -94,6 +119,14 @@ falconClientResources:
94119
cpu: 500m
95120
memory: 256Mi
96121

122+
falconWatcherResources:
123+
limits:
124+
cpu: 750m
125+
memory: 256Mi
126+
requests:
127+
cpu: 500m
128+
memory: 256Mi
129+
97130
falconAcResources:
98131
limits:
99132
cpu: 300m

0 commit comments

Comments
 (0)