Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change: set keycloak frontend url in api for well-known discovery #3801

Merged
merged 3 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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