Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
tico24 authored Jun 28, 2021
2 parents 8788ad1 + 2ca5f49 commit 56bc8f7
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
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: 1.0.1
version: 1.0.2
appVersion: 1.0.3
home: https://sorry-cypress.dev/
sources:
Expand Down
3 changes: 2 additions & 1 deletion charts/sorry-cypress/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,9 @@ If the execution driver is set to `"../execution/mongo/driver"`, you may enable
|--------------------------------|------------------------------------------------------------------------------------|-----------------|
| `mongodb.internal_db.enabled` | If enabled, it will deploy the internal MongoDB service. | `true` |
| `mongodb.external_db.enabled` | If enabled, it will allow you to use an external mongodb | `false` |
| `mongodb.external_db.mongoServer`| The mongo server when providing an external one. Use it with `mongo.enabled=false` | `""` |
| `mongodb.external_db.mongoServer`| The mongo server when providing an external one. Use it with `mongodb.internal_db.enabled=false` | `""` |
| `mongodb.mongoDatabase` | The mongo database | `sorry-cypress` |
| `mongodb.mongoConnectionString` | Ignored if blank. Set a custom mongodb connection string. | `""` |

All other mongodb options are defined in [the Bitnami mongo db helm chart](https://github.com/bitnami/charts/blob/master/bitnami/mongodb/values.yaml).

Expand Down
7 changes: 6 additions & 1 deletion charts/sorry-cypress/templates/deployment-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,13 @@ spec:
{{- if or (.Values.mongodb.internal_db.enabled) (.Values.mongodb.external_db.enabled) }}
- name: MONGODB_DATABASE
value: {{ .Values.mongodb.mongoDatabase }}
{{- if .Values.mongodb.mongoConnectionString }}
- name: MONGODB_URI
value: mongodb://{{ include "mongodb.hostname" . }}:{{ .Values.mongodb.service.port }}
value: {{ .Values.mongodb.mongoConnectionString }}
{{- else }}
- name: MONGODB_URI
value: "mongodb://{{ include "mongodb.hostname" . }}:{{ .Values.mongodb.service.port }}"
{{- end }}
{{- end }}
image: "{{ .Values.api.image.repository }}:{{ .Values.api.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.api.image.pullPolicy }}
Expand Down
6 changes: 5 additions & 1 deletion charts/sorry-cypress/templates/deployment-director.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ spec:
- name: MONGODB_DATABASE
value: {{ .Values.mongodb.mongoDatabase }}
- name: MONGODB_URI
value: mongodb://{{ include "mongodb.hostname" . }}:{{ .Values.mongodb.service.port }}
{{- if .Values.mongodb.mongoConnectionString }}
value: {{ .Values.mongodb.mongoConnectionString }}
{{- else }}
value: "mongodb://{{ include "mongodb.hostname" . }}:{{ .Values.mongodb.service.port }}"
{{- end }}
{{- end }}
- name: SCREENSHOTS_DRIVER
value: {{ .Values.director.environmentVariables.screenshotsDriver }}
Expand Down
1 change: 1 addition & 0 deletions charts/sorry-cypress/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ director:

mongodb:
# You need to ensure that director.environmentVariables.executionDriver is set to "../execution/mongo/driver" if you want the director to use mongodb.
mongoConnectionString: ""

# Set this to "true" if you wish to use your own external mongodb.
external_db:
Expand Down

0 comments on commit 56bc8f7

Please sign in to comment.