From 2236191e2c9751b6859cc75a6c19f3bb14c7e7b1 Mon Sep 17 00:00:00 2001 From: SOUVIK GHOSH Date: Sun, 4 Feb 2024 18:56:03 +0100 Subject: [PATCH 1/2] ref: add extra paths in ingress --- charts/rasa-x/templates/ingress.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/charts/rasa-x/templates/ingress.yaml b/charts/rasa-x/templates/ingress.yaml index 237a6f19..3458e6eb 100644 --- a/charts/rasa-x/templates/ingress.yaml +++ b/charts/rasa-x/templates/ingress.yaml @@ -59,5 +59,23 @@ spec: servicePort: {{ $svcPort }} {{- end }} {{- end }} + {{- if .extraPaths }} + {{- range .extraPaths }} + - path: {{ .path }} + {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} + pathType: {{ .pathType }} + {{- end }} + backend: + {{- if semverCompare ">1.19-0" $.Capabilities.KubeVersion.GitVersion }} + service: + name: {{ .serviceName }} + port: + number: {{ .serviceName }} + {{- else }} + serviceName: {{ .serviceName }} + servicePort: {{ .servicePort }} + {{- end }} + {{- end }} + {{- end }} {{- end }} {{- end }} From 35b17c4523c09fe31fcc2f1b3695595fa1f1fb57 Mon Sep 17 00:00:00 2001 From: souvik ghosh Date: Mon, 5 Feb 2024 23:23:59 +0100 Subject: [PATCH 2/2] ref: add ingress in open-source --- charts/rasa-x/templates/ingress.yaml | 18 ------------------ .../rasa-open-source-api-ingress.yaml | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/charts/rasa-x/templates/ingress.yaml b/charts/rasa-x/templates/ingress.yaml index 3458e6eb..237a6f19 100644 --- a/charts/rasa-x/templates/ingress.yaml +++ b/charts/rasa-x/templates/ingress.yaml @@ -59,23 +59,5 @@ spec: servicePort: {{ $svcPort }} {{- end }} {{- end }} - {{- if .extraPaths }} - {{- range .extraPaths }} - - path: {{ .path }} - {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} - pathType: {{ .pathType }} - {{- end }} - backend: - {{- if semverCompare ">1.19-0" $.Capabilities.KubeVersion.GitVersion }} - service: - name: {{ .serviceName }} - port: - number: {{ .serviceName }} - {{- else }} - serviceName: {{ .serviceName }} - servicePort: {{ .servicePort }} - {{- end }} - {{- end }} - {{- end }} {{- end }} {{- end }} diff --git a/charts/rasa-x/templates/rasa-open-source-api-ingress.yaml b/charts/rasa-x/templates/rasa-open-source-api-ingress.yaml index 52bcc33a..ecc7edb4 100644 --- a/charts/rasa-x/templates/rasa-open-source-api-ingress.yaml +++ b/charts/rasa-x/templates/rasa-open-source-api-ingress.yaml @@ -57,6 +57,17 @@ spec: path: /core {{ end -}} pathType: Prefix + {{- if .extraPaths }} + {{- range .extraPaths }} + - backend: + service: + name: {{ .serviceName }} + port: + number: {{ .servicePort }} + path: {{ .path }} + pathType: {{ .pathType }} + {{- end }} + {{- end }} {{- end }} {{- else -}} {{- range .Values.ingress.hosts }} @@ -71,6 +82,14 @@ spec: {{ else -}} path: /core {{ end -}} + {{- if .extraPaths }} + {{- range .extraPaths }} + - backend: + serviceName: {{ .serviceName }} + servicePort: {{ .servicePort }} + path: {{ .path }} + {{- end }} + {{- end }} {{- end }} {{- end }} {{- end }}