From 33431fa42a64c3e807f999b1eb5a504c0b674720 Mon Sep 17 00:00:00 2001 From: Pim van Nierop Date: Tue, 23 Jul 2024 08:01:28 +0200 Subject: [PATCH] Allow config of http URLs in app-config-frontend --- charts/app-config-frontend/Chart.yaml | 2 +- charts/app-config-frontend/README.md | 7 ++++--- charts/app-config-frontend/templates/deployment.yaml | 4 ++-- charts/app-config-frontend/values.yaml | 10 ++++++---- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/charts/app-config-frontend/Chart.yaml b/charts/app-config-frontend/Chart.yaml index c6c8bc96..14a91186 100644 --- a/charts/app-config-frontend/Chart.yaml +++ b/charts/app-config-frontend/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.1.1 +version: 2.0.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/app-config-frontend/README.md b/charts/app-config-frontend/README.md index 0f449cf2..f43c65b8 100644 --- a/charts/app-config-frontend/README.md +++ b/charts/app-config-frontend/README.md @@ -3,7 +3,7 @@ # app-config-frontend [![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/app-config-frontend)](https://artifacthub.io/packages/helm/radar-base/app-config-frontend) -![Version: 1.1.1](https://img.shields.io/badge/Version-1.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.5.0](https://img.shields.io/badge/AppVersion-0.5.0-informational?style=flat-square) +![Version: 2.0.0](https://img.shields.io/badge/Version-2.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.5.0](https://img.shields.io/badge/AppVersion-0.5.0-informational?style=flat-square) A Helm chart for the frontend application of RADAR-base application config (app-config). @@ -71,6 +71,7 @@ A Helm chart for the frontend application of RADAR-base application config (app- | readinessProbe.successThreshold | int | `1` | Success threshold for readinessProbe | | readinessProbe.failureThreshold | int | `3` | Failure threshold for readinessProbe | | networkpolicy | object | check `values.yaml` | Network policy defines who can access this application and who this applications has access to | -| authUrl | string | `"http://localhost/managementportal/oauth"` | Authorization URL of the IDP | -| authCallbackUrl | string | `"http://localhost/appconfig/login"` | Callback URL to where authorization-code should be returned | +| serverName | string | `"localhost"` | Resolvable server name, needed to find the advertised URL and callback URL | +| authUrl | string | `nil` | Authorization URL of the IDP; needed when deviating from https://serverName/managementportal/oauth | +| authCallbackUrl | string | `nil` | Callback URL to where authorization-code should be returned; needed when deviating from https://serverName/appconfig/login | | backendUrl | string | `"/appconfig/api"` | Base-URL of the App Config backend service | diff --git a/charts/app-config-frontend/templates/deployment.yaml b/charts/app-config-frontend/templates/deployment.yaml index 940bc6c5..beefcb76 100644 --- a/charts/app-config-frontend/templates/deployment.yaml +++ b/charts/app-config-frontend/templates/deployment.yaml @@ -50,9 +50,9 @@ spec: - name: BASE_HREF value: /appconfig/ - name: AUTH_URL - value: {{ .Values.authUrl }} + value: {{ default (printf "https://%s/managementportal/oauth" .Values.serverName) .Values.authUrl }} - name: AUTH_CALLBACK_URL - value: {{ .Values.authCallbackUrl }} + value: {{ default (printf "https://%s/appconfig/login" .Values.serverName) .Values.authCallbackUrl }} - name: APP_CONFIG_URL value: {{ .Values.backendUrl }} {{- with .Values.extraEnvVars }} diff --git a/charts/app-config-frontend/values.yaml b/charts/app-config-frontend/values.yaml index b58a0023..2de6422c 100644 --- a/charts/app-config-frontend/values.yaml +++ b/charts/app-config-frontend/values.yaml @@ -155,9 +155,11 @@ networkpolicy: - port: 53 protocol: TCP -# -- Authorization URL of the IDP -authUrl: http://localhost/managementportal/oauth -# -- Callback URL to where authorization-code should be returned -authCallbackUrl: http://localhost/appconfig/login +# -- Resolvable server name, needed to find the advertised URL and callback URL +serverName: localhost +# -- Authorization URL of the IDP; needed when deviating from https://serverName/managementportal/oauth +authUrl: +# -- Callback URL to where authorization-code should be returned; needed when deviating from https://serverName/appconfig/login +authCallbackUrl: # -- Base-URL of the App Config backend service backendUrl: /appconfig/api