diff --git a/charts/crowdsec/templates/agent-daemonSet.yaml b/charts/crowdsec/templates/agent-daemonSet.yaml index a603d4b..57e2079 100644 --- a/charts/crowdsec/templates/agent-daemonSet.yaml +++ b/charts/crowdsec/templates/agent-daemonSet.yaml @@ -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 @@ -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: diff --git a/charts/crowdsec/values.yaml b/charts/crowdsec/values.yaml index 56c2014..32c5c0e 100644 --- a/charts/crowdsec/values.yaml +++ b/charts/crowdsec/values.yaml @@ -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