{{- if or .Values.falcoctl.artifact.install.enabled .Values.falcoctl.artifact.follow.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "falco.fullname" . }}-falcoctl
  namespace: {{ include "falco.namespace" . }}
  labels:
    {{- include "falco.labels" . | nindent 4 }}
data:
  falcoctl.yaml: |-
    {{- include "k8smeta.configuration" . -}}
    {{- toYaml .Values.falcoctl.config | nindent 4 }}
{{- end }}
