--- apiVersion: batch/v1 kind: Job metadata: name: createadminuser spec: template: spec: restartPolicy: Never containers: - name: createadminuser image: "$IMAGEAPP" envFrom: - secretRef: name: gitea-admin command: - bash - -c - 'gitea migrate && { gitea admin user change-password --username "$username" --password "$password" 2> /dev/null || gitea admin user create --admin --email "$email" --username "$username" --password "$password"; }' volumeMounts: - name: config mountPath: /etc/gitea/app.ini subPath: app.ini readOnly: true - name: secrets mountPath: /etc/gitea/secrets/ readOnly: true volumes: - name: config configMap: name: gitea-config - name: secrets secret: secretName: gitea-secrets backoffLimit: 4