# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0

file:
/opt/bitnami/opensearch/config/opensearch.yml:
  mode: "0644"
  filetype: file
  contents:
   - /port.*{{ .Vars.containerPorts.transport }}/
   - /allow_nmap:.*false/
  exists: true
/bitnami/opensearch/data:
    mode: "0644"
    filetype: directory
    exists: true
addr:
  # Container ports
  tcp://opensearch-dashboards:{{ .Vars.dashboards.service.ports.http }}:
    reachable: true
    timeout: 180000
http:
  http://opensearch-master-metrics:{{ .Vars.master.metrics.service.ports.metrics }}/_prometheus/metrics:
    status: 200
    body:
      - /opensearch_jvm.*opensearch-master/
  http://opensearch-data-metrics:{{ .Vars.data.metrics.service.ports.metrics }}/_prometheus/metrics:
    status: 200
    body:
      - /opensearch_jvm.*opensearch-data/
  http://opensearch-coordinating-metrics:{{ .Vars.coordinating.metrics.service.ports.metrics }}/_prometheus/metrics:
    status: 200
    body:
      - /opensearch_jvm.*opensearch-coordinating/
  http://opensearch-ingest-metrics:{{ .Vars.ingest.metrics.service.ports.metrics }}/_prometheus/metrics:
    status: 200
    body:
      - /opensearch_jvm.*opensearch-ingest/
{{- if .Vars.master.containerSecurityContext.enabled }}
command:
  check-no-capabilities:
    exec: cat /proc/1/status
    exit-status: 0
    stdout:
      - "CapInh:	0000000000000000"
      - "CapPrm:	0000000000000000"
      - "CapEff:	0000000000000000"
      - "CapBnd:	0000000000000000"
      - "CapAmb:	0000000000000000"
{{- end }}
