Skip to content

Commit bde9af8

Browse files
committed
Add custom log location capability
1 parent c0797bf commit bde9af8

File tree

5 files changed

+51
-12
lines changed

5 files changed

+51
-12
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,19 @@ secrets:
3131
3232
Fill them accordingly.
3333
34+
## Custom Log Location
35+
36+
Under the `values.yaml` file you will also find a block of `customLog` attributes as shown:
37+
```yaml
38+
customLog:
39+
enabled: true
40+
logDir: /var/log/crowdstrike/falconhoseclient/
41+
logFile: output
42+
```
43+
44+
Change them accordingly if you chose to use another location for your event logs. \
45+
If left empty, everything is output via stdout.
46+
3447
## TODO
3548

3649
Move secrets to native k8s `Secret` object.

charts/falcon-crowdstrike/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ 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: 0.0.4
18+
version: 0.0.5
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.
2323
# It is recommended to use it with quotes.
24-
appVersion: "0.1.0"
24+
appVersion: "0.1.1"

charts/falcon-crowdstrike/templates/NOTES.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
1. Get the application URL by running these commands:
21
{{- if .Values.ingress.enabled }}
2+
Get the application URL by running these commands:
33
{{- range $host := .Values.ingress.hosts }}
44
{{- range .paths }}
55
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
@@ -23,3 +23,6 @@
2323
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
2424
{{- end }}
2525
{{- end }}
26+
{{- if .Values.customLog }}
27+
Falcon CrowdStrike log location: {{ .Values.customLog.logDir }}{{ .Values.customLog.logFile }}
28+
{{- end }}

charts/falcon-crowdstrike/templates/deployment.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,17 @@ spec:
5050
value: {{ .Values.secrets.CLIENT_SECRET | quote }}
5151
- name: API_BASE_URL
5252
value: {{ .Values.secrets.API_BASE_URL | quote }}
53-
{{- end }}
53+
{{- end }}
54+
{{- if .Values.customLog.enabled }}
55+
{{- if .Values.customLog.logDir }}
56+
- name: LOG_DIR
57+
value: {{ .Values.customLog.logDir | quote }}
58+
{{- end }}
59+
{{- if .Values.customLog.logFile }}
60+
- name: LOG_FILE
61+
value: {{ .Values.customLog.logFile | quote }}
62+
{{- end }}
63+
{{- end }}
5464
{{- with .Values.volumes }}
5565
volumes:
5666
{{- toYaml . | nindent 8 }}

charts/falcon-crowdstrike/values.yaml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ replicaCount: 1
44

55
image:
66
repository: ghcr.io/tsigouris007/falcon-crowdstrike-siem-connector
7-
pullPolicy: IfNotPresent
8-
tag: "v0.1.0"
7+
pullPolicy: Always # IfNotPresent
8+
tag: "v0.1.1"
99

1010
imagePullSecrets: []
1111
nameOverride: "falcon-crowdstrike-app"
@@ -29,6 +29,8 @@ serviceAccount:
2929
service:
3030
create: false
3131
type: ClusterIP
32+
# For compliance with NOTES.txt
33+
port: 80
3234

3335
podAnnotations: {}
3436
podLabels: {}
@@ -67,22 +69,24 @@ autoscaling:
6769
volumes:
6870
- name: log-volume
6971
emptyDir: {}
70-
- name: events-volume
71-
emptyDir: {}
7272
- name: etc-crowdstrike-volume
73-
mountPath: {}
73+
emptyDir: {}
74+
# Uncomment below to declare a different path for your container's LOG_DIR and LOG_FILE setup
75+
# - name: events-volume
76+
# emptyDir: {}
7477

7578
# Additional volumeMounts on the output Deployment definition.
7679
volumeMounts:
7780
- name: log-volume
7881
mountPath: "/var/log/crowdstrike/falconhoseclient/"
7982
readOnly: false
80-
- name: events-volume
81-
mountPath: "/var/log/pods/falconhoseclient/"
82-
readOnly: false
8383
- name: etc-crowdstrike-volume
8484
mountPath: "/opt/crowdstrike/etc/"
8585
readOnly: false
86+
# Uncomment below to declare a different path for your container's LOG_DIR and LOG_FILE setup
87+
# - name: events-volume
88+
# mountPath: "/var/log/pods/falconhoseclient/"
89+
# readOnly: false
8690

8791
nodeSelector: {}
8892

@@ -92,7 +96,16 @@ affinity: {}
9296

9397
ingress:
9498
enabled: false
99+
# For compliance with NOTES.txt
100+
hosts: []
101+
102+
# For your custom LOG_DIR and LOG_FILE setup
103+
customLog:
104+
enabled: true
105+
logDir: /var/log/crowdstrike/falconhoseclient/
106+
logFile: output
95107

108+
# Do not expose the following to your repository
96109
secrets:
97110
CLIENT_ID: ""
98111
CLIENT_SECRET: ""

0 commit comments

Comments
 (0)