Skip to content

Commit

Permalink
Merge pull request #3801 from uselagoon/keycloak-admin-url
Browse files Browse the repository at this point in the history
change: set keycloak frontend url in api for well-known discovery
  • Loading branch information
tobybellwood authored Sep 10, 2024
2 parents 8faeb51 + ddc705a commit 8ebce41
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ STERN_VERSION = v2.6.1
CHART_TESTING_VERSION = v3.11.0
K3D_IMAGE = docker.io/rancher/k3s:v1.30.1-k3s1
TESTS = [nginx,api,features-kubernetes,bulk-deployment,features-kubernetes-2,features-variables,active-standby-kubernetes,tasks,drush,python,gitlab,github,bitbucket,services,workflows]
CHARTS_TREEISH = main
CHARTS_TREEISH = lagoon_v221
TASK_IMAGES = task-activestandby

# the name of the docker network to create
Expand Down
3 changes: 1 addition & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ services:
volumes:
- ./services/api/src:/app/services/api/src
environment:
- KEYCLOAK_URL=http://172.17.0.1:8088
- NODE_ENV=development
- CONSOLE_LOGGING_LEVEL=trace
depends_on:
Expand All @@ -103,7 +102,7 @@ services:
- ./node-packages:/app/node-packages:delegated
- /app/node-packages/commons/dist
environment:
- KEYCLOAK_URL=http://172.17.0.1:8088
- KEYCLOAK_FRONTEND_URL=http://localhost:8088/
- NODE_ENV=development
- OPENSEARCH_INTEGRATION_ENABLED=false
- DISABLE_CORE_HARBOR=true
Expand Down
2 changes: 1 addition & 1 deletion services/api/src/routes/well-known.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { envHasConfig, getConfigFromEnv } from '../util/config';
const wellKnown = (req: Request, res: Response) => {
let discoverData = {
lagoon_version: getConfigFromEnv('LAGOON_VERSION',''),
authorization_endpoint: getConfigFromEnv('KEYCLOAK_URL', ''),
authorization_endpoint: getConfigFromEnv('KEYCLOAK_FRONTEND_URL', ''),
ssh_token_exchange: {
token_endpoint_host: getConfigFromEnv('SSH_TOKEN_ENDPOINT', ''),
token_endpoint_port: parseInt(getConfigFromEnv('SSH_TOKEN_ENDPOINT_PORT', '22'), 10)
Expand Down
2 changes: 0 additions & 2 deletions services/keycloak/entrypoints/default-keycloak-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ export KC_HOSTNAME_STRICT_HTTPS=${KC_HOSTNAME_STRICT_HTTPS:-false}
export KC_HTTP_RELATIVE_PATH=${KC_HTTP_RELATIVE_PATH:-/auth}
export KC_HOSTNAME_URL=${KEYCLOAK_FRONTEND_URL}

# this may need to be changed to an optional override and only set for k3d testing so that it allows access to
# the admin page in a k3d deployed environment locally
export KC_HOSTNAME_ADMIN_URL=${KEYCLOAK_FRONTEND_URL}

export KC_DB_POOL_MAX_SIZE=${KEYCLOAK_DS_MAX_POOL_SIZE:-20}
Expand Down

0 comments on commit 8ebce41

Please sign in to comment.