-
Notifications
You must be signed in to change notification settings - Fork 174
[MOSIP-44060] Updated keycloak install.sh script. #1692
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
Conversation
WalkthroughAdds pre-install host-validation and interactive prompts to the IAM install script and switches several external component install scripts (IAM/Keycloak, Kafka, MinIO, Postgres) to use mosip chart repositories and explicit image repository/tag overrides in their Helm install commands. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✨ Finishing touches
📜 Recent review detailsConfiguration used: Repository UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
🧰 Additional context used🧠 Learnings (4)📓 Common learnings📚 Learning: 2025-12-02T10:21:36.913ZApplied to files:
📚 Learning: 2025-12-02T10:31:57.899ZApplied to files:
📚 Learning: 2025-12-24T08:51:06.643ZApplied to files:
🔇 Additional comments (6)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
deployment/v3/external/iam/install.sh (1)
143-148: Error handling is applied after the validation block.The error-handling directives (
set -e,set -o errexit, etc.) at lines 143–147 are applied AFTER the validation block (lines 12–113). This means errors during validation (e.g., failed file I/O, grep failures) will not trigger the intended early exit behavior. Move these directives to the top of the script.#!/bin/bash ## Point config to your cluster on which you are installing IAM. ## "Usage: ./install.sh [kube_config_file]" + # set commands for error handling. + set -e + set -o errexit + set -o nounset + set -o errtrace + set -o pipefail + if [ $# -ge 1 ]; then export KUBECONFIG=$1 fi ... - # set commands for error handling. - set -e - set -o errexit - set -o nounset - set -o errtrace - set -o pipefail
🧹 Nitpick comments (2)
deployment/v3/external/iam/install.sh (2)
21-21: DRY violation: Host extraction logic is duplicated.The same host extraction logic appears at lines 21 and 59. Extract this into a function to improve maintainability and reduce the risk of inconsistency.
get_current_host() { grep -A1 "host:" istio-addons-values.yaml | grep -v "serviceHost" | head -1 | cut -d: -f2 | tr -d ' ' } # Then use: current_host=$(get_current_host) # And at line 59: current_host=$(get_current_host)Also applies to: 59-59
43-43: Domain validation is minimal; consider adding format checks.The domain validation at line 43 only checks for non-empty input and inequality with the default placeholder. Consider adding format validation (e.g., must contain a dot, valid characters) to prevent invalid configurations from proceeding.
if [[ -n "$new_host" && "$new_host" != "iam.sandbox.xyz.net" ]] && [[ "$new_host" =~ \. ]]; then # Valid domain name else echo "Invalid domain name. Please provide a valid domain (e.g., iam.yourdomain.com)." fi
Signed-off-by: Mohan E <mohanraj1715@gmail.com> Signed-off-by: Mohanraj209 <mohan1715@gmail.com>
Signed-off-by: Mohan E <mohanraj1715@gmail.com> Signed-off-by: Mohanraj209 <mohan1715@gmail.com>
Signed-off-by: Mohan E <mohanraj1715@gmail.com> Signed-off-by: Mohanraj209 <mohan1715@gmail.com>
Signed-off-by: Mohan E <mohanraj1715@gmail.com> Signed-off-by: Mohanraj209 <mohan1715@gmail.com>
Signed-off-by: Mohan E <mohanraj1715@gmail.com> Signed-off-by: Mohanraj209 <mohan1715@gmail.com>
Signed-off-by: Mohan E <mohanraj1715@gmail.com> Signed-off-by: Mohanraj209 <mohan1715@gmail.com>
…, and Postgres with new image repositories and tags Signed-off-by: ivan <ivan.anil016@gmail.com> Signed-off-by: Mohanraj209 <mohan1715@gmail.com>
Signed-off-by: Ivanmeneges <ivan.anil016@gmail.com> Signed-off-by: Mohanraj209 <mohan1715@gmail.com>
Signed-off-by: Mohanraj209 <mohan1715@gmail.com>
Signed-off-by: Mohanraj209 <mohan1715@gmail.com>
Summary by CodeRabbit
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.