From f78b93e0fd6db73935c9ab7b4312bc97d426e30b Mon Sep 17 00:00:00 2001 From: Fernando Maia Date: Mon, 1 Feb 2021 12:44:45 -0300 Subject: [PATCH 1/2] Add path support to director and S3 ingresses --- charts/sorry-cypress/README.md | 2 ++ charts/sorry-cypress/templates/ingress-director.yml | 5 +++-- charts/sorry-cypress/templates/ingress-s3.tpl | 9 +++++---- charts/sorry-cypress/values.yaml | 4 ++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/charts/sorry-cypress/README.md b/charts/sorry-cypress/README.md index a307040..4956ac6 100644 --- a/charts/sorry-cypress/README.md +++ b/charts/sorry-cypress/README.md @@ -117,6 +117,7 @@ https://sorry-cypress.dev/director/configuration | `director.ingress.labels` | Ingress labels | `{}` | | `director.ingress.annotations` | Ingress annotations | `{}` | | `director.ingress.hosts[0].host` | Hostname to the service installation | `director.chart-example.local` | +| `director.ingress.hosts[0].path` | Root path to the service installation | `/` | | `director.ingress.tls` | Ingress secrets for TLS certificates | `[]` | ### Mongo service @@ -155,4 +156,5 @@ If the screenshots driver is set to `"../screenshots/s3.driver"`, you must confi | `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 | `[]` | diff --git a/charts/sorry-cypress/templates/ingress-director.yml b/charts/sorry-cypress/templates/ingress-director.yml index a7f4879..0e6308c 100644 --- a/charts/sorry-cypress/templates/ingress-director.yml +++ b/charts/sorry-cypress/templates/ingress-director.yml @@ -38,7 +38,7 @@ spec: http: paths: {{- if $v1Networking }} - - path: / + - path: {{ .path | default "/" }} pathType: Prefix backend: service: @@ -46,7 +46,8 @@ spec: port: number: {{ $servicePort }} {{- else }} - - backend: + - path: {{ .path | default "/" }} + backend: serviceName: {{ $fullName }}-director servicePort: {{ $servicePort }} {{- end }} diff --git a/charts/sorry-cypress/templates/ingress-s3.tpl b/charts/sorry-cypress/templates/ingress-s3.tpl index aefbd15..7e42fd1 100644 --- a/charts/sorry-cypress/templates/ingress-s3.tpl +++ b/charts/sorry-cypress/templates/ingress-s3.tpl @@ -16,10 +16,10 @@ metadata: {{- with .Values.s3.ingress.labels }} {{- toYaml . | nindent 4 }} {{- end}} + {{- with .Values.s3.ingress.annotations }} annotations: - {{- with .Values.s3.ingress.annotations }} {{- toYaml . | nindent 4 }} - {{- end }} + {{- end }} spec: {{- if .Values.s3.ingress.tls }} tls: @@ -37,7 +37,7 @@ spec: http: paths: {{- if $v1Networking }} - - path: / + - path: {{ .path | default "/" }} pathType: Prefix backend: service: @@ -45,7 +45,8 @@ spec: port: number: 80 {{- else }} - - backend: + - path: {{ .path | default "/" }} + backend: serviceName: {{ $fullName }}-s3 servicePort: 80 {{- end }} diff --git a/charts/sorry-cypress/values.yaml b/charts/sorry-cypress/values.yaml index a8ee705..38292e8 100644 --- a/charts/sorry-cypress/values.yaml +++ b/charts/sorry-cypress/values.yaml @@ -146,7 +146,7 @@ director: # kubernetes.io/tls-acme: "true" hosts: - host: director.chart-example.local - paths: / + path: / tls: [] # - secretName: chart-example-tls # hosts: @@ -213,7 +213,7 @@ s3: # nginx.ingress.kubernetes.io/cors-allow-methods: "POST, GET, PUT, DELETE, HEAD" hosts: - host: static.chart-example.local - paths: / + path: / tls: [] # - secretName: chart-example-tls # hosts: From 03fe561f0d2606efe6fe186f83e8560403bbadee Mon Sep 17 00:00:00 2001 From: Fernando Maia Date: Mon, 1 Feb 2021 12:45:10 -0300 Subject: [PATCH 2/2] Bump chart version to 0.1.26 --- charts/sorry-cypress/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/sorry-cypress/Chart.yaml b/charts/sorry-cypress/Chart.yaml index 3e48ad8..ed5714a 100644 --- a/charts/sorry-cypress/Chart.yaml +++ b/charts/sorry-cypress/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: sorry-cypress description: A Helm chart for Sorry Cypress type: application -version: 0.1.25 +version: 0.1.26 appVersion: 0.6.1 home: https://sorry-cypress.dev/ sources: