From b8a948aca0ec0457254c97e4e0f665b6be4c54b1 Mon Sep 17 00:00:00 2001 From: Nicola Molinari Date: Thu, 9 Nov 2023 16:24:18 +0100 Subject: [PATCH 1/3] fix(kratos-selfservice-ui): to correctly configure BASE_PATH --- helm/charts/kratos-selfservice-ui-node/README.md | 2 +- .../kratos-selfservice-ui-node/templates/deployment.yaml | 8 ++++---- helm/charts/kratos-selfservice-ui-node/values.yaml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/helm/charts/kratos-selfservice-ui-node/README.md b/helm/charts/kratos-selfservice-ui-node/README.md index 98837a98a0..27503039ce 100644 --- a/helm/charts/kratos-selfservice-ui-node/README.md +++ b/helm/charts/kratos-selfservice-ui-node/README.md @@ -9,7 +9,7 @@ A Helm chart for ORY Kratos's example ui for Kubernetes | Key | Type | Default | Description | |-----|------|---------|-------------| | affinity | object | `{}` | | -| baseUrl | string | `""` | The baseUrl | +| basePath | string | `""` | The basePath | | deployment | object | `{"annotations":{},"automountServiceAccountToken":false,"dnsConfig":{},"extraEnv":[],"extraVolumeMounts":[],"extraVolumes":[],"labels":{},"nodeSelector":{},"resources":{},"tolerations":[],"topologySpreadConstraints":[]}` | Deployment configuration | | deployment.dnsConfig | object | `{}` | Configure pod dnsConfig. | | deployment.extraEnv | list | `[]` | Array of extra envs to be passed to the deployment. Kubernetes format is expected - name: FOO value: BAR | diff --git a/helm/charts/kratos-selfservice-ui-node/templates/deployment.yaml b/helm/charts/kratos-selfservice-ui-node/templates/deployment.yaml index 7a00e3dbd4..7983f9b1c2 100644 --- a/helm/charts/kratos-selfservice-ui-node/templates/deployment.yaml +++ b/helm/charts/kratos-selfservice-ui-node/templates/deployment.yaml @@ -53,8 +53,8 @@ spec: value: {{ .Values.kratosBrowserUrl | quote }} - name: PROJECT_NAME value: {{ .Values.projectName | quote }} - - name: BASE_URL - value: {{ .Values.baseUrl | quote }} + - name: BASE_PATH + value: {{ .Values.basePath | quote }} - name: JWKS_URL value: {{ .Values.jwksUrl | quote }} - name: KRATOS_ADMIN_URL @@ -74,11 +74,11 @@ spec: protocol: TCP livenessProbe: httpGet: - path: /health/alive + path: {{ .Values.basePath }}/health/alive port: http readinessProbe: httpGet: - path: /health/ready + path: {{ .Values.basePath }}/health/ready port: http resources: {{- toYaml .Values.deployment.resources | nindent 12 }} diff --git a/helm/charts/kratos-selfservice-ui-node/values.yaml b/helm/charts/kratos-selfservice-ui-node/values.yaml index 097a1d4bec..9c5ff4fa0e 100644 --- a/helm/charts/kratos-selfservice-ui-node/values.yaml +++ b/helm/charts/kratos-selfservice-ui-node/values.yaml @@ -137,8 +137,8 @@ kratosPublicUrl: "http://kratos-public" # -- Set this to ORY Kratos's public URL accessible from the outside world. kratosBrowserUrl: "http://kratos-browserui" -# -- The baseUrl -baseUrl: "" +# -- The basePath +basePath: "" # -- The jwksUrl jwksUrl: "http://oathkeeper-api" From 6bc0481fb4a309a910fbd317a5c9a9dc72c804da Mon Sep 17 00:00:00 2001 From: Nicola Molinari Date: Tue, 14 Nov 2023 07:52:33 +0100 Subject: [PATCH 2/3] ci(hacks): test basePath --- hacks/values/kratos-selfservice-ui-node.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hacks/values/kratos-selfservice-ui-node.yaml b/hacks/values/kratos-selfservice-ui-node.yaml index 893b0b13d9..3a35694dcf 100644 --- a/hacks/values/kratos-selfservice-ui-node.yaml +++ b/hacks/values/kratos-selfservice-ui-node.yaml @@ -14,6 +14,8 @@ deployment: - name: dummy mountPath: /opt/dummy/ +basePath: /auth + test: busybox: repository: docker.io/library/busybox From fd2f88843a01a58ea853c64fd4c16d085756ab83 Mon Sep 17 00:00:00 2001 From: Nicola Molinari Date: Tue, 14 Nov 2023 13:13:37 +0100 Subject: [PATCH 3/3] fix: test --- .../templates/tests/test-connection.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/charts/kratos-selfservice-ui-node/templates/tests/test-connection.yaml b/helm/charts/kratos-selfservice-ui-node/templates/tests/test-connection.yaml index 9da5adb821..b4bb60950b 100644 --- a/helm/charts/kratos-selfservice-ui-node/templates/tests/test-connection.yaml +++ b/helm/charts/kratos-selfservice-ui-node/templates/tests/test-connection.yaml @@ -14,5 +14,5 @@ spec: - name: wget image: "{{ .Values.test.busybox.repository }}:{{ .Values.test.busybox.tag }}" command: ['wget'] - args: ['{{ include "kratos-selfservice-ui-node.fullname" . }}:{{ .Values.service.port }}/health/ready'] + args: ['{{ include "kratos-selfservice-ui-node.fullname" . }}:{{ .Values.service.port }}{{ .Values.basePath }}/health/ready'] restartPolicy: Never