Skip to content

Commit

Permalink
Merge branch 'main' into move-mongo-database-value
Browse files Browse the repository at this point in the history
  • Loading branch information
fsmaia committed Jan 13, 2021
2 parents fda815f + 48e1c81 commit e9ebf6d
Show file tree
Hide file tree
Showing 13 changed files with 147 additions and 20 deletions.
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Bug Report
about: A bug 🐞
---

## Summary

Sorry cypress does X, but should do Y

## How to reproduce

## Environment

- sorry-cypress version: `<here>`
- cypress version: `<here>`
- helm chart version: `<here>`
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Feature Request
about: Create a feature request for Sorry Cypress Helm
---

- [ ] I have searched issues for similar feature requests

## What is this feature about (1 sentence)

## Why is it needed? What is the value? For whom do we build it?

## High-level feature overview

## Other
6 changes: 2 additions & 4 deletions .github/workflows/lint-test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Lint and Test Charts

on:
on:
pull_request:
branches:
- main
Expand Down Expand Up @@ -42,9 +42,7 @@ jobs:

- name: Create kind cluster
uses: helm/[email protected]
with:
node_image: kindest/node:v1.18.8
if: steps.list-changed.outputs.changed == 'true'

- name: Run chart-testing (install)
run: ct install --debug --config test.yaml
run: ct install --debug --config test.yaml
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 @@ -106,6 +110,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.11
version: 0.1.12
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
19 changes: 16 additions & 3 deletions charts/sorry-cypress/templates/ingress-api.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{{- if .Values.api.ingress.hosts -}}
{{- $v1Networking := .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" -}}
{{- $fullName := include "sorry-cypress-helm.fullname" . -}}
{{- $svcPort := .Values.api.service.port -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
{{- $servicePort := .Values.api.service.port -}}
{{- if $v1Networking }}
apiVersion: networking.k8s.io/v1
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
Expand Down Expand Up @@ -34,8 +37,18 @@ spec:
- host: {{ .host | quote }}
http:
paths:
{{- if $v1Networking }}
- path: /
pathType: Prefix
backend:
service:
name: {{ $fullName }}-api
port:
number: {{ $servicePort }}
{{- else }}
- backend:
serviceName: {{ $fullName }}-api
servicePort: {{ $svcPort }}
servicePort: {{ $servicePort }}
{{- end }}
{{- end }}
{{- end }}
21 changes: 17 additions & 4 deletions charts/sorry-cypress/templates/ingress-dashboard.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{{- if .Values.dashboard.ingress.enabled -}}
{{- $v1Networking := .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" -}}
{{- $fullName := include "sorry-cypress-helm.fullname" . -}}
{{- $svcPort := .Values.dashboard.service.port -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
{{- $servicePort := .Values.dashboard.service.port -}}
{{- if $v1Networking }}
apiVersion: networking.k8s.io/v1
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
Expand Down Expand Up @@ -34,8 +37,18 @@ spec:
- host: {{ .host | quote }}
http:
paths:
{{- if $v1Networking }}
- path: /
pathType: Prefix
backend:
service:
name: {{ $fullName }}-api
port:
number: {{ $servicePort }}
{{- else }}
- backend:
serviceName: {{ $fullName }}-dashboard
servicePort: {{ $svcPort }}
serviceName: {{ $fullName }}-api
servicePort: {{ $servicePort }}
{{- end }}
{{- end }}
{{- end }}
21 changes: 17 additions & 4 deletions charts/sorry-cypress/templates/ingress-director.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{{- if .Values.director.ingress.enabled -}}
{{- $v1Networking := .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" -}}
{{- $fullName := include "sorry-cypress-helm.fullname" . -}}
{{- $svcPort := .Values.director.service.port -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
{{- $servicePort := .Values.director.service.port -}}
{{- if $v1Networking }}
apiVersion: networking.k8s.io/v1
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
Expand Down Expand Up @@ -34,8 +37,18 @@ spec:
- host: {{ .host | quote }}
http:
paths:
{{- if $v1Networking }}
- path: /
pathType: Prefix
backend:
service:
name: {{ $fullName }}-api
port:
number: {{ $servicePort }}
{{- else }}
- backend:
serviceName: {{ $fullName }}-director
servicePort: {{ $svcPort }}
serviceName: {{ $fullName }}-api
servicePort: {{ $servicePort }}
{{- end }}
{{- end }}
{{- end }}
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 @@ -122,6 +134,12 @@ director:
accessKeyId: abc
secretAccessKey: zyx

# Set annotations for pods
podAnnotations: {}

# Additional pod labels
podLabels: {}

service:
port: 1234

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

# Set annotations for pods
podAnnotations: {}

# Additional pod labels
podLabels: {}

service:
port: 27017

0 comments on commit e9ebf6d

Please sign in to comment.