http:
  http://logstash:{{ .Vars.service.ports.http }}:
    status: 200
file:
  {{ .Vars.persistence.mountPath }}:
    exists: true
    filetype: directory
    mode: "0775"
    owner: logstash
  /bitnami/logstash/config/logstash.conf:
    exists: true
    filetype: symlink
    mode: "0777"
    owner: root
    contains:
    - /port.*{{ .Vars.containerPorts.http }}/
  /var/run/secrets/kubernetes.io/serviceaccount:
    exists: {{ .Vars.serviceAccount.automountServiceAccountToken }}
    filetype: directory
    mode: "3777"
command:
  {{- $rnd_ip := printf "%s.%s.%s.%s" (randNumeric 2) (randNumeric 2) (randNumeric 2) (randNumeric 2) }}
  {{- $rnd_address := printf "http://%s.com" (randAlpha 5) }}
  test-pipeline:
    # Logstash can take some time to parse and filter each input
    exec: echo '{{ $rnd_ip }} - - [18/May/2011:19:35:08 -0700] "GET /css/main.css HTTP/1.1" 200 55 "{{ $rnd_address }}" "Mozilla/5.0"' >> /tmp/test_input && sleep 20 && cat /tmp/test_log
    exit-status: 0
    stdout:
      - {{ $rnd_ip }}
      - /status_code.*200/
      - /referrer.*{{ $rnd_address }}/
    timeout: 30000
  check-user-info:
    exec: id
    exit-status: 0
    stdout:
    - uid={{ .Vars.containerSecurityContext.runAsUser }}
    - /groups=.*{{ .Vars.podSecurityContext.fsGroup }}/
