apiVersion: v1
kind: ConfigMap
metadata:
  name: "generate-mnemonic-config-map"
  annotations:
    "helm.sh/hook": pre-install
    "helm.sh/hook-weight": "-1"
    "helm.sh/hook-delete-policy": hook-succeeded
data:
  entrypoint.sh: |-
    #!/bin/sh
    if [ ! -e /plots/keyfile ]; then
        /chia-blockchain/venv/bin/python3 -c "from chia.util.keychain import generate_mnemonic;print(generate_mnemonic())" > /plots/keyfile;
    fi
