Skip to content

Commit

Permalink
Merge pull request #17 from sorry-cypress/change-bucket-access-defaul…
Browse files Browse the repository at this point in the history
…t-variable

Change S3 access default variables
  • Loading branch information
fsmaia authored Jan 13, 2021
2 parents 50a6e92 + cc2e0d0 commit ac57871
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ https://sorry-cypress.dev/director/configuration
| `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` |
| `director.s3.accessKey` | The `AWS_ACCESS_KEY_ID` environment variable to configure AWS credentials, if the screenshots driver is set to `"../screenshots/s3.driver"` | `abc` |
| `director.s3.secretAccessKey` | The `AWS_SECRET_ACCESS_KEY` environment variable to configure AWS credentials, if the screenshots driver is set to `"../screenshots/s3.driver"` | `zyx` |
| `director.s3.accessKey` | The `AWS_ACCESS_KEY_ID` environment variable to configure AWS credentials, if the screenshots driver is set to `"../screenshots/s3.driver"` | `""` |
| `director.s3.secretAccessKey` | The `AWS_SECRET_ACCESS_KEY` environment variable to configure AWS credentials, if the screenshots driver is set to `"../screenshots/s3.driver"` | `""` |
| `director.podAnnotations` | Set annotations for pods | `{}` |
| `director.podLabels` | Set additional labels for pods | `{}` |
| `director.service.port` | Kubernetes service port | `4000` |
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.13
version: 0.1.14
appVersion: 0.6.1
home: https://sorry-cypress.dev/
sources:
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 @@ -41,14 +41,18 @@ spec:
value: {{ .Values.director.s3.bucketName }}
- name: S3_REGION
value: {{ .Values.director.s3.region }}
{{- with .Values.director.s3.accessKeyId }}
- name: AWS_ACCESS_KEY_ID
value: {{ .Values.director.s3.accessKeyId }}
value: {{ . }}
{{- end }}
{{- if .Values.director.s3.secretAccessKey }}
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: {{ include "sorry-cypress-helm.fullname" . }}-s3Secrets
key: AWS_SECRET_ACCESS_KEY
{{- end }}
{{- end }}
image: "{{ .Values.director.image.repository }}:{{ .Values.director.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.director.image.pullPolicy }}
name: {{ include "sorry-cypress-helm.fullname" . }}-director
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if eq .Values.director.environmentVariables.screenshotsDriver "../screenshots/s3.driver" -}}
{{- if and (eq .Values.director.environmentVariables.screenshotsDriver "../screenshots/s3.driver") (.Values.director.s3.secretAccessKey) -}}
apiVersion: v1
kind: Secret
metadata:
Expand Down
4 changes: 2 additions & 2 deletions charts/sorry-cypress/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ director:
s3:
bucketName: example-bucket
region: us-east-1
accessKeyId: abc
secretAccessKey: zyx
accessKeyId: ""
secretAccessKey: ""

# Set annotations for pods
podAnnotations: {}
Expand Down

0 comments on commit ac57871

Please sign in to comment.