Skip to content

Commit

Permalink
Add option to disable varlog hostPath (#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
fcharlaix-opendsi authored Jun 25, 2024
1 parent cea6398 commit 9ffa06d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions charts/crowdsec/templates/agent-daemonSet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,11 @@ spec:
- name: acquis-config-volume
mountPath: {{ $crowdsecConfig }}/acquis.yaml
subPath: acquis.yaml
{{- if .Values.agent.hostVarLog }}
- name: varlog
mountPath: /var/log
readOnly: true
{{- end }}
{{- if (eq "docker" .Values.container_runtime) }}
- name: varlibdockercontainers
mountPath: /var/lib/docker/containers
Expand All @@ -183,9 +185,11 @@ spec:
- name: acquis-config-volume
configMap:
name: acquis-configmap
{{- if .Values.agent.hostVarLog }}
- name: varlog
hostPath:
path: /var/log
{{- end }}
{{- if .Values.agent.persistentVolume.config.enabled }}
- name: crowdsec-agent-config
persistentVolumeClaim:
Expand Down
2 changes: 2 additions & 0 deletions charts/crowdsec/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,8 @@ agent:
storageClassName: ""
existingClaim: ""
size: 100Mi
# -- Enable hostPath to /var/log
hostVarLog: true
# -- environment variables from crowdsecurity/crowdsec docker image
env: []
# by default we configure the docker-logs parser to be able to parse docker logs in k8s
Expand Down

0 comments on commit 9ffa06d

Please sign in to comment.