Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
fix keycloak ingress
Signed-off-by: Omri Shiv <[email protected]>
  • Loading branch information
omrishiv committed Apr 1, 2024
commit dc6ce07cb41e4e0d3e2f906b7942090f77a7875e
2 changes: 2 additions & 0 deletions packages/keycloak/dev/patches/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ spec:
secretKeyRef:
name: postgresql-config
key: POSTGRES_PASSWORD
- name: KC_HOSTNAME
value: ${KEYCLOAK_DOMAIN_NAME}
envFrom:
- secretRef:
name: keycloak-config
Expand Down
2 changes: 1 addition & 1 deletion terraform/keycloak.tf
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ resource "kubectl_manifest" "application_argocd_keycloak" {
)

provisioner "local-exec" {
command = "./install.sh '${random_password.keycloak_user_password.result}' '${random_password.keycloak_admin_password.result}'"
command = "./install.sh '${random_password.keycloak_user_password.result}' '${random_password.keycloak_admin_password.result}' '${local.kc_domain_name}'"

working_dir = "${path.module}/scripts/keycloak"
interpreter = ["/bin/bash", "-c"]
Expand Down
6 changes: 3 additions & 3 deletions terraform/templates/manifests/ingress-keycloak.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ spec:
service:
name: keycloak
port:
number: 8081
number: 8080
- path: /
pathType: Exact
pathType: Prefix
backend:
service:
name: keycloak
port:
number: 8081
number: 8080
Comment on lines +24 to +31
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are set to 8081 and exact is to make sure the Keycloak admin UI is not accessible from anywhere. E.g. you have to use port-foward to access it. I could have used a SG to block access but it's difficult when I cannot be reasonably sure where users are access accessing ingress from.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense, thank you for the clarification. The issue I was having was with the UI not rendering correctly (missing images), but also not forwarding to the admin ui even with port forwarding.

- path: /realms
pathType: Prefix
backend:
Expand Down