apiVersion: v1
data:
  ingress-container-start.sh: |-
    #!/bin/bash

    . /health/ingress-container-wait-for-kong.sh

    kong-ingress-controller
  ingress-container-wait-for-kong.sh: |-
    #!/bin/bash

    echo "Waiting for the Kong container to be ready"
    if wait-for-port --timeout=300 --host=127.0.0.1 --state=inuse 8000; then
      echo "Kong container ready"
    else
      echo "Kong not ready after 300 seconds"
      exit 1
    fi
  kong-container-health.sh: |-
    #!/bin/bash

    set -o errexit
    set -o nounset
    set -o pipefail

    # Load libraries
    . /opt/bitnami/scripts/libos.sh
    . /opt/bitnami/scripts/libkong.sh

    # Load Kong environment variables
    eval "$(kong_env)"

    is_kong_running
kind: ConfigMap
metadata:
  labels:
    app.kubernetes.io/component: server
    app.kubernetes.io/instance: RELEASE-NAME
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: kong
    helm.sh/chart: kong-5.0.4
  name: RELEASE-NAME-kong-scripts
  namespace: default
