You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
602 B
YAML

apiVersion: stackgres.io/v1
kind: SGScript
metadata:
namespace: discordbot-2b
name: cluster-scripts
spec:
continueOnError: true
scripts:
- name: create-user
retryOnError: true
version: 3
scriptFrom:
secretKeyRef:
name: 2b-secret
key: create-user.sql
- name: create-db
version: 1
script: |
CREATE DATABASE discordbot;
- name: grant-permissions
retryOnError: true
version: 1
script: |
GRANT ALL ON DATABASE discordbot TO bot;
ALTER DATABASE discordbot OWNER TO bot;
GRANT USAGE, CREATE ON SCHEMA public TO bot;