apiVersion: v1
kind: ConfigMap
metadata:
  name: es-entrypoint
data:
  docker-entrypoint.sh: |
    #!/bin/sh

    # Setup for Keystore
    /elasticsearch/bin/elasticsearch-keystore create
    echo $AZURE_ACCOUNT_NAME | /elasticsearch/bin/elasticsearch-keystore add --stdin azure.client.default.account
    echo $AZURE_ACCOUNT_KEY | /elasticsearch/bin/elasticsearch-keystore add --stdin azure.client.default.key

    /bin/sh /run.sh
