file:
  /var/run/secrets/kubernetes.io/serviceaccount:
    exists: {{ .Vars.serviceAccount.automountServiceAccountToken }}
    filetype: directory
    mode: "3777"
    owner: root
  {{ .Vars.persistence.mountPath }}:
    exists: true
    filetype: directory
    mode: "2775"
    owner: root
  {{ .Vars.logPersistence.mountPath }}:
    exists: true
    filetype: directory
    mode: "2777"
    owner: root
  /opt/bitnami/kafka/config/server.properties:
    exists: true
    filetype: file
    mode: "0664"
    owner: root
    group: root
    contains:
    - super.users={{ .Vars.superUsers }}
    - listeners=INTERNAL://:{{ .Vars.containerPorts.internal }},CLIENT://:{{ .Vars.containerPorts.client }},EXTERNAL://:{{ .Vars.containerPorts.external }}
command:
  create-kafka-topic:
    exec: kafka-topics.sh --create --topic quickstart-events{{randAlpha 5}} --bootstrap-server kafka:{{ .Vars.service.ports.client }}
    exit-status: 0
    timeout: 20000
  check-user-info:
    exec: id
    exit-status: 0
    stdout:
    - uid={{ .Vars.containerSecurityContext.runAsUser }}
    - /groups=.*{{ .Vars.podSecurityContext.fsGroup }}/
