Skip to content

Commit

Permalink
Merge pull request #14 from sorry-cypress/add-support-to-deployment-s…
Browse files Browse the repository at this point in the history
…pec-annotations

Add support to pod annotations and labels
  • Loading branch information
fsmaia authored Jan 12, 2021
2 parents b470a46 + bcc3778 commit 621e4fd
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 5 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ https://sorry-cypress.dev/api#configuration
| `api.image.tag` | Image tag | `latest` |
| `api.image.pullPolicy` | Image pull policy | `Always` |
| `api.resources` | Resources to initialize the container | `{}` |
| `api.podAnnotations` | Set annotations for pods | `{}` |
| `api.podLabels` | Set additional labels for pods | `{}` |
| `api.service.port` | Kubernetes service port | `4000` |
| `api.ingress.labels` | Ingress labels | `{}` |
| `api.ingress.annotations` | Ingress annotations | `{}` |
Expand All @@ -81,6 +83,8 @@ https://sorry-cypress.dev/dashboard#configuration
| `dashboard.resources` | Resources to initialize the container | `{}` |
| `dashboard.environmentVariables.ciUrl` | Set optional environment variable `CI_URL` to add a link to your CI tool | `""` |
| `dashboard.environmentVariables.graphQlSchemaUrl` | Set the environment variable `GRAPHQL_SCHEMA_URL` with the URL of API service. | `""` |
| `dashboard.podAnnotations` | Set annotations for pods | `{}` |
| `dashboard.podLabels` | Set additional labels for pods | `{}` |
| `dashboard.service.port` | Kubernetes service port | `4000` |
| `dashboard.ingress.enabled` | Flag to define if the dashboard service ingress is enabled | `true` |
| `dashboard.ingress.labels` | Ingress labels | `{}` |
Expand All @@ -107,6 +111,8 @@ https://sorry-cypress.dev/director/configuration
| `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.podAnnotations` | Set annotations for pods | `{}` |
| `director.podLabels` | Set additional labels for pods | `{}` |
| `director.service.port` | Kubernetes service port | `4000` |
| `director.ingress.enabled` | Flag to define if the director service ingress is enabled | `true` |
| `director.ingress.labels` | Ingress labels | `{}` |
Expand All @@ -129,4 +135,6 @@ If the execution driver is set to `"../execution/mongo/driver"`, you may enable
| `mongo.persistence.accessMode` | Volumes access mode to be set | `ReadWriteOnce` |
| `mongo.persistence.size` | Size of the volume | `1Gi` |
| `mongo.resources` | Resources to initialize the container | `{}` |
| `mongo.podAnnotations` | Set annotations for pods | `{}` |
| `mongo.podLabels` | Set additional labels for pods | `{}` |
| `mongo.service.port` | Kubernetes service port | `4000` |
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.10
version: 0.1.11
appVersion: 0.6.1
home: https://sorry-cypress.dev/
sources:
Expand Down
9 changes: 8 additions & 1 deletion charts/sorry-cypress/templates/deployment-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,16 @@ spec:
app: {{ include "sorry-cypress-helm.fullname" . }}-api
template:
metadata:
name: {{ include "sorry-cypress-helm.fullname" . }}-api
labels:
app: {{ include "sorry-cypress-helm.fullname" . }}-api
name: {{ include "sorry-cypress-helm.fullname" . }}-api
{{- with .Values.api.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end}}
{{- with .Values.api.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
containers:
- env:
Expand Down
9 changes: 8 additions & 1 deletion charts/sorry-cypress/templates/deployment-dashboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,16 @@ spec:
app: {{ include "sorry-cypress-helm.fullname" . }}-dashboard
template:
metadata:
name: {{ include "sorry-cypress-helm.fullname" . }}-dashboard
labels:
app: {{ include "sorry-cypress-helm.fullname" . }}-dashboard
name: {{ include "sorry-cypress-helm.fullname" . }}-dashboard
{{- with .Values.dashboard.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end}}
{{- with .Values.dashboard.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
containers:
- env:
Expand Down
9 changes: 8 additions & 1 deletion charts/sorry-cypress/templates/deployment-director.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,16 @@ spec:
app: {{ include "sorry-cypress-helm.fullname" . }}-director
template:
metadata:
name: {{ include "sorry-cypress-helm.fullname" . }}-director
labels:
app: {{ include "sorry-cypress-helm.fullname" . }}-director
name: {{ include "sorry-cypress-helm.fullname" . }}-director
{{- with .Values.director.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end}}
{{- with .Values.director.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
containers:
- env:
Expand Down
9 changes: 8 additions & 1 deletion charts/sorry-cypress/templates/deployment-mongo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,16 @@ spec:
app: {{ include "sorry-cypress-helm.fullname" . }}-mongo
template:
metadata:
name: {{ include "sorry-cypress-helm.fullname" . }}-mongo
labels:
app: {{ include "sorry-cypress-helm.fullname" . }}-mongo
name: {{ include "sorry-cypress-helm.fullname" . }}-mongo
{{- with .Values.mongo.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end}}
{{- with .Values.mongo.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
containers:
- image: "{{ .Values.mongo.image.repository }}:{{ .Values.mongo.image.tag | default .Chart.AppVersion }}"
Expand Down
24 changes: 24 additions & 0 deletions charts/sorry-cypress/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ api:
service:
port: 4000

# Set annotations for pods
podAnnotations: {}

# Additional pod labels
podLabels: {}

ingress:
labels: {}
annotations: {}
Expand Down Expand Up @@ -63,6 +69,12 @@ dashboard:
service:
port: 8080

# Set annotations for pods
podAnnotations: {}

# Additional pod labels
podLabels: {}

ingress:
enabled: true
labels: {}
Expand Down Expand Up @@ -125,6 +137,12 @@ director:
accessKeyId: abc
secretAccessKey: zyx

# Set annotations for pods
podAnnotations: {}

# Additional pod labels
podLabels: {}

service:
port: 1234

Expand Down Expand Up @@ -172,5 +190,11 @@ mongo:
# cpu: 100m
# memory: 128Mi

# Set annotations for pods
podAnnotations: {}

# Additional pod labels
podLabels: {}

service:
port: 27017

0 comments on commit 621e4fd

Please sign in to comment.