From be43da81456315b44ae995b7796097026bca4aee Mon Sep 17 00:00:00 2001 From: Dylan Jay Date: Fri, 31 May 2024 16:12:13 +0700 Subject: [PATCH 1/2] seems to be needed for TLS to work --- plone6-volto-zeo/templates/api-ingress.yaml | 8 ++++---- plone6-volto-zeo/templates/ingress.yaml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plone6-volto-zeo/templates/api-ingress.yaml b/plone6-volto-zeo/templates/api-ingress.yaml index 9d3ea56..07a37c0 100644 --- a/plone6-volto-zeo/templates/api-ingress.yaml +++ b/plone6-volto-zeo/templates/api-ingress.yaml @@ -19,9 +19,8 @@ metadata: name: {{ $fullName }}-api labels: {{- include "plone.labels" . | nindent 4 }} - {{- with .Values.apiIngress.annotations }} annotations: - {{- if contains "nginx" .Values.ingress.class }} + {{- if contains "nginx" .Values.ingress.className }} nginx.ingress.kubernetes.io/use-regex: "true" {{- if .Values.ingress.tls }} nginx.ingress.kubernetes.io/rewrite-target: "/VirtualHostBase/https/{{ $hostName }}:443/Plone/++api++/VirtualHostRoot/$2" @@ -30,8 +29,9 @@ metadata: {{- end }} nginx.ingress.kubernetes.io/service-upstream: "true" {{- end }} - {{- toYaml . | nindent 4 }} - {{- end }} + {{- with .Values.apiIngress.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} ingressClassName: {{ .Values.ingress.className }} diff --git a/plone6-volto-zeo/templates/ingress.yaml b/plone6-volto-zeo/templates/ingress.yaml index 8b1794d..b9c007f 100644 --- a/plone6-volto-zeo/templates/ingress.yaml +++ b/plone6-volto-zeo/templates/ingress.yaml @@ -18,13 +18,13 @@ metadata: name: {{ $fullName }} labels: {{- include "plone.labels" . | nindent 4 }} - {{- with .Values.ingress.annotations }} annotations: - {{- if contains "nginx" .Values.ingress.class }} + {{- if contains "nginx" .Values.ingress.className }} nginx.ingress.kubernetes.io/service-upstream: "true" {{- end }} - {{- toYaml . | nindent 4 }} - {{- end }} + {{- with .Values.ingress.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} ingressClassName: {{ .Values.ingress.className }} From 5b327f4d05ec56eb73f94c405d48063dc435af84 Mon Sep 17 00:00:00 2001 From: Dylan Jay Date: Mon, 10 Jun 2024 18:22:32 +0700 Subject: [PATCH 2/2] fix regex bug in api ingress --- plone6-volto-zeo/templates/api-ingress.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plone6-volto-zeo/templates/api-ingress.yaml b/plone6-volto-zeo/templates/api-ingress.yaml index 07a37c0..8533d8f 100644 --- a/plone6-volto-zeo/templates/api-ingress.yaml +++ b/plone6-volto-zeo/templates/api-ingress.yaml @@ -50,7 +50,7 @@ spec: - host: {{ $hostName }} http: paths: - - path: /\+\+api\+\+($|/.*) + - path: /\+\+api\+\+($|/)(.*) {{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }} pathType: ImplementationSpecific {{- end }}