Skip to content

Commit 693745b

Browse files
onprem: 2.8.2
1 parent e633aba commit 693745b

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

codefresh/Chart.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
description: Helm Chart for Codefresh On-Prem
33
name: codefresh
4-
version: 2.8.1
4+
version: 2.8.2
55
keywords:
66
- codefresh
77
home: https://codefresh.io/
@@ -18,10 +18,8 @@ annotations:
1818
# artifacthub.io/containsSecurityUpdates: "true"
1919
# supported kinds are added, changed, deprecated, removed, fixed and security.
2020
artifacthub.io/changes: |
21-
- kind: added
22-
description: "Documentation about external MongoDB Atlas"
2321
- kind: fixed
24-
description: "Fix postgresql seed job"
22+
description: "Fix grantPrivileges function in seed job"
2523
dependencies:
2624
- name: cf-common
2725
repository: oci://quay.io/codefresh/charts

codefresh/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Codefresh On-Premises
22

3-
![Version: 2.8.1](https://img.shields.io/badge/Version-2.8.1-informational?style=flat-square) ![AppVersion: 2.8.0](https://img.shields.io/badge/AppVersion-2.8.0-informational?style=flat-square)
3+
![Version: 2.8.2](https://img.shields.io/badge/Version-2.8.2-informational?style=flat-square) ![AppVersion: 2.8.0](https://img.shields.io/badge/AppVersion-2.8.0-informational?style=flat-square)
44

55
Helm chart for deploying [Codefresh On-Premises](https://codefresh.io/docs/docs/getting-started/intro-to-codefresh/) to Kubernetes.
66

codefresh/files/postgresSeedJobScript.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,19 @@ function createUser() {
3737
}
3838

3939
function grantPrivileges() {
40-
psql -c "GRANT ALL ON DATABASE ${1} TO ${POSTGRES_USER}"
40+
local db=$1
41+
echo "Granting privileges on $db to ${POSTGRES_USER}"
42+
# Database-level privileges
43+
psql -c "GRANT ALL ON DATABASE ${db} TO ${POSTGRES_USER}"
44+
# Schema and object-level privileges
45+
psql -d "${db}" -c "GRANT ALL ON SCHEMA public TO ${POSTGRES_USER}"
46+
psql -d "${db}" -c "GRANT ALL ON ALL TABLES IN SCHEMA public TO ${POSTGRES_USER}"
47+
psql -d "${db}" -c "GRANT ALL ON ALL SEQUENCES IN SCHEMA public TO ${POSTGRES_USER}"
48+
psql -d "${db}" -c "GRANT ALL ON ALL FUNCTIONS IN SCHEMA public TO ${POSTGRES_USER}"
49+
# Default privileges for future objects
50+
psql -d "${db}" -c "ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON TABLES TO ${POSTGRES_USER}"
51+
psql -d "${db}" -c "ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON SEQUENCES TO ${POSTGRES_USER}"
52+
psql -d "${db}" -c "ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON FUNCTIONS TO ${POSTGRES_USER}"
4153
}
4254

4355
function runSeed() {

0 commit comments

Comments
 (0)