Skip to content

Commit a17e2fb

Browse files
onprem: 2.8.3 (#73)
1 parent 61e1c53 commit a17e2fb

File tree

4 files changed

+8
-46
lines changed

4 files changed

+8
-46
lines changed

codefresh/Chart.yaml

Lines changed: 2 additions & 2 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.2
4+
version: 2.8.3
55
keywords:
66
- codefresh
77
home: https://codefresh.io/
@@ -19,7 +19,7 @@ annotations:
1919
# supported kinds are added, changed, deprecated, removed, fixed and security.
2020
artifacthub.io/changes: |
2121
- kind: fixed
22-
description: "Fix createDB function in postgres seed job"
22+
description: "Fix mongo seed job to support Atlas"
2323
dependencies:
2424
- name: cf-common
2525
repository: oci://quay.io/codefresh/charts

codefresh/README.md

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

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)
3+
![Version: 2.8.3](https://img.shields.io/badge/Version-2.8.3-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

@@ -227,33 +227,13 @@ However, you might need to use external services like [MongoDB Atlas Database](h
227227

228228
#### External MongoDB
229229

230-
> ⚠️ **Important!** If you use MongoDB Atlas, you must create the following databases in advance before installing Codefresh:
231-
232-
```console
233-
archive
234-
audit
235-
charts-manager
236-
cluster-providers
237-
codefresh
238-
context-manager
239-
gitops-dashboard-manager
240-
k8s-monitor
241-
pipeline-manager
242-
platform-analytics-postgres
243-
read-models
244-
runtime-environment-manager
245-
onboarding-status
246-
payments
247-
```
248-
249-
> You alse need to create a database user with `Write` permissions to ALL databases. <br>
230+
> ⚠️ **Important!** If you use MongoDB Atlas, you must create user with `Write` permissions before installing Codefresh: <br>
250231
> Then, provide the user credentials in the chart values at <br>
251232
`.Values.global.mongodbUser/mongodbRootUserSecretKeyRef` <br>
252233
`.Values.global.mongodbPassword/mongodbRootPasswordSecretKeyRef` <br>
253234
`.Values.seed.mongoSeedJob.mongodbRootUser/mongodbRootUserSecretKeyRef` <br>
254235
`.Values.seed.mongoSeedJob.mongodbRootPassword/mongodbRootPasswordSecretKeyRef` <br>
255236
> Ref: <br>
256-
> [Create Database in Atlas](https://www.mongodb.com/docs/atlas/atlas-ui/databases/#create-a-database) <br>
257237
> [Create Users in Atlas](https://www.mongodb.com/docs/atlas/security-add-mongodb-users/#configure-database-users)
258238

259239
`values.yaml` for external MongoDB:

codefresh/README.md.gotmpl

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -228,36 +228,15 @@ However, you might need to use external services like [MongoDB Atlas Database](h
228228

229229
#### External MongoDB
230230

231-
> ⚠️ **Important!** If you use MongoDB Atlas, you must create the following databases in advance before installing Codefresh:
232-
233-
```console
234-
archive
235-
audit
236-
charts-manager
237-
cluster-providers
238-
codefresh
239-
context-manager
240-
gitops-dashboard-manager
241-
k8s-monitor
242-
pipeline-manager
243-
platform-analytics-postgres
244-
read-models
245-
runtime-environment-manager
246-
onboarding-status
247-
payments
248-
```
249-
250-
> You alse need to create a database user with `Write` permissions to ALL databases. <br>
231+
> ⚠️ **Important!** If you use MongoDB Atlas, you must create user with `Write` permissions before installing Codefresh: <br>
251232
> Then, provide the user credentials in the chart values at <br>
252233
`.Values.global.mongodbUser/mongodbRootUserSecretKeyRef` <br>
253234
`.Values.global.mongodbPassword/mongodbRootPasswordSecretKeyRef` <br>
254235
`.Values.seed.mongoSeedJob.mongodbRootUser/mongodbRootUserSecretKeyRef` <br>
255236
`.Values.seed.mongoSeedJob.mongodbRootPassword/mongodbRootPasswordSecretKeyRef` <br>
256237
> Ref: <br>
257-
> [Create Database in Atlas](https://www.mongodb.com/docs/atlas/atlas-ui/databases/#create-a-database) <br>
258238
> [Create Users in Atlas](https://www.mongodb.com/docs/atlas/security-add-mongodb-users/#configure-database-users)
259239

260-
261240
`values.yaml` for external MongoDB:
262241

263242
```yaml

codefresh/files/mongoSeedJobScript.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ for MONGODB_DATABASE in ${MONGODB_DATABASES[@]}; do
115115
mongosh ${MONGODB_ROOT_URI} ${MONGO_URI_EXTRA_PARAMS} --eval "db.getSiblingDB(\"${MONGODB_DATABASE}\").createUser({user: \"${MONGODB_USER}\", pwd: \"${MONGODB_PASSWORD}\", roles: [\"readWrite\"]})" 2>&1 || true
116116
waitForMongoDB
117117
mongosh ${MONGODB_ROOT_URI} ${MONGO_URI_EXTRA_PARAMS} --eval "db.getSiblingDB(\"${MONGODB_DATABASE}\").changeUserPassword(\"${MONGODB_USER}\",\"${MONGODB_PASSWORD}\")" 2>&1 || true
118+
119+
# MongoDB Atlas
120+
mongosh ${MONGODB_ROOT_URI} ${MONGO_URI_EXTRA_PARAMS} --eval "db = db.getSiblingDB(\"${MONGODB_DATABASE}\"); db[\"${MONGODB_DATABASE}\"].insertOne({ name: \"init\", value: true })" 2>&1 || true
118121
done
119122

120123
mongosh ${MONGODB_ROOT_URI} ${MONGO_URI_EXTRA_PARAMS} --eval "db.getSiblingDB(\"codefresh\").grantRolesToUser( \"${MONGODB_USER}\", [ { role: \"readWrite\", db: \"pipeline-manager\" } ] )" 2>&1 || true

0 commit comments

Comments
 (0)