Skip to content

onprem: 2.8.3 #73

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions codefresh/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
description: Helm Chart for Codefresh On-Prem
name: codefresh
version: 2.8.2
version: 2.8.3
keywords:
- codefresh
home: https://codefresh.io/
Expand All @@ -19,7 +19,7 @@ annotations:
# supported kinds are added, changed, deprecated, removed, fixed and security.
artifacthub.io/changes: |
- kind: fixed
description: "Fix createDB function in postgres seed job"
description: "Fix mongo seed job to support Atlas"
dependencies:
- name: cf-common
repository: oci://quay.io/codefresh/charts
Expand Down
24 changes: 2 additions & 22 deletions codefresh/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Codefresh On-Premises

![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)
![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)

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

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

#### External MongoDB

> ⚠️ **Important!** If you use MongoDB Atlas, you must create the following databases in advance before installing Codefresh:

```console
archive
audit
charts-manager
cluster-providers
codefresh
context-manager
gitops-dashboard-manager
k8s-monitor
pipeline-manager
platform-analytics-postgres
read-models
runtime-environment-manager
onboarding-status
payments
```

> You alse need to create a database user with `Write` permissions to ALL databases. <br>
> ⚠️ **Important!** If you use MongoDB Atlas, you must create user with `Write` permissions before installing Codefresh: <br>
> Then, provide the user credentials in the chart values at <br>
`.Values.global.mongodbUser/mongodbRootUserSecretKeyRef` <br>
`.Values.global.mongodbPassword/mongodbRootPasswordSecretKeyRef` <br>
`.Values.seed.mongoSeedJob.mongodbRootUser/mongodbRootUserSecretKeyRef` <br>
`.Values.seed.mongoSeedJob.mongodbRootPassword/mongodbRootPasswordSecretKeyRef` <br>
> Ref: <br>
> [Create Database in Atlas](https://www.mongodb.com/docs/atlas/atlas-ui/databases/#create-a-database) <br>
> [Create Users in Atlas](https://www.mongodb.com/docs/atlas/security-add-mongodb-users/#configure-database-users)

`values.yaml` for external MongoDB:
Expand Down
23 changes: 1 addition & 22 deletions codefresh/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -228,36 +228,15 @@ However, you might need to use external services like [MongoDB Atlas Database](h

#### External MongoDB

> ⚠️ **Important!** If you use MongoDB Atlas, you must create the following databases in advance before installing Codefresh:

```console
archive
audit
charts-manager
cluster-providers
codefresh
context-manager
gitops-dashboard-manager
k8s-monitor
pipeline-manager
platform-analytics-postgres
read-models
runtime-environment-manager
onboarding-status
payments
```

> You alse need to create a database user with `Write` permissions to ALL databases. <br>
> ⚠️ **Important!** If you use MongoDB Atlas, you must create user with `Write` permissions before installing Codefresh: <br>
> Then, provide the user credentials in the chart values at <br>
`.Values.global.mongodbUser/mongodbRootUserSecretKeyRef` <br>
`.Values.global.mongodbPassword/mongodbRootPasswordSecretKeyRef` <br>
`.Values.seed.mongoSeedJob.mongodbRootUser/mongodbRootUserSecretKeyRef` <br>
`.Values.seed.mongoSeedJob.mongodbRootPassword/mongodbRootPasswordSecretKeyRef` <br>
> Ref: <br>
> [Create Database in Atlas](https://www.mongodb.com/docs/atlas/atlas-ui/databases/#create-a-database) <br>
> [Create Users in Atlas](https://www.mongodb.com/docs/atlas/security-add-mongodb-users/#configure-database-users)


`values.yaml` for external MongoDB:

```yaml
Expand Down
3 changes: 3 additions & 0 deletions codefresh/files/mongoSeedJobScript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ for MONGODB_DATABASE in ${MONGODB_DATABASES[@]}; do
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
waitForMongoDB
mongosh ${MONGODB_ROOT_URI} ${MONGO_URI_EXTRA_PARAMS} --eval "db.getSiblingDB(\"${MONGODB_DATABASE}\").changeUserPassword(\"${MONGODB_USER}\",\"${MONGODB_PASSWORD}\")" 2>&1 || true

# MongoDB Atlas
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
done

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