apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ template "sysdig.fullname" . }}
  labels:
{{ include "sysdig.labels" . | indent 4 }}
data:
  dragent.yaml: |
    new_k8s: true
{{- if or .Values.secure.enabled .Values.auditLog.enabled }}
    security:
{{- if .Values.auditLog.enabled }}
      k8s_audit_server_url: {{ .Values.auditLog.auditServerUrl }}
      k8s_audit_server_port: {{ .Values.auditLog.auditServerPort }}
{{- end }}
{{- if .Values.secure.enabled }}
      enabled: true
    commandlines_capture:
      enabled: true
    memdump:
      enabled: true
{{- end }}
{{- end }}
{{- if .Values.sysdig.settings }}
{{ toYaml .Values.sysdig.settings | indent 4 }}
{{- end }}
