From 6bf734857668a69a9ab09e0b464ff9421d35846d Mon Sep 17 00:00:00 2001 From: Nick Calibey Date: Fri, 21 Jul 2023 08:28:26 -0500 Subject: [PATCH 1/2] Revert pathing changes to API Ingress PR #139 correctly fixed a pathing issue for the front-end ingress, but also made the same changes to the API server ingress in order to maintain consistency between the two. However, changing the ingress in the latter case was unnecessary and broke deployments that used specialized paths for the API server (e.g. using rewrites). This PR reverts the changes for the API server ingress and leaves the changes to the front-end ingress untouched. --- .gitignore | 1 + charts/flagsmith/Chart.yaml | 2 +- charts/flagsmith/templates/ingress-api.yaml | 6 ++++-- charts/flagsmith/values.yaml | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index efdade9..aa7d9fd 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ venv/ .vscode charts/*/charts .direnv +.idea/ diff --git a/charts/flagsmith/Chart.yaml b/charts/flagsmith/Chart.yaml index 387b9d9..946d1cb 100644 --- a/charts/flagsmith/Chart.yaml +++ b/charts/flagsmith/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: flagsmith description: Flagsmith type: application -version: 0.20.0 +version: 0.21.0 appVersion: 2.57.0 dependencies: - name: postgresql diff --git a/charts/flagsmith/templates/ingress-api.yaml b/charts/flagsmith/templates/ingress-api.yaml index 9b5788f..6a218eb 100644 --- a/charts/flagsmith/templates/ingress-api.yaml +++ b/charts/flagsmith/templates/ingress-api.yaml @@ -36,10 +36,11 @@ spec: {{- end }} rules: {{- range .Values.ingress.api.hosts }} - - host: {{ . | quote }} + - host: {{ .host | quote }} http: paths: - - path: / + {{- range .paths }} + - path: {{ . }} {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} pathType: Prefix backend: @@ -48,6 +49,7 @@ spec: port: number: {{ $svcPort }} {{- else }} + {{- end }} backend: serviceName: {{ $fullName }}-api servicePort: {{ $svcPort }} diff --git a/charts/flagsmith/values.yaml b/charts/flagsmith/values.yaml index 83bc52f..b49d514 100644 --- a/charts/flagsmith/values.yaml +++ b/charts/flagsmith/values.yaml @@ -302,7 +302,8 @@ ingress: # kubernetes.io/ingress.class: nginx # kubernetes.io/tls-acme: "true" hosts: - - chart-example.local + - host: chart-example.local + paths: [ ] tls: [] # - secretName: chart-example-tls # hosts: From c65ea7723c6fabf0216335720a19e0166fe78aaa Mon Sep 17 00:00:00 2001 From: Kim Gustyr Date: Mon, 24 Jul 2023 14:30:24 +0100 Subject: [PATCH 2/2] fix: correct ingress backend templating --- charts/flagsmith/templates/ingress-api.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/flagsmith/templates/ingress-api.yaml b/charts/flagsmith/templates/ingress-api.yaml index 6a218eb..87bcf0f 100644 --- a/charts/flagsmith/templates/ingress-api.yaml +++ b/charts/flagsmith/templates/ingress-api.yaml @@ -49,10 +49,10 @@ spec: port: number: {{ $svcPort }} {{- else }} - {{- end }} backend: serviceName: {{ $fullName }}-api servicePort: {{ $svcPort }} {{- end }} + {{- end }} {{- end }} {{- end }}