mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-01-27 18:18:41 +00:00
postgres: fix users and roles (#138)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
This commit is contained in:
@@ -16,7 +16,7 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.2.0
|
||||
version: 0.2.1
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
|
||||
@@ -100,13 +100,13 @@ stringData:
|
||||
echo "== assign roles to users"
|
||||
psql -v ON_ERROR_STOP=1 --echo-all <<\EOT
|
||||
{{- range $database, $d := .Values.databases }}
|
||||
{{- range $user, $u := $.Values.roles }}
|
||||
{{- if has $user $d.users.admin }}
|
||||
{{- range $user, $u := $.Values.users }}
|
||||
{{- if has $user $d.roles.admin }}
|
||||
GRANT {{ $database }}_admin TO {{ $user }};
|
||||
{{- else }}
|
||||
REVOKE {{ $database }}_admin FROM {{ $user }};
|
||||
{{- end }}
|
||||
{{- if has $user $d.users.readonly }}
|
||||
{{- if has $user $d.roles.readonly }}
|
||||
GRANT {{ $database }}_readonly TO {{ $user }};
|
||||
{{- else }}
|
||||
REVOKE {{ $database }}_readonly FROM {{ $user }};
|
||||
|
||||
@@ -11,7 +11,8 @@ mysql 0.1.0 f642698
|
||||
mysql 0.2.0 8b975ff0
|
||||
mysql 0.3.0 HEAD
|
||||
postgres 0.1.0 f642698
|
||||
postgres 0.2.0 HEAD
|
||||
postgres 0.2.0 7cd7de73
|
||||
postgres 0.2.1 HEAD
|
||||
rabbitmq 0.1.0 f642698
|
||||
rabbitmq 0.2.0 HEAD
|
||||
redis 0.1.1 f642698
|
||||
|
||||
Reference in New Issue
Block a user