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.

29 lines
663 B
YAML

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