---
apiVersion: v1
data:
  mc-user-create.sh: "#!/bin/bash\nsource /tmp/minio-config/config.env\n\nuntil mc alias set init \"$MINIO_SERVER_URL\" \"$MINIO_ROOT_USER\" \"$MINIO_ROOT_PASSWORD\"\ndo \n  sleep 5\ndone\nuntil mc admin accesskey edit init/ \"$(< /tmp/minio-user/API_ACCESS_KEY)\" --secret-key \"$(< /tmp/minio-user/API_SECRET_KEY)\"\ndo \n  mc admin user add init  \"$(< /tmp/minio-user/CONSOLE_ACCESS_KEY)\" \"$(< /tmp/minio-user/CONSOLE_SECRET_KEY)\"\n  sleep 1\n  mc admin policy attach init consoleAdmin --user \"$(< /tmp/minio-user/CONSOLE_ACCESS_KEY)\"\n  sleep 1\n  mc admin accesskey create init/ \"$(< /tmp/minio-user/CONSOLE_ACCESS_KEY)\" --access-key \"$(< /tmp/minio-user/API_ACCESS_KEY)\" --secret-key \"$(< /tmp/minio-user/API_SECRET_KEY)\" > /dev/null\n  sleep 1\ndone\n"
kind: ConfigMap
metadata:
  name: mc-user-create-cm
  namespace: minio-tenant-default
