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

http:
  http://jaeger-collector:{{ .Vars.collector.service.ports.otlp.http }}/v1/traces:
    status: 405
    body:
      - method not allowed
  http://jaeger-query:{{ .Vars.query.service.ports.http }}/:
    status: 200
    body:
      - Jaeger UI
  http://localhost:{{ .Vars.collector.containerPorts.otlp.http }}/v1/traces:
    status: 405
    body:
      - method not allowed
command:
  check-cassandra-auth:
    exec: \[ $CASSANDRA_USERNAME = {{ .Vars.cassandra.dbUser.user }} ] && [ $CASSANDRA_PASSWORD = {{ .Vars.cassandra.dbUser.password }} ] && [ $CASSANDRA_KEYSPACE = {{ .Vars.cassandra.keyspace }} ];
    exit-status: 0
  {{- $uid := .Vars.collector.containerSecurityContext.runAsUser }}
  {{- $gid := .Vars.collector.podSecurityContext.fsGroup }}
  check-user-info:
    # The UID and GID should always be either the one specified as vars (always a bigger number that the default)
    # or the one randomly defined by openshift (larger values). Otherwise, the chart is still using the default value.
    exec: if [ $(id -u) -lt {{ $uid }} ] || [ $(id -G | awk '{print $2}') -lt {{ $gid }} ]; then exit 1; fi
    exit-status: 0
