Gitea/manifests/admin-creator.yaml

17 lines
369 B
YAML
Raw Permalink Normal View History

apiVersion: v1
kind: ConfigMap
metadata:
name: gitea-admin-creator
namespace: gitea
data:
admin-creator.sh: |
#!/bin/sh
gitea admin user list --admin | grep $(echo ' ' $ADMIN_USER ' ') >/dev/null 2>&1
if [ $? -eq 1 ];
then
gitea admin user create --username $ADMIN_USER --password $ADMIN_PASSWORD --email $ADMIN_MAIL --admin
fi