Skip to content

Commit

Permalink
Test on supported K8s versions (#74)
Browse files Browse the repository at this point in the history
* Support k8s 1.20-1.22 only.

* networking.k8s.io/v1 only.

* Latest stable sorry-cypress version (1.1.1)
  • Loading branch information
tico24 authored Oct 19, 2021
1 parent 82cbf80 commit 0fd4ccd
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 80 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ jobs:
strategy:
matrix:
kubernetes_version:
# - "kindest/node:v1.21.1" - There seems to be a bug with the github action which casuses 1.21 to fail to start up.
- "kindest/node:v1.22.2"
- "kindest/node:v1.21.2"
- "kindest/node:v1.20.7"
- "kindest/node:v1.19.11"
- "kindest/node:v1.18.19"
- "kindest/node:v1.17.17"
fail-fast: true

steps:
Expand Down
4 changes: 2 additions & 2 deletions charts/sorry-cypress/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: sorry-cypress
description: A Helm chart for Sorry Cypress
type: application
version: 1.0.9
appVersion: 1.1.0
version: 1.1.0
appVersion: 1.1.1
home: https://sorry-cypress.dev/
sources:
- https://github.com/sorry-cypress/sorry-cypress
Expand Down
32 changes: 18 additions & 14 deletions charts/sorry-cypress/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ https://sorry-cypress.dev/api#configuration
| `api.readinessProbe.timeoutSeconds` | Number of seconds after which the probe times out. | `3` |
| `api.readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | `2` |
| `api.readinessProbe.failureThreshold` | When a probe fails, Kubernetes will try `failureThreshold` times before giving up. | `5` |
| `api.ingress.ingressClassName` | The IngressClass that should be used to implement this Ingress | `nginx` |
| `api.ingress.labels` | Ingress labels | `{}` |
| `api.ingress.annotations` | Ingress annotations | `{}` |
| `api.ingress.hosts[0].host` | Hostname to the service installation | `api.chart-example.local` |
Expand Down Expand Up @@ -109,6 +110,7 @@ https://sorry-cypress.dev/dashboard#configuration
| `dashboard.tolerations` | Set tolerations 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.ingressClassName` | The IngressClass that should be used to implement this Ingress | `nginx` |
| `dashboard.ingress.labels` | Ingress labels | `{}` |
| `dashboard.ingress.annotations` | Ingress annotations | `{}` |
| `dashboard.ingress.hosts[0].host` | Hostname to the service installation | `dashboard.chart-example.local` |
Expand Down Expand Up @@ -138,6 +140,7 @@ https://sorry-cypress.dev/director/configuration
| `director.tolerations` | Set tolerations 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.ingressClassName` | The IngressClass that should be used to implement this Ingress | `nginx` |
| `director.ingress.labels` | Ingress labels | `{}` |
| `director.ingress.annotations` | Ingress annotations | `{}` |
| `director.ingress.hosts[0].host` | Hostname to the service installation | `director.chart-example.local` |
Expand Down Expand Up @@ -167,20 +170,21 @@ https://sorry-cypress.dev/director/storage

## S3

| Parameter | Description | Default |
| -------------------------- | ----------------------------------------------------------------------------------------------------------------- | ---------------------------- |
| `s3.bucketName` | Set the screenshots storage bucket name | `example-bucket` |
| `s3.region` | Set the screenshots storage bucket region | `us-east-1` |
| `s3.acl` | The uploaded video/screenshot object ACL | `"public-read"` |
| `s3.readUrlPrefix` | The host to load the video/screenshot in the dashboard (defaults to the bucket URL) | `""` |
| `s3.accessKey` | The `AWS_ACCESS_KEY_ID` environment variable to configure AWS credentials | `""` |
| `s3.secretAccessKey` | The `AWS_SECRET_ACCESS_KEY` environment variable to configure AWS credentials | `""` |
| `s3.ingress.enabled` | Flag to define if the S3 ingress is enabled. **It will also enable an ExternalName service to expose the bucket** | `true` |
| `s3.ingress.labels` | Ingress labels | `{}` |
| `s3.ingress.annotations` | Ingress annotations | `{}` |
| `s3.ingress.hosts[0].host` | Hostname to the service installation | `static.chart-example.local` |
| `s3.ingress.hosts[0].path` | Root path to the service installation | `/` |
| `s3.ingress.tls` | Ingress secrets for TLS certificates | `[]` |
| Parameter | Description | Default |
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------- | ---------------------------- |
| `s3.bucketName` | Set the screenshots storage bucket name | `example-bucket` |
| `s3.region` | Set the screenshots storage bucket region | `us-east-1` |
| `s3.acl` | The uploaded video/screenshot object ACL | `"public-read"` |
| `s3.readUrlPrefix` | The host to load the video/screenshot in the dashboard (defaults to the bucket URL) | `""` |
| `s3.accessKey` | The `AWS_ACCESS_KEY_ID` environment variable to configure AWS credentials | `""` |
| `s3.secretAccessKey` | The `AWS_SECRET_ACCESS_KEY` environment variable to configure AWS credentials | `""` |
| `s3.ingress.enabled` | Flag to define if the S3 ingress is enabled. **It will also enable an ExternalName service to expose the bucket** | `true` |
| `s3.ingress.ingressClassName` | The IngressClass that should be used to implement this Ingress | `nginx` |
| `s3.ingress.labels` | Ingress labels | `{}` |
| `s3.ingress.annotations` | Ingress annotations | `{}` |
| `s3.ingress.hosts[0].host` | Hostname to the service installation | `static.chart-example.local` |
| `s3.ingress.hosts[0].path` | Root path to the service installation | `/` |
| `s3.ingress.tls` | Ingress secrets for TLS certificates | `[]` |

### MinIO

Expand Down
10 changes: 10 additions & 0 deletions charts/sorry-cypress/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# 1.1.0
## Update
Only Kubernetes 1.19+ is supported.
This means we only support `networking.k8s.io/v1`.
Latest stable Sorry Cypress version (1.1.1)

# 1.0.9
## Fix
Remove hard-coded namespace from service-s3.

# 1.0.0
## Breaking Changes
Uses the bitnami mongodb helm chart. There is no automated upgrade path from previous versions... you will have to manually migrate data.
Expand Down
15 changes: 1 addition & 14 deletions charts/sorry-cypress/templates/ingress-api.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
{{- if .Values.api.ingress.hosts -}}
{{- $v1Networking := .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" -}}
{{- $fullName := include "sorry-cypress-helm.fullname" . -}}
{{- $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
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}-api
Expand All @@ -22,6 +15,7 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
ingressClassName: {{ .Values.api.ingress.ingressClassName }}
{{- if .Values.api.ingress.tls }}
tls:
{{- range .Values.api.ingress.tls }}
Expand All @@ -37,19 +31,12 @@ spec:
- host: {{ .host | quote }}
http:
paths:
{{- if $v1Networking }}
- path: {{ .path | default "/" }}
pathType: Prefix
backend:
service:
name: {{ $fullName }}-api
port:
number: {{ $servicePort }}
{{- else }}
- path: {{ .path | default "/" }}
backend:
serviceName: {{ $fullName }}-api
servicePort: {{ $servicePort }}
{{- end }}
{{- end }}
{{- end }}
15 changes: 1 addition & 14 deletions charts/sorry-cypress/templates/ingress-dashboard.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
{{- if .Values.dashboard.ingress.enabled -}}
{{- $v1Networking := .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" -}}
{{- $fullName := include "sorry-cypress-helm.fullname" . -}}
{{- $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
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}-dashboard
Expand All @@ -22,6 +15,7 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
ingressClassName: {{ .Values.dashboard.ingress.ingressClassName }}
{{- if .Values.dashboard.ingress.tls }}
tls:
{{- range .Values.dashboard.ingress.tls }}
Expand All @@ -37,19 +31,12 @@ spec:
- host: {{ .host | quote }}
http:
paths:
{{- if $v1Networking }}
- path: {{ .path | default "/" }}
pathType: Prefix
backend:
service:
name: {{ $fullName }}-dashboard
port:
number: {{ $servicePort }}
{{- else }}
- path: {{ .path | default "/" }}
backend:
serviceName: {{ $fullName }}-dashboard
servicePort: {{ $servicePort }}
{{- end }}
{{- end }}
{{- end }}
15 changes: 1 addition & 14 deletions charts/sorry-cypress/templates/ingress-director.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
{{- if .Values.director.ingress.enabled -}}
{{- $v1Networking := .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" -}}
{{- $fullName := include "sorry-cypress-helm.fullname" . -}}
{{- $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
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}-director
Expand All @@ -22,6 +15,7 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
ingressClassName: {{ .Values.director.ingress.ingressClassName }}
{{- if .Values.director.ingress.tls }}
tls:
{{- range .Values.director.ingress.tls }}
Expand All @@ -37,19 +31,12 @@ spec:
- host: {{ .host | quote }}
http:
paths:
{{- if $v1Networking }}
- path: {{ .path | default "/" }}
pathType: Prefix
backend:
service:
name: {{ $fullName }}-director
port:
number: {{ $servicePort }}
{{- else }}
- path: {{ .path | default "/" }}
backend:
serviceName: {{ $fullName }}-director
servicePort: {{ $servicePort }}
{{- end }}
{{- end }}
{{- end }}
15 changes: 1 addition & 14 deletions charts/sorry-cypress/templates/ingress-s3.tpl
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
{{- if .Values.s3.ingress.enabled -}}
{{- $v1Networking := .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" -}}
{{- $fullName := include "sorry-cypress-helm.fullname" . -}}
{{- 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
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}-s3
Expand All @@ -21,6 +14,7 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
ingressClassName: {{ .Values.s3.ingress.ingressClassName }}
{{- if .Values.s3.ingress.tls }}
tls:
{{- range .Values.s3.ingress.tls }}
Expand All @@ -36,19 +30,12 @@ spec:
- host: {{ .host | quote }}
http:
paths:
{{- if $v1Networking }}
- path: {{ .path | default "/" }}
pathType: Prefix
backend:
service:
name: {{ $fullName }}-s3
port:
number: 80
{{- else }}
- path: {{ .path | default "/" }}
backend:
serviceName: {{ $fullName }}-s3
servicePort: 80
{{- end }}
{{- end }}
{{- end }}
8 changes: 4 additions & 4 deletions charts/sorry-cypress/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ api:
podLabels: {}

ingress:
ingressClassName: nginx
labels: {}
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: api.chart-example.local
Expand Down Expand Up @@ -117,10 +117,10 @@ dashboard:
podLabels: {}

ingress:
ingressClassName: nginx
enabled: true
labels: {}
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: dashboard.chart-example.local
Expand Down Expand Up @@ -198,9 +198,9 @@ director:

ingress:
enabled: true
ingressClassName: nginx
labels: {}
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: director.chart-example.local
Expand Down Expand Up @@ -259,9 +259,9 @@ s3:
ingress:
# When enabling ingress, an ExternalName service will be also created to expose the bucket.
enabled: false
ingressClassName: nginx
labels: {}
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
# nginx.ingress.kubernetes.io/upstream-vhost: <bucket>.s3-website-<region>.amazonaws.com
# nginx.ingress.kubernetes.io/enable-cors: "true"
Expand Down

0 comments on commit 0fd4ccd

Please sign in to comment.