Skip to content

Commit

Permalink
Merge pull request #11 from sorry-cypress/move-mongo-database-value
Browse files Browse the repository at this point in the history
Move `director.environmentVariables.mongodbDatabase` to `mongo.mongoDatabase`
  • Loading branch information
fsmaia authored Jan 13, 2021
2 parents 48e1c81 + 36e6a8f commit 50a6e92
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 12 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ https://sorry-cypress.dev/director/configuration
| `director.environmentVariables.allowedKeys` | Define the list of comma delimited record keys (provided to the Cypress Runner using `--key` option). Empty or not provided variable means that all record keys are allowed. | `""` |
| `dashboard.environmentVariables.dashboardUrl` | The "Run URL" in the Cypress client | `""` |
| `director.environmentVariables.executionDriver` | Set the execution driver. Valid options are `"../execution/in-memory"` and `"../execution/mongo/driver"` | `"../execution/in-memory"` |
| `director.environmentVariables.mongodbDatabase` | Set the MongoDB database, if the execution driver is set to `"../execution/mongo/driver"` | `sorry-cypress` |
| `director.environmentVariables.screenshotsDriver` | Set the screenshots driver. Valid options are `"../screenshots/dummy.driver"` and `"../screenshots/s3.driver"` | `"../screenshots/dummy.driver"` |
| `director.s3.bucketName` | Set the screenshots storage bucket name, if the screenshots driver is set to `"../screenshots/s3.driver"` | `example-bucket` |
| `director.s3.region` | Set the screenshots storage bucket region, if the screenshots driver is set to `"../screenshots/s3.driver"` | `us-east-1` |
Expand All @@ -122,11 +121,12 @@ https://sorry-cypress.dev/director/configuration

### Mongo service

If the execution driver is set to `"../execution/mongo/driver"`, you may enable to MongoDB service deploy or provide an external one. Ignore this configuration when using other execution drivers.
If the execution driver is set to `"../execution/mongo/driver"`, you may enable the internal MongoDB service deploy or provide an external one. Ignore this configuration when using other execution drivers.

| Parameter | Description | Default |
| ------------------------------ | ---------------------------------------------------------------------------------- | --------------- |
| `mongo.enabled` | If enabled, it will deploy the internal MongoDB service. | `false` |
| `mongo.mongoDatabase` | The mongo database | `sorry-cypress` |
| `mongo.mongoServer` | The mongo server when providing an external one. Use it with `mongo.enabled=false` | `""` |
| `mongo.image.repository` | Image repository | `mongo` |
| `mongo.image.tag` | Image tag | `"4.0"` |
Expand Down
2 changes: 1 addition & 1 deletion charts/sorry-cypress/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: sorry-cypress
description: A Helm chart for Sorry Cypress
type: application
version: 0.1.12
version: 0.1.13
appVersion: 0.6.1
home: https://sorry-cypress.dev/
sources:
Expand Down
4 changes: 2 additions & 2 deletions charts/sorry-cypress/templates/deployment-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ spec:
- env:
{{- if eq .Values.director.environmentVariables.executionDriver "../execution/mongo/driver" }}
- name: MONGODB_DATABASE
value: sorry-cypress
value: {{ .Values.mongo.mongoDatabase }}
- name: MONGODB_URI
value: mongodb://{{ include "sorry-cypress-helm.fullname" . }}-mongo:{{ .Values.mongo.service.port }}
value: mongodb://{{ include "mongo.hostname" . }}:{{ .Values.mongo.service.port }}
{{- end }}
image: "{{ .Values.api.image.repository }}:{{ .Values.api.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.api.image.pullPolicy }}
Expand Down
2 changes: 1 addition & 1 deletion charts/sorry-cypress/templates/deployment-director.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
value: {{ .Values.director.environmentVariables.executionDriver }}
{{- if eq .Values.director.environmentVariables.executionDriver "../execution/mongo/driver" }}
- name: MONGODB_DATABASE
value: {{ .Values.director.environmentVariables.mongodbDatabase }}
value: {{ .Values.mongo.mongoDatabase }}
- name: MONGODB_URI
value: mongodb://{{ include "mongo.hostname" . }}:{{ .Values.mongo.service.port }}
{{- end }}
Expand Down
10 changes: 4 additions & 6 deletions charts/sorry-cypress/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,6 @@ director:
# "../execution/mongo/driver"
executionDriver: "../execution/in-memory"

# Ignored if mongo.environmentVariables.executionDriver is set to "../execution/in-memory"
mongodbDatabase: sorry-cypress

# Dummy or S3
# Valid options are:
# "../screenshots/dummy.driver"
Expand Down Expand Up @@ -164,9 +161,10 @@ mongo:
# You need to ensure that mongo.environmentVariables.executionDriver is set to "../execution/mongo/driver" if you want mongo.enabled to be true.
enabled: false

# To use an external MongoDB instance, set enabled to false and uncomment
# the line below:
# mongoServer: ""
mongoDatabase: "sorry-cypress"

# Ignored if mongo.enabled is set to true
mongoServer: ""

image:
repository: mongo
Expand Down

0 comments on commit 50a6e92

Please sign in to comment.