Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/henrywhitaker3/crunchy-users
https://github.com/henrywhitaker3/crunchy-users
Last synced: 2 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/henrywhitaker3/crunchy-users
- Owner: henrywhitaker3
- Created: 2024-06-25T21:50:23.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-10-23T17:26:49.000Z (21 days ago)
- Last Synced: 2024-10-24T01:17:01.161Z (21 days ago)
- Language: Go
- Size: 61.5 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Crunchy Users
This is used to set initial permissions for users and databases created in a crunchy-pgo cluster
It watches all `PostgresCluster` resources in the cluster with the `crunchy-users.henrywhitaker3.github.com/watch` label set to `true` and will update any databases you have defined by running `ALTER DATABASE {db} OWNER TO {user}` using the superuser defined in the `crunchy-users.henrywhitaker3.github.com/superuser` annotation
e.g.
```yaml
apiVersion: postgres-operator.crunchydata.com/v1beta1
kind: PostgresCluster
metadata:
name: crunchy
labels:
crunchy-users.henrywhitaker3.github.com/watch: "true"
annotations:
crunchy-users.henrywhitaker3.github.com/superuser: "postgres"
spec:
...
users:
- name: bongo
databases:
- bongo1
- bongo2
```Both databases `bongo1` and `bongo2` will have their owner set to the user `bongo`.
## Extensions
To create extensions for a database, you can add entries to the `crunchy-users.henrywhitaker3.github.com/extensions` annotation. This expects a json array:
```yaml
apiVersion: postgres-operator.crunchydata.com/v1beta1
kind: PostgresCluster
metadata:
name: crunchy
labels:
crunchy-users.henrywhitaker3.github.com/watch: "true"
annotations:
crunchy-users.henrywhitaker3.github.com/superuser: "postgres"
crunchy-users.henrywhitaker3.github.com/extensions: |
[
{
"extension": "vector",
"database": "bongo",
"cascade": true
}
]
```Cascade will default to `false`.
## Installation
The helm chart is hosted at `oci://ghcr.io/henrywhitaker3/crunchy-users-helm`