Skip to content

[MOSIP-44613],[MOSIP-44620],[MOSIP-44622],[MOSIP-44623],[MOSIP-44626],[MOSIP-44627],[MOSIP-44628]Updated profile based deployment with helmsman and terraform structural and workflow changes#173

Merged
bhumi46 merged 21 commits intomosip:developfrom
bhumi46:develop
Mar 24, 2026

Conversation

@bhumi46
Copy link
Copy Markdown
Member

@bhumi46 bhumi46 commented Mar 24, 2026

Summary by CodeRabbit

  • New Features

    • Profile-based deployments in CI/CD with selectable MOSIP (Java11/Java21) or standalone eSignet; profile flows into backend/state selection and deployment paths.
    • Added profile-specific deployment manifests, Helm hooks/scripts for eSignet, test-rig configurations, and Terraform AWS profiles for MOSIP and eSignet.
  • Removed

    • Default Rancher logging values/configuration file deleted.
  • Documentation

    • Added a profile-based deployment architecture diagram.

bhumi46 added 4 commits March 24, 2026 11:39
Signed-off-by: bhumi46 <thisisbn46@gmail.com>
Signed-off-by: bhumi46 <thisisbn46@gmail.com>
Signed-off-by: bhumi46 <thisisbn46@gmail.com>
Signed-off-by: bhumi46 <thisisbn46@gmail.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 24, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds profile-aware deployment: workflow inputs and detection, profile-specific Helmsman DSFs and hooks for MOSIP/eSignet, profile tfvars for Terraform, and a --profile option in the backend configurator to include profile segments in local state filenames and remote backend keys/prefixes.

Changes

Cohort / File(s) Summary
GitHub Actions workflows
.github/workflows/helmsman_esignet.yml, .github/workflows/helmsman_external.yml, .github/workflows/helmsman_mosip.yml, .github/workflows/helmsman_testrigs.yml, .github/workflows/terraform.yml, .github/workflows/terraform-destroy.yml
Added profile/INFRA_PROFILE workflow_dispatch inputs; broadened push path globs to Helmsman/dsf/**/…; detect/assign PROFILE, export to env/outputs; switch DSF/tfvars to profile-specific paths; pass profile into backend configurator; update concurrency and downstream trigger conditions.
Backend configurator script
.github/scripts/configure-backend.sh
Added --profile CLI option; updated create_local_backend(..., profile) signature; conditionally include PROFILE in local terraform state filename and in remote backend key/prefix composition for AWS S3, Azure Storage, and GCP when PROFILE is non-empty.
Helmsman DSF — eSignet profile
Helmsman/dsf/esignet/esignet-dsf.yaml, Helmsman/dsf/esignet/external-dsf.yaml
New eSignet DSF manifests defining namespaces, helm repos, and ordered apps (core eSignet, OIDC UI, optional softhsm/mock services, partner onboarders) and corresponding external infra apps/hooks.
Helmsman DSF — MOSIP profiles
Helmsman/dsf/mosip-platform-java11/prereq-dsf.yaml, Helmsman/dsf/mosip-platform-java21/...
esignet-dsf.yaml, external-dsf.yaml, mosip-dsf.yaml, prereq-dsf.yaml, testrigs-dsf.yaml
Added MOSIP Java11/Java21 profile DSFs: prereqs, external infra, full MOSIP app sets, eSignet integration, and testrigs with chart versions, values, hooks and sequencing.
eSignet hook scripts
Helmsman/hooks/esignet-1.7.1/*.sh
Added ~18 executable hook scripts (pre/post install, init, setup, postinstall checks) that create/label namespaces, copy configmaps/secrets, initialize DB/Keycloak, configure Redis/Kafka/SoftHSM/Captcha, and validate onboarding jobs.
Terraform profile vars
terraform/implementations/aws/infra/profiles/esignet/aws.tfvars, terraform/implementations/aws/infra/profiles/mosip/aws.tfvars
Added AWS tfvars for esignet and mosip infra profiles (cluster naming, sizing, networking, PostgreSQL flags, repo branches, domain/subdomains, node counts).
Removed utility
Helmsman/utils/rancher-loggig-values.yaml
Deleted previously-provided Rancher logging values file.
Documentation
docs/profile-based-deployment.drawio
Added Draw.io diagram illustrating profile-based deployment flows, DSF layout, and terraform state/profile separation.

Sequence Diagram(s)

sequenceDiagram
    participant GH as GitHub Actions
    participant WF as Workflow Steps
    participant CFG as configure-backend.sh
    participant TF as Terraform
    participant S3 as Remote Backend (S3/Azure/GCS)
    participant HEL as Helmsman

    GH->>WF: trigger (push or workflow_dispatch) with/without profile
    WF->>WF: detect/assign PROFILE, set GITHUB_ENV / outputs
    WF->>CFG: exec configure-backend.sh --profile $PROFILE ...
    CFG->>CFG: compute local state filename (include PROFILE if set)
    CFG->>S3: generate backend key/prefix (include PROFILE when non-empty)
    WF->>TF: terraform plan/apply -var-file="$TFVARS_FILE" (profile-aware)
    TF->>S3: read/write remote state using backend key/prefix
    WF->>HEL: run Helmsman using DSF at dsf/$PROFILE/...
    HEL-->>WF: deployment status
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Poem

🐇
I nibble profiles, small and neat,
workflows hop and states retreat,
hooks stitch secrets, tfvars align,
keys and prefixes trace the line,
deployments spring — a carrot sign!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title comprehensively describes the main changes: multiple Jira issues related to updating profile-based deployment with Helmsman and Terraform workflow changes.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

bhumi46 added 2 commits March 24, 2026 12:36
Signed-off-by: bhumi46 <111699703+bhumi46@users.noreply.github.com>
Signed-off-by: bhumi46 <111699703+bhumi46@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 13

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/helmsman_external.yml (1)

262-279: ⚠️ Potential issue | 🟠 Major

Pass the profile input to the downstream workflow dispatch call.

The workflow-caller condition correctly gates the MOSIP trigger to workflow_dispatch events with mosip-platform-* profiles. However, the helmsman_mosip.yml workflow does accept a profile input (required, with default mosip-platform-java11), but the API dispatch call only passes mode. This means the profile selection at the trigger point is ignored, and the downstream workflow always uses its default profile.

To preserve the profile intent, the curl payload should include the profile input:

{"ref":"<BRANCH>","inputs":{"mode":"apply","profile":"<PROFILE>"}}

Alternatively, verify that always using the default profile is the intended behavior.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/helmsman_external.yml around lines 262 - 279, The dispatch
payload for the workflow-caller step currently only sends "mode" so the
downstream helmsman_mosip.yml never receives the triggering profile; update the
curl -d payload in the "Trigger helmsman mosip workflow via API" step to include
the profile input (use the workflow's profile value, e.g.
github.event.inputs.profile or pass it into an env like PROFILE) alongside
BRANCH and mode so the JSON becomes
{"ref":"<BRANCH>","inputs":{"mode":"apply","profile":"<PROFILE>"}} and
helmsman_mosip.yml will receive the intended profile.
🧹 Nitpick comments (16)
Helmsman/hooks/esignet-1.7.1/redis-setup.sh (2)

14-15: Inconsistent namespace variable handling.

ESIGNET_NS allows environment variable override while REDIS_NS is hardcoded. For consistency with the pattern used for ESIGNET_NS, consider making REDIS_NS configurable.

♻️ Proposed fix
 ESIGNET_NS="${ESIGNET_NS:-esignet}"
-REDIS_NS="redis"
+REDIS_NS="${REDIS_NS:-redis}"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Helmsman/hooks/esignet-1.7.1/redis-setup.sh` around lines 14 - 15, The script
inconsistently hardcodes REDIS_NS while ESIGNET_NS supports env overrides;
change REDIS_NS to be configurable by defining it with a default value (e.g.,
set REDIS_NS using the pattern used for ESIGNET_NS) so consumers can override
the namespace via environment variable, and update any references to REDIS_NS in
this file (and related functions/commands) to rely on that variable.

21-23: Redis wait failure will abort the script.

Unlike other hooks in this PR that use || echo "WARNING:..." to continue on readiness wait failure, this script will exit on wait timeout due to set -e. If this is intentional (Redis must be ready before proceeding), this is fine. Otherwise, consider adding a warning fallback for consistency.

🔧 Optional: Add warning fallback for consistency
 # --- Step 1: Wait for Redis to be ready ---
 echo "Waiting for Redis pods to be ready..."
-kubectl -n "$REDIS_NS" wait --for=condition=ready pod -l app.kubernetes.io/name=redis --timeout=300s
+kubectl -n "$REDIS_NS" wait --for=condition=ready pod -l app.kubernetes.io/name=redis --timeout=300s || \
+  echo "WARNING: Redis pods not ready yet. Continuing with setup."
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Helmsman/hooks/esignet-1.7.1/redis-setup.sh` around lines 21 - 23, The
kubectl readiness wait in redis-setup.sh (the kubectl -n "$REDIS_NS" wait
--for=condition=ready pod -l app.kubernetes.io/name=redis --timeout=300s
command) will cause the script to abort on timeout because of set -e; to make
behavior consistent with other hooks, catch the nonzero exit and log a warning
instead of exiting by appending a fallback that prints a clear WARNING (e.g.,
indicating Redis wait timed out and the script is continuing) so the script
continues on readiness failure; update the kubectl wait invocation to handle
failure and emit the warning.
Helmsman/hooks/esignet-1.7.1/postgres-preinstall.sh (1)

36-47: Consider parameterizing the hardcoded version.

The mosip-version: "1.7.1" is hardcoded. If future versions of this hook are created (e.g., esignet-1.8.0/), this value would need manual updates. Consider extracting it to an environment variable.

♻️ Proposed enhancement
 ESIGNET_NS="${ESIGNET_NS:-esignet}"
 INSTALLATION_DOMAIN="${INSTALLATION_DOMAIN:-sandbox.xyz.net}"
+ESIGNET_VERSION="${ESIGNET_VERSION:-1.7.1}"
 
 ...
 
 data:
-  mosip-version: "1.7.1"
+  mosip-version: "${ESIGNET_VERSION}"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Helmsman/hooks/esignet-1.7.1/postgres-preinstall.sh` around lines 36 - 47,
The data YAML in the heredoc currently hardcodes mosip-version: "1.7.1"; change
it to read from an environment/template variable (e.g., ${MOSIP_VERSION} or a
Helm value) so the hook can be reused for future releases; update the heredoc
generation in postgres-preinstall.sh to inject that variable and ensure any
callers/exporters set MOSIP_VERSION (or the corresponding Helm value) before
invoking the script, and validate fallback behavior if the variable is unset.
Helmsman/hooks/esignet-1.7.1/esignet-partner-onboarder-postinstall.sh (1)

13-21: Hardcoded namespace is inconsistent with other hooks in this PR.

Other hooks in this PR (e.g., kafka-postinstall.sh, redis-setup.sh, softhsm-esignet-postinstall.sh) use ESIGNET_NS="${ESIGNET_NS:-esignet}" for namespace configurability. This script hardcodes esignet directly.

♻️ Proposed fix for consistency
 set -euo pipefail
 
+ESIGNET_NS="${ESIGNET_NS:-esignet}"
+
 echo "================================================"
 echo "eSignet 1.7.1 - Partner Onboarder Post-install"
 echo "================================================"
 
 # Check onboarding job status
-JOB_STATUS=$(kubectl -n esignet get jobs -l app.kubernetes.io/instance=esignet-resident-oidc-partner-onboarder -o jsonpath='{.items[0].status.succeeded}' 2>/dev/null || echo "")
+JOB_STATUS=$(kubectl -n "$ESIGNET_NS" get jobs -l app.kubernetes.io/instance=esignet-resident-oidc-partner-onboarder -o jsonpath='{.items[0].status.succeeded}' 2>/dev/null || echo "")
 
 if [ "$JOB_STATUS" = "1" ]; then
   echo "Partner onboarding completed successfully."
 else
   echo "WARNING: Partner onboarding job may not have completed. Check logs."
-  kubectl -n esignet logs -l app.kubernetes.io/instance=esignet-resident-oidc-partner-onboarder --tail=20 2>/dev/null || true
+  kubectl -n "$ESIGNET_NS" logs -l app.kubernetes.io/instance=esignet-resident-oidc-partner-onboarder --tail=20 2>/dev/null || true
 fi
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Helmsman/hooks/esignet-1.7.1/esignet-partner-onboarder-postinstall.sh` around
lines 13 - 21, This script hardcodes the namespace "esignet" causing
inconsistency; add the same namespace fallback used elsewhere by defining
ESIGNET_NS="${ESIGNET_NS:-esignet}" near the top and replace the hardcoded -n
esignet occurrences used by JOB_STATUS assignment and the kubectl logs
invocation with -n "$ESIGNET_NS" (ensure the JOB_STATUS variable and both
kubectl commands reference the new ESIGNET_NS variable).
Helmsman/hooks/esignet-1.7.1/softhsm-esignet-postinstall.sh (1)

30-38: The sed namespace substitution may be fragile.

The pattern s/namespace: $SOFTHSM_NS/namespace: $ESIGNET_NS/g performs a global string replacement that could inadvertently modify data fields if the namespace name appears in the ConfigMap's data. While this is a common pattern for simple K8s resources, consider using a more precise approach for robustness.

🔧 Alternative using yq for precise metadata manipulation
 if kubectl -n "$SOFTHSM_NS" get configmap esignet-softhsm-share &>/dev/null; then
   kubectl -n "$SOFTHSM_NS" get configmap esignet-softhsm-share -o yaml | \
-    sed "s/namespace: $SOFTHSM_NS/namespace: $ESIGNET_NS/g" | \
+    yq eval ".metadata.namespace = \"$ESIGNET_NS\" | del(.metadata.resourceVersion, .metadata.uid, .metadata.creationTimestamp)" | \
     kubectl apply -f -

Note: This requires yq to be available in the execution environment.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Helmsman/hooks/esignet-1.7.1/softhsm-esignet-postinstall.sh` around lines 30
- 38, The sed-based replacement in the block that copies the
esignet-softhsm-share ConfigMap is unsafe because it may alter occurrences of
the source namespace inside data fields; instead extract the resource and change
only metadata.namespace before applying: fetch the ConfigMap (kubectl -n
"$SOFTHSM_NS" get configmap esignet-softhsm-share), update .metadata.namespace
to "$ESIGNET_NS" using a tool that targets metadata (e.g., yq with an expression
that sets metadata.namespace, or kubectl get -o json | jq '.metadata.namespace =
env.ESIGNET_NS'), then apply the transformed manifest with kubectl apply -f -;
update the code that currently pipes through sed to use this targeted metadata
modification so only the namespace field is changed (reference symbols:
SOFTHSM_NS, ESIGNET_NS, esignet-softhsm-share, kubectl apply).
Helmsman/hooks/esignet-1.7.1/kafka-postinstall.sh (1)

21-26: Consider adding Kafka readiness verification before creating the ConfigMap.

Unlike other post-install hooks in this PR (e.g., redis-setup.sh), this script creates the ConfigMap immediately without verifying Kafka pods are ready. If this hook runs before Kafka is fully operational, downstream consumers of this ConfigMap may fail.

🔧 Proposed fix to add Kafka readiness wait
 echo "================================================"
 echo "eSignet 1.7.1 - Kafka Post-install"
 echo "================================================"
 
+# --- Wait for Kafka to be ready ---
+echo "Waiting for Kafka pods to be ready..."
+kubectl -n kafka wait --for=condition=ready pod -l app.kubernetes.io/name=kafka --timeout=300s || \
+  echo "WARNING: Kafka pods not ready yet. Continuing with configmap creation."
+
 # --- Create kafka-config configmap in esignet namespace ---
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Helmsman/hooks/esignet-1.7.1/kafka-postinstall.sh` around lines 21 - 26, Add
a Kafka readiness wait before creating the ConfigMap in kafka-postinstall.sh:
before the kubectl create configmap line, poll or use kubectl wait to ensure
Kafka pods are ready (e.g., kubectl wait --for=condition=ready pod -l app=kafka
-n "$ESIGNET_NS" --timeout=2m) or loop checking pod status in namespace
"$ESIGNET_NS" using the label that identifies your Kafka deployment; log
progress, fail the script (exit 1) if pods do not become ready within a
reasonable timeout, and only then run the existing kubectl create/apply that
uses KAFKA_URL to build the kafka-config ConfigMap.
Helmsman/hooks/esignet-1.7.1/esignet-partner-onboarder-preinstall.sh (1)

13-25: Hardcoded namespaces are inconsistent with other hooks.

This script uses hardcoded esignet and keycloak namespaces. For consistency with other hooks in this PR that support environment variable overrides (e.g., ESIGNET_NS), consider parameterizing these namespaces.

♻️ Proposed fix
 set -euo pipefail
 
+ESIGNET_NS="${ESIGNET_NS:-esignet}"
+KEYCLOAK_NS="${KEYCLOAK_NS:-keycloak}"
+
 echo "================================================"
 echo "eSignet 1.7.1 - Partner Onboarder Pre-install"
 echo "================================================"
 
 # Ensure esignet namespace exists
-kubectl create namespace esignet --dry-run=client -o yaml | kubectl apply -f -
+kubectl create namespace "$ESIGNET_NS" --dry-run=client -o yaml | kubectl apply -f -
 
 # Verify eSignet service is running
-kubectl -n esignet wait --for=condition=ready pod -l app.kubernetes.io/name=esignet --timeout=300s 2>/dev/null || \
+kubectl -n "$ESIGNET_NS" wait --for=condition=ready pod -l app.kubernetes.io/name=esignet --timeout=300s 2>/dev/null || \
   echo "WARNING: eSignet pods not ready. Partner onboarding may fail."
 
 # Verify Keycloak is accessible
-if kubectl -n keycloak get svc keycloak &>/dev/null; then
+if kubectl -n "$KEYCLOAK_NS" get svc keycloak &>/dev/null; then
   echo "Keycloak service found."
 else
   echo "WARNING: Keycloak service not found. Partner onboarding requires Keycloak."
 fi
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Helmsman/hooks/esignet-1.7.1/esignet-partner-onboarder-preinstall.sh` around
lines 13 - 25, The script currently hardcodes the namespaces "esignet" and
"keycloak"; make them configurable by introducing environment variables
ESIGNET_NS and KEYCLOAK_NS with defaults (e.g.,
ESIGNET_NS=${ESIGNET_NS:-esignet}, KEYCLOAK_NS=${KEYCLOAK_NS:-keycloak}) at the
top of the script, then replace all occurrences of the literal namespaces in the
kubectl invocations (the kubectl create namespace line, the kubectl -n ... wait
command that uses app.kubernetes.io/name=esignet, and the kubectl -n keycloak
get svc keycloak check) to use the variables ($ESIGNET_NS and $KEYCLOAK_NS) so
the hook supports overrides while preserving current defaults.
.github/workflows/helmsman_mosip.yml (1)

74-86: Shell variables need quoting; profile echo occurs before export.

Same issues as helmsman_testrigs.yml:

  1. Line 80: Git SHAs should be quoted to prevent potential word splitting.
  2. Line 85: $PROFILE is echoed unconditionally but only set in the else branch at the shell level.
Proposed fix
       - name: Set Profile
         run: |
           if [ -n "${{ github.event.inputs.profile }}" ]; then
+            PROFILE="${{ github.event.inputs.profile }}"
             echo "PROFILE=${{ github.event.inputs.profile }}" >> $GITHUB_ENV
           else
             # Auto-detect profile from push trigger — extract profile dir name from changed files
-            CHANGED_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} -- 'Helmsman/dsf/' 2>/dev/null || echo "")
+            CHANGED_FILES=$(git diff --name-only "${{ github.event.before }}" "${{ github.sha }}" -- 'Helmsman/dsf/' 2>/dev/null || echo "")
             PROFILE=$(echo "$CHANGED_FILES" | grep 'mosip-dsf.yaml' | head -1 | sed 's|Helmsman/dsf/\([^/]*\)/.*|\1|')
             PROFILE=${PROFILE:-mosip-platform-java11}
             echo "PROFILE=$PROFILE" >> $GITHUB_ENV
           fi
           echo "Using profile: $PROFILE"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/helmsman_mosip.yml around lines 74 - 86, The script
mis-handles shell quoting and prints PROFILE before it's guaranteed exported;
fix the git diff invocation to quote the SHAs (use "${{ github.event.before }}"
and "${{ github.sha }}" in the git diff command), quote variable expansions (use
"$CHANGED_FILES" when piping/grepping and "$PROFILE" when writing to GITHUB_ENV
and echoing), and move the echo "Using profile: $PROFILE" to after the PROFILE
is determined and exported to GITHUB_ENV (ensure PROFILE is set in both branches
and then echo "$PROFILE").
Helmsman/hooks/esignet-1.7.1/esignet-preinstall.sh (1)

9-13: Documented environment variables are not used.

The header comments mention ENABLE_INSECURE and SERVICE_MONITOR_FLAG environment variables, but these are not used anywhere in the script. Consider removing them from the documentation or implementing their intended functionality.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Helmsman/hooks/esignet-1.7.1/esignet-preinstall.sh` around lines 9 - 13, The
header documents ESIGNET_NS, ENABLE_INSECURE and SERVICE_MONITOR_FLAG but only
ESIGNET_NS is actually referenced; either remove ENABLE_INSECURE and
SERVICE_MONITOR_FLAG from the comment block or implement their behavior: add
logic in the script to read ENABLE_INSECURE (e.g., default false) to toggle
insecure SSL handling where TLS/curl/helm calls occur, and read
SERVICE_MONITOR_FLAG to enable/disable Prometheus service monitor creation;
update any usage of ESIGNET_NS, ENABLE_INSECURE, and SERVICE_MONITOR_FLAG in
functions or conditional blocks so the documented vars are actually consumed or
remove them from the header to keep docs accurate.
Helmsman/hooks/esignet-1.7.1/captcha-postinstall.sh (1)

33-38: Namespace substitution via sed may be fragile.

The sed replacement on line 37 replaces all occurrences of namespace: $ESIGNET_NS in the YAML, not just the metadata.namespace field. While this works for simple secrets, it could cause issues if the namespace value appears elsewhere in the YAML (e.g., in data values or annotations).

Consider using a more targeted approach with yq or kubectl label selectors if this becomes problematic, though for basic secrets this pattern is commonly acceptable.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Helmsman/hooks/esignet-1.7.1/captcha-postinstall.sh` around lines 33 - 38,
The sed-based namespace replacement can accidentally change any occurrence of
the ESIGNET_NS string in the secret YAML; instead fetch the secret as JSON, set
only metadata.namespace, and reapply it. Replace the pipeline that uses sed (the
kubectl -n "$ESIGNET_NS" get secret esignet-captcha -o yaml | sed ... | kubectl
apply -f -) with a targeted transformation such as kubectl -n "$ESIGNET_NS" get
secret esignet-captcha -o json | jq '.metadata.namespace = env.CAPTCHA_NS' |
kubectl apply -f - (or use yq to edit .metadata.namespace) so only the
metadata.namespace field is changed while keeping CAPTCHA_NS, ESIGNET_NS and the
secret name esignet-captcha as the referenced symbols.
.github/workflows/helmsman_testrigs.yml (1)

74-86: Shell variables need quoting; profile echo occurs before export.

Two issues in the "Set Profile" step:

  1. Static analysis flags unquoted variables on line 80 that could cause issues with special characters in commit SHAs (though unlikely in practice).

  2. Line 85 echo "Using profile: $PROFILE" runs before GITHUB_ENV exports take effect - the shell variable $PROFILE is only set in the else branch but echoed unconditionally. In the if branch, $PROFILE will be empty when echoed.

Proposed fix
       - name: Set Profile
         run: |
           if [ -n "${{ github.event.inputs.profile }}" ]; then
+            PROFILE="${{ github.event.inputs.profile }}"
             echo "PROFILE=${{ github.event.inputs.profile }}" >> $GITHUB_ENV
           else
             # Auto-detect profile from push trigger — extract profile dir name from changed files
-            CHANGED_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} -- 'Helmsman/dsf/' 2>/dev/null || echo "")
+            CHANGED_FILES=$(git diff --name-only "${{ github.event.before }}" "${{ github.sha }}" -- 'Helmsman/dsf/' 2>/dev/null || echo "")
             PROFILE=$(echo "$CHANGED_FILES" | grep 'testrigs-dsf.yaml' | head -1 | sed 's|Helmsman/dsf/\([^/]*\)/.*|\1|')
             PROFILE=${PROFILE:-mosip-platform-java11}
             echo "PROFILE=$PROFILE" >> $GITHUB_ENV
           fi
           echo "Using profile: $PROFILE"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/helmsman_testrigs.yml around lines 74 - 86, Quote shell
variable expansions in the git diff invocation and elsewhere (e.g., use "${{
github.event.before }}" and "${{ github.sha }}" and quote "$CHANGED_FILES" and
"$PROFILE") and ensure PROFILE is defined in both branches before printing: in
the if branch assign PROFILE="${{ github.event.inputs.profile }}" (then export
it to GITHUB_ENV) and in the else branch keep the CHANGED_FILES/PROFILE logic
but quote expansions (e.g., CHANGED_FILES="$(git diff --name-only "${{
github.event.before }}" "${{ github.sha }}" -- 'Helmsman/dsf/' 2>/dev/null ||
echo "")", PROFILE="$(echo "$CHANGED_FILES" | ... )"), then echo "Using profile:
$PROFILE" only after PROFILE has been set and exported to GITHUB_ENV; reference
CHANGED_FILES, PROFILE, GITHUB_ENV and the git diff/echo "Using profile" lines
to locate changes.
.github/workflows/helmsman_esignet.yml (1)

106-118: Shell variable quoting issue.

Line 113 has the same unquoted Git SHA issue flagged by static analysis. The pattern is consistent across workflows.

Proposed fix
       - name: Set Profile
         run: |
           # Determine profile: from workflow input or detect from changed files on push
           if [ -n "${{ github.event.inputs.profile }}" ]; then
             PROFILE="${{ github.event.inputs.profile }}"
           else
             # Auto-detect profile from push trigger — extract profile dir name from changed files
-            CHANGED_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} -- 'Helmsman/dsf/' 2>/dev/null || echo "")
+            CHANGED_FILES=$(git diff --name-only "${{ github.event.before }}" "${{ github.sha }}" -- 'Helmsman/dsf/' 2>/dev/null || echo "")
             PROFILE=$(echo "$CHANGED_FILES" | grep 'esignet-dsf.yaml' | head -1 | sed 's|Helmsman/dsf/\([^/]*\)/.*|\1|')
             PROFILE=${PROFILE:-mosip-platform-java11}
           fi
           echo "PROFILE=$PROFILE" >> $GITHUB_ENV
           echo "📁 Using profile: $PROFILE"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/helmsman_esignet.yml around lines 106 - 118, The git diff
call uses unquoted Git SHAs which can break when values contain special
characters; update the git diff invocation in the Set Profile step to quote the
workflow-expanded SHA variables (the uses of ${{ github.event.before }} and ${{
github.sha }}) so they are passed as single arguments, and ensure any other
shell expansions related to CHANGED_FILES and PROFILE (e.g., the CHANGED_FILES
assignment and subsequent echo/grep pipeline referencing CHANGED_FILES and
PROFILE) remain properly quoted to avoid word-splitting or globbing.
Helmsman/hooks/esignet-1.7.1/esignet-init-db.sh (1)

28-30: Consider using yq for safer YAML namespace rewriting.

The sed substitution s/namespace: $POSTGRES_NS/namespace: $ESIGNET_NS/g could match unintended occurrences if the namespace string appears elsewhere in the YAML (e.g., in annotations, labels, or data fields). Using yq would provide safer, structured manipulation.

♻️ Safer alternative using yq
-kubectl -n "$POSTGRES_NS" get secret postgres-postgresql -o yaml | \
-  sed "s/namespace: $POSTGRES_NS/namespace: $ESIGNET_NS/g" | \
-  kubectl apply -f -
+kubectl -n "$POSTGRES_NS" get secret postgres-postgresql -o yaml | \
+  yq eval ".metadata.namespace = \"$ESIGNET_NS\"" - | \
+  kubectl apply -f -

Apply similar changes to lines 35-37 and 41-43.

If yq isn't available in the execution environment, the current approach should work for standard Kubernetes resources, but add a comment noting the limitation.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Helmsman/hooks/esignet-1.7.1/esignet-init-db.sh` around lines 28 - 30,
Replace the brittle sed-based namespace rewrite used in the kubectl pipeline
(the block that runs `kubectl -n "$POSTGRES_NS" get secret postgres-postgresql
-o yaml | sed "s/namespace: $POSTGRES_NS/namespace: $ESIGNET_NS/g" | kubectl
apply -f -`) with a structured yq-based edit to change the metadata.namespace
field (and repeat the same yq pattern for the other two similar blocks around
lines 35-37 and 41-43) so only the actual namespace field is modified; if yq is
not available in the runtime, add a clear comment above the sed pipelines noting
the limitation and the risk of accidental matches so future maintainers know to
prefer yq when possible.
.github/workflows/terraform-destroy.yml (1)

44-51: Consider clarifying that empty profile defaults to mosip behavior.

The INFRA_PROFILE input has required: false but default: mosip. If a user explicitly passes an empty string (edge case), the condition [ -n "${{ inputs.INFRA_PROFILE }}" ] at line 118 would be false, falling back to the non-profile path. This is likely fine, but the description could clarify this edge case behavior.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/terraform-destroy.yml around lines 44 - 51, Update the
INFRA_PROFILE input description to explicitly state that an empty string (or
omission) will result in the default behavior of "mosip" — e.g., mention that
the workflow checks the profile with the condition `[ -n "${{
inputs.INFRA_PROFILE }}" ]` and when that check is false it falls back to the
non-profile path (effectively defaulting to mosip). Reference the INFRA_PROFILE
input and the `[ -n "${{ inputs.INFRA_PROFILE }}" ]` condition so reviewers can
find and adjust the descriptive text.
docs/profile-based-deployment.md (1)

35-42: Add language specifiers to fenced code blocks for better rendering.

The markdownlint tool correctly identifies missing language specifiers. Adding them improves syntax highlighting in documentation viewers.

📝 Add language specifiers
-```
+```text
 Helmsman/dsf/
 ├── prereq-dsf.yaml

Apply similar changes to code blocks at lines 45, 118, 135, 148, and 164.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/profile-based-deployment.md` around lines 35 - 42, Several fenced code
blocks (for example the block beginning with "Helmsman/dsf/" that shows the
directory tree) are missing language specifiers; update each triple-backtick
fence to include an appropriate language tag (e.g., ```text or ```bash) so
markdown renderers and markdownlint treat them correctly. Locate the fenced
blocks that display file/directory listings (including the one starting with
"Helmsman/dsf/" and the other similar directory-tree/code blocks mentioned) and
prepend the language identifier after the opening ``` for each block, keeping
the block contents unchanged.
Helmsman/dsf/mosip-platform-java21/esignet-dsf.yaml (1)

72-76: Version placeholders need updating for Java 21 profile.

The documentation confirms this file is "identical copies of java11; need to update chart versions, image tags, and DB branches for Java 21 / MOSIP 1.3.0". The current v1.4.1 branch values are placeholders.

Consider adding a TODO comment at the top of the file to make this explicit:

# TODO: Update versions for Java 21 / MOSIP 1.3.0
# - databases.mosip_esignet.branch: "v1.7.1" (or appropriate version)
# - esignet chart version: 1.7.1
# - oidc-ui chart version: 1.7.1
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Helmsman/dsf/mosip-platform-java21/esignet-dsf.yaml` around lines 72 - 76,
Add a TODO at the top of this Java 21 profile YAML noting that versions need
updating for Java 21 / MOSIP 1.3.0 and replace placeholder branch/version
values: update databases.mosip_esignet.branch (currently "v1.4.1") to the
correct MOSIP branch (e.g., "v1.7.1" or the approved version), and ensure the
esignet chart version and oidc-ui chart version are set to the matching 1.7.1
(or agreed) values; reference the symbols databases.mosip_esignet.branch,
esignet chart version, and oidc-ui chart version when making these changes so
the intent is explicit.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/scripts/configure-backend.sh:
- Around line 147-158: The script incorrectly overwrites profile by redeclaring
"local profile" with $3 (which is the branch) after initially setting "local
profile=$4"; to fix, assign positional args explicitly and only once: set "local
branch=${3}" (or "local branch=${3:-}" with a default) and "local profile=${4}"
(keep the original "local profile" assignment), then compute "local
branch_suffix=\"${branch:-local}\"" and build "state_file" using provider,
component, profile and branch_suffix; remove the second "local profile"
re-declaration so profile isn't clobbered.

In @.github/workflows/terraform.yml:
- Around line 148-159: In configure-backend.sh fix the parameter indexing in the
create_local_backend function: the local variable profile is currently assigned
from the wrong positional parameter (local profile="$3") so it gets set to the
branch value; change it to read the fourth parameter (local profile="$4") so the
profile argument passed to configure-backend.sh is preserved and used when
constructing the local state filename.

In `@Helmsman/dsf/esignet/esignet-dsf.yaml`:
- Around line 58-72: The oidc-ui release block is missing wait: true which can
cause later releases to proceed before oidc-ui is ready; update the oidc-ui
chart stanza (the block starting with "oidc-ui:", referencing keys like enabled,
version, chart, set, timeout, priority, hooks) to add wait: true (e.g.,
alongside timeout) so Helm waits for resources to be ready before continuing.
Ensure the wait: true key is added at the same indentation level as timeout and
priority within the oidc-ui block.

In `@Helmsman/dsf/esignet/external-dsf.yaml`:
- Around line 32-44: Add an explicit minio namespace entry under the existing
namespaces mapping to match the apps that reference it: update the namespaces
block to include a "minio:" key and set its protected flag (e.g., protected:
false or true as desired) so that the minio and istio-addons-minio apps have a
declared namespace; modify the same namespaces section that currently lists
postgres, keycloak, softhsm, redis, kafka, captcha and add the minio entry to
ensure consistent protection behavior.
- Around line 326-327: The postInstall hook value contains a trailing space in
the string "$WORKDIR/hooks/s3-setup.sh " which can prevent the shell from
locating the script; update the postInstall entry (postInstall) to remove the
trailing space so it reads "$WORKDIR/hooks/s3-setup.sh" (keep quotes intact) and
scan other hook entries for similar stray spaces.
- Around line 298-327: The priority ordering is reversed: because lower numeric
priority values execute first, ensure the MinIO release runs before the Istio
addons by swapping the priority values on the two releases — update the priority
field for the "minio" release and the "istio-addons-minio" release so that
"minio" has the lower number (executes first) and "istio-addons-minio" has the
higher number; locate the priority keys under the "minio" and
"istio-addons-minio" blocks and change them accordingly (e.g., make minio more
negative than istio-addons-minio).

In `@Helmsman/dsf/mosip-platform-java21/external-dsf.yaml`:
- Around line 81-84: Remove the leading whitespace from the branch value for
databases.mosip_kernel by changing the string assigned to
databases.mosip_kernel.branch from " v1.2.0.2" to "v1.2.0.2" so any resolution
of that branch/tag matches exactly; locate the databases.mosip_kernel.branch
entry in the external-dsf.yaml and update the value accordingly.

In `@Helmsman/dsf/mosip-platform-java21/prereq-dsf.yaml`:
- Line 106: The valuesFile entry currently references a misspelled filename
"rancher-loggig-values.yaml" which will fail chart value loading; update the
valuesFile value to the correct filename "rancher-logging-values.yaml" by
editing the valuesFile key in the prereq-dsf.yaml so it points to
"rancher-logging-values.yaml" instead of "rancher-loggig-values.yaml".

In `@Helmsman/hooks/esignet-1.7.1/mock-identity-system-preinstall.sh`:
- Around line 16-22: The preinstall script currently only warns when the
required ConfigMap "softhsm-mock-identity-system-share" is missing; change the
else branch in mock-identity-system-preinstall.sh so it logs a clear error and
exits non-zero (e.g., exit 1) to fail fast instead of proceeding. Locate the
kubectl check for the configmap and replace the warning-only behavior with an
error message and an exit to stop installation when the ConfigMap is absent.

In `@terraform/implementations/aws/infra/profiles/esignet/aws.tfvars`:
- Around line 62-63: The etcd cluster size is set to 2 via k8s_etcd_node_count
which loses quorum if one node fails; change the value of k8s_etcd_node_count
from 2 to either 1 (for a deliberately lightweight, single-member cluster) or 3
(to tolerate one node failure) in the aws.tfvars so the profile matches the
intended availability level.

In `@terraform/implementations/aws/infra/profiles/mosip/aws.tfvars`:
- Around line 82-84: The DNS lists subdomain_public and subdomain_internal are
missing the API entries referenced elsewhere; update subdomain_public (symbol:
subdomain_public) to include "api" and update subdomain_internal (symbol:
subdomain_internal) to include "api-internal" so Terraform will create the DNS
records used by the DSF manifests (e.g., Helmsman DSF references) and prevent
unresolved hostnames.

---

Outside diff comments:
In @.github/workflows/helmsman_external.yml:
- Around line 262-279: The dispatch payload for the workflow-caller step
currently only sends "mode" so the downstream helmsman_mosip.yml never receives
the triggering profile; update the curl -d payload in the "Trigger helmsman
mosip workflow via API" step to include the profile input (use the workflow's
profile value, e.g. github.event.inputs.profile or pass it into an env like
PROFILE) alongside BRANCH and mode so the JSON becomes
{"ref":"<BRANCH>","inputs":{"mode":"apply","profile":"<PROFILE>"}} and
helmsman_mosip.yml will receive the intended profile.

---

Nitpick comments:
In @.github/workflows/helmsman_esignet.yml:
- Around line 106-118: The git diff call uses unquoted Git SHAs which can break
when values contain special characters; update the git diff invocation in the
Set Profile step to quote the workflow-expanded SHA variables (the uses of ${{
github.event.before }} and ${{ github.sha }}) so they are passed as single
arguments, and ensure any other shell expansions related to CHANGED_FILES and
PROFILE (e.g., the CHANGED_FILES assignment and subsequent echo/grep pipeline
referencing CHANGED_FILES and PROFILE) remain properly quoted to avoid
word-splitting or globbing.

In @.github/workflows/helmsman_mosip.yml:
- Around line 74-86: The script mis-handles shell quoting and prints PROFILE
before it's guaranteed exported; fix the git diff invocation to quote the SHAs
(use "${{ github.event.before }}" and "${{ github.sha }}" in the git diff
command), quote variable expansions (use "$CHANGED_FILES" when piping/grepping
and "$PROFILE" when writing to GITHUB_ENV and echoing), and move the echo "Using
profile: $PROFILE" to after the PROFILE is determined and exported to GITHUB_ENV
(ensure PROFILE is set in both branches and then echo "$PROFILE").

In @.github/workflows/helmsman_testrigs.yml:
- Around line 74-86: Quote shell variable expansions in the git diff invocation
and elsewhere (e.g., use "${{ github.event.before }}" and "${{ github.sha }}"
and quote "$CHANGED_FILES" and "$PROFILE") and ensure PROFILE is defined in both
branches before printing: in the if branch assign PROFILE="${{
github.event.inputs.profile }}" (then export it to GITHUB_ENV) and in the else
branch keep the CHANGED_FILES/PROFILE logic but quote expansions (e.g.,
CHANGED_FILES="$(git diff --name-only "${{ github.event.before }}" "${{
github.sha }}" -- 'Helmsman/dsf/' 2>/dev/null || echo "")", PROFILE="$(echo
"$CHANGED_FILES" | ... )"), then echo "Using profile: $PROFILE" only after
PROFILE has been set and exported to GITHUB_ENV; reference CHANGED_FILES,
PROFILE, GITHUB_ENV and the git diff/echo "Using profile" lines to locate
changes.

In @.github/workflows/terraform-destroy.yml:
- Around line 44-51: Update the INFRA_PROFILE input description to explicitly
state that an empty string (or omission) will result in the default behavior of
"mosip" — e.g., mention that the workflow checks the profile with the condition
`[ -n "${{ inputs.INFRA_PROFILE }}" ]` and when that check is false it falls
back to the non-profile path (effectively defaulting to mosip). Reference the
INFRA_PROFILE input and the `[ -n "${{ inputs.INFRA_PROFILE }}" ]` condition so
reviewers can find and adjust the descriptive text.

In `@docs/profile-based-deployment.md`:
- Around line 35-42: Several fenced code blocks (for example the block beginning
with "Helmsman/dsf/" that shows the directory tree) are missing language
specifiers; update each triple-backtick fence to include an appropriate language
tag (e.g., ```text or ```bash) so markdown renderers and markdownlint treat them
correctly. Locate the fenced blocks that display file/directory listings
(including the one starting with "Helmsman/dsf/" and the other similar
directory-tree/code blocks mentioned) and prepend the language identifier after
the opening ``` for each block, keeping the block contents unchanged.

In `@Helmsman/dsf/mosip-platform-java21/esignet-dsf.yaml`:
- Around line 72-76: Add a TODO at the top of this Java 21 profile YAML noting
that versions need updating for Java 21 / MOSIP 1.3.0 and replace placeholder
branch/version values: update databases.mosip_esignet.branch (currently
"v1.4.1") to the correct MOSIP branch (e.g., "v1.7.1" or the approved version),
and ensure the esignet chart version and oidc-ui chart version are set to the
matching 1.7.1 (or agreed) values; reference the symbols
databases.mosip_esignet.branch, esignet chart version, and oidc-ui chart version
when making these changes so the intent is explicit.

In `@Helmsman/hooks/esignet-1.7.1/captcha-postinstall.sh`:
- Around line 33-38: The sed-based namespace replacement can accidentally change
any occurrence of the ESIGNET_NS string in the secret YAML; instead fetch the
secret as JSON, set only metadata.namespace, and reapply it. Replace the
pipeline that uses sed (the kubectl -n "$ESIGNET_NS" get secret esignet-captcha
-o yaml | sed ... | kubectl apply -f -) with a targeted transformation such as
kubectl -n "$ESIGNET_NS" get secret esignet-captcha -o json | jq
'.metadata.namespace = env.CAPTCHA_NS' | kubectl apply -f - (or use yq to edit
.metadata.namespace) so only the metadata.namespace field is changed while
keeping CAPTCHA_NS, ESIGNET_NS and the secret name esignet-captcha as the
referenced symbols.

In `@Helmsman/hooks/esignet-1.7.1/esignet-init-db.sh`:
- Around line 28-30: Replace the brittle sed-based namespace rewrite used in the
kubectl pipeline (the block that runs `kubectl -n "$POSTGRES_NS" get secret
postgres-postgresql -o yaml | sed "s/namespace: $POSTGRES_NS/namespace:
$ESIGNET_NS/g" | kubectl apply -f -`) with a structured yq-based edit to change
the metadata.namespace field (and repeat the same yq pattern for the other two
similar blocks around lines 35-37 and 41-43) so only the actual namespace field
is modified; if yq is not available in the runtime, add a clear comment above
the sed pipelines noting the limitation and the risk of accidental matches so
future maintainers know to prefer yq when possible.

In `@Helmsman/hooks/esignet-1.7.1/esignet-partner-onboarder-postinstall.sh`:
- Around line 13-21: This script hardcodes the namespace "esignet" causing
inconsistency; add the same namespace fallback used elsewhere by defining
ESIGNET_NS="${ESIGNET_NS:-esignet}" near the top and replace the hardcoded -n
esignet occurrences used by JOB_STATUS assignment and the kubectl logs
invocation with -n "$ESIGNET_NS" (ensure the JOB_STATUS variable and both
kubectl commands reference the new ESIGNET_NS variable).

In `@Helmsman/hooks/esignet-1.7.1/esignet-partner-onboarder-preinstall.sh`:
- Around line 13-25: The script currently hardcodes the namespaces "esignet" and
"keycloak"; make them configurable by introducing environment variables
ESIGNET_NS and KEYCLOAK_NS with defaults (e.g.,
ESIGNET_NS=${ESIGNET_NS:-esignet}, KEYCLOAK_NS=${KEYCLOAK_NS:-keycloak}) at the
top of the script, then replace all occurrences of the literal namespaces in the
kubectl invocations (the kubectl create namespace line, the kubectl -n ... wait
command that uses app.kubernetes.io/name=esignet, and the kubectl -n keycloak
get svc keycloak check) to use the variables ($ESIGNET_NS and $KEYCLOAK_NS) so
the hook supports overrides while preserving current defaults.

In `@Helmsman/hooks/esignet-1.7.1/esignet-preinstall.sh`:
- Around line 9-13: The header documents ESIGNET_NS, ENABLE_INSECURE and
SERVICE_MONITOR_FLAG but only ESIGNET_NS is actually referenced; either remove
ENABLE_INSECURE and SERVICE_MONITOR_FLAG from the comment block or implement
their behavior: add logic in the script to read ENABLE_INSECURE (e.g., default
false) to toggle insecure SSL handling where TLS/curl/helm calls occur, and read
SERVICE_MONITOR_FLAG to enable/disable Prometheus service monitor creation;
update any usage of ESIGNET_NS, ENABLE_INSECURE, and SERVICE_MONITOR_FLAG in
functions or conditional blocks so the documented vars are actually consumed or
remove them from the header to keep docs accurate.

In `@Helmsman/hooks/esignet-1.7.1/kafka-postinstall.sh`:
- Around line 21-26: Add a Kafka readiness wait before creating the ConfigMap in
kafka-postinstall.sh: before the kubectl create configmap line, poll or use
kubectl wait to ensure Kafka pods are ready (e.g., kubectl wait
--for=condition=ready pod -l app=kafka -n "$ESIGNET_NS" --timeout=2m) or loop
checking pod status in namespace "$ESIGNET_NS" using the label that identifies
your Kafka deployment; log progress, fail the script (exit 1) if pods do not
become ready within a reasonable timeout, and only then run the existing kubectl
create/apply that uses KAFKA_URL to build the kafka-config ConfigMap.

In `@Helmsman/hooks/esignet-1.7.1/postgres-preinstall.sh`:
- Around line 36-47: The data YAML in the heredoc currently hardcodes
mosip-version: "1.7.1"; change it to read from an environment/template variable
(e.g., ${MOSIP_VERSION} or a Helm value) so the hook can be reused for future
releases; update the heredoc generation in postgres-preinstall.sh to inject that
variable and ensure any callers/exporters set MOSIP_VERSION (or the
corresponding Helm value) before invoking the script, and validate fallback
behavior if the variable is unset.

In `@Helmsman/hooks/esignet-1.7.1/redis-setup.sh`:
- Around line 14-15: The script inconsistently hardcodes REDIS_NS while
ESIGNET_NS supports env overrides; change REDIS_NS to be configurable by
defining it with a default value (e.g., set REDIS_NS using the pattern used for
ESIGNET_NS) so consumers can override the namespace via environment variable,
and update any references to REDIS_NS in this file (and related
functions/commands) to rely on that variable.
- Around line 21-23: The kubectl readiness wait in redis-setup.sh (the kubectl
-n "$REDIS_NS" wait --for=condition=ready pod -l app.kubernetes.io/name=redis
--timeout=300s command) will cause the script to abort on timeout because of set
-e; to make behavior consistent with other hooks, catch the nonzero exit and log
a warning instead of exiting by appending a fallback that prints a clear WARNING
(e.g., indicating Redis wait timed out and the script is continuing) so the
script continues on readiness failure; update the kubectl wait invocation to
handle failure and emit the warning.

In `@Helmsman/hooks/esignet-1.7.1/softhsm-esignet-postinstall.sh`:
- Around line 30-38: The sed-based replacement in the block that copies the
esignet-softhsm-share ConfigMap is unsafe because it may alter occurrences of
the source namespace inside data fields; instead extract the resource and change
only metadata.namespace before applying: fetch the ConfigMap (kubectl -n
"$SOFTHSM_NS" get configmap esignet-softhsm-share), update .metadata.namespace
to "$ESIGNET_NS" using a tool that targets metadata (e.g., yq with an expression
that sets metadata.namespace, or kubectl get -o json | jq '.metadata.namespace =
env.ESIGNET_NS'), then apply the transformed manifest with kubectl apply -f -;
update the code that currently pipes through sed to use this targeted metadata
modification so only the namespace field is changed (reference symbols:
SOFTHSM_NS, ESIGNET_NS, esignet-softhsm-share, kubectl apply).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e1091cda-7966-4b17-af54-cf0c117d1e0d

📥 Commits

Reviewing files that changed from the base of the PR and between 58b23b8 and a5e20a7.

📒 Files selected for processing (45)
  • .github/scripts/configure-backend.sh
  • .github/workflows/helmsman_esignet.yml
  • .github/workflows/helmsman_external.yml
  • .github/workflows/helmsman_mosip.yml
  • .github/workflows/helmsman_testrigs.yml
  • .github/workflows/terraform-destroy.yml
  • .github/workflows/terraform.yml
  • Helmsman/dsf/esignet/esignet-dsf.yaml
  • Helmsman/dsf/esignet/external-dsf.yaml
  • Helmsman/dsf/esignet/prereq-dsf.yaml
  • Helmsman/dsf/mosip-platform-java11/esignet-dsf.yaml
  • Helmsman/dsf/mosip-platform-java11/external-dsf.yaml
  • Helmsman/dsf/mosip-platform-java11/mosip-dsf.yaml
  • Helmsman/dsf/mosip-platform-java11/prereq-dsf.yaml
  • Helmsman/dsf/mosip-platform-java11/testrigs-dsf.yaml
  • Helmsman/dsf/mosip-platform-java21/esignet-dsf.yaml
  • Helmsman/dsf/mosip-platform-java21/external-dsf.yaml
  • Helmsman/dsf/mosip-platform-java21/mosip-dsf.yaml
  • Helmsman/dsf/mosip-platform-java21/prereq-dsf.yaml
  • Helmsman/dsf/mosip-platform-java21/testrigs-dsf.yaml
  • Helmsman/hooks/esignet-1.7.1/captcha-postinstall.sh
  • Helmsman/hooks/esignet-1.7.1/esignet-demo-oidc-partner-onboarder-postinstall.sh
  • Helmsman/hooks/esignet-1.7.1/esignet-demo-oidc-partner-onboarder-preinstall.sh
  • Helmsman/hooks/esignet-1.7.1/esignet-init-db.sh
  • Helmsman/hooks/esignet-1.7.1/esignet-partner-onboarder-postinstall.sh
  • Helmsman/hooks/esignet-1.7.1/esignet-partner-onboarder-preinstall.sh
  • Helmsman/hooks/esignet-1.7.1/esignet-preinstall.sh
  • Helmsman/hooks/esignet-1.7.1/kafka-postinstall.sh
  • Helmsman/hooks/esignet-1.7.1/keycloak-postinstall.sh
  • Helmsman/hooks/esignet-1.7.1/mock-identity-system-preinstall.sh
  • Helmsman/hooks/esignet-1.7.1/mock-relying-party-service-preinstall.sh
  • Helmsman/hooks/esignet-1.7.1/mock-relying-party-ui-preinstall.sh
  • Helmsman/hooks/esignet-1.7.1/oidc-ui-preinstall.sh
  • Helmsman/hooks/esignet-1.7.1/postgres-postinstall.sh
  • Helmsman/hooks/esignet-1.7.1/postgres-preinstall.sh
  • Helmsman/hooks/esignet-1.7.1/redis-setup.sh
  • Helmsman/hooks/esignet-1.7.1/softhsm-esignet-postinstall.sh
  • Helmsman/hooks/esignet-1.7.1/softhsm-esignet-setup.sh
  • Helmsman/hooks/esignet-1.7.1/softhsm-mock-identity-system-postinstall.sh
  • Helmsman/hooks/esignet-1.7.1/softhsm-mock-identity-system-preinstall.sh
  • docs/engineer-review-script.txt
  • docs/profile-based-deployment.drawio
  • docs/profile-based-deployment.md
  • terraform/implementations/aws/infra/profiles/esignet/aws.tfvars
  • terraform/implementations/aws/infra/profiles/mosip/aws.tfvars

Signed-off-by: bhumi46 <thisisbn46@gmail.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/scripts/configure-backend.sh (1)

200-205: Extract shared state identifier builder to prevent format drift.

Line 200-Line 205, Line 272-Line 277, and Line 320-Line 325 duplicate the same profile-aware naming logic. Centralizing this reduces future inconsistencies.

♻️ Refactor sketch
+build_state_id() {
+    local component="$1"
+    local branch="$2"
+    if [ -n "$PROFILE" ]; then
+        echo "${CLOUD_PROVIDER}-${component}-${PROFILE}-${branch}"
+    else
+        echo "${CLOUD_PROVIDER}-${component}-${branch}"
+    fi
+}
...
-    local state_key
-    if [ -n "$PROFILE" ]; then
-        state_key="${CLOUD_PROVIDER}-${component}-${PROFILE}-${branch}-terraform.tfstate"
-    else
-        state_key="${CLOUD_PROVIDER}-${component}-${branch}-terraform.tfstate"
-    fi
+    local state_key="$(build_state_id "$component" "$branch")-terraform.tfstate"
...
-    local state_prefix
-    if [ -n "$PROFILE" ]; then
-        state_prefix="terraform/${CLOUD_PROVIDER}-${component}-${PROFILE}-${branch}"
-    else
-        state_prefix="terraform/${CLOUD_PROVIDER}-${component}-${branch}"
-    fi
+    local state_prefix="terraform/$(build_state_id "$component" "$branch")"

Also applies to: 272-277, 320-325

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/scripts/configure-backend.sh around lines 200 - 205, Extract the
duplicated profile-aware state key construction into a single helper function
(e.g., build_state_key or get_state_key) and replace the three copies with calls
to that function; the helper should accept component and branch (and read
PROFILE and CLOUD_PROVIDER) and return the same format used currently (when
PROFILE is set:
"${CLOUD_PROVIDER}-${component}-${PROFILE}-${branch}-terraform.tfstate",
otherwise: "${CLOUD_PROVIDER}-${component}-${branch}-terraform.tfstate"), then
update usages that set state_key to call the new helper to prevent format drift.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/scripts/configure-backend.sh:
- Around line 78-81: The script reads "$2" unconditionally for the --profile
case causing misparses; update the --profile handler in configure-backend.sh to
first validate that a next argument exists and is not another option (e.g., not
starting with '-') before assigning PROFILE="$2", and if invalid print a clear
error and exit non-zero; ensure you adjust the same switch/case block that
contains the "--profile) PROFILE=... shift 2 ;;", adding the presence and prefix
check and failing fast to avoid silently consuming the wrong token.

---

Nitpick comments:
In @.github/scripts/configure-backend.sh:
- Around line 200-205: Extract the duplicated profile-aware state key
construction into a single helper function (e.g., build_state_key or
get_state_key) and replace the three copies with calls to that function; the
helper should accept component and branch (and read PROFILE and CLOUD_PROVIDER)
and return the same format used currently (when PROFILE is set:
"${CLOUD_PROVIDER}-${component}-${PROFILE}-${branch}-terraform.tfstate",
otherwise: "${CLOUD_PROVIDER}-${component}-${branch}-terraform.tfstate"), then
update usages that set state_key to call the new helper to prevent format drift.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 8516c1f7-8ae5-4045-abfa-c020279d3276

📥 Commits

Reviewing files that changed from the base of the PR and between a5e20a7 and 9a02f0c.

📒 Files selected for processing (1)
  • .github/scripts/configure-backend.sh

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: bhumi46 <111699703+bhumi46@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@Helmsman/dsf/esignet/external-dsf.yaml`:
- Around line 63-65: The ConfigMap exposure in external-dsf.yaml is inconsistent
with the hook behavior: update the PostgreSQL host value in the hooks
preInstall/postInstall block so it matches what
Helmsman/hooks/esignet-1.7.1/postgres-preinstall.sh writes to esignet-global
(use esignet-postgres.${INSTALLATION_DOMAIN} instead of
postgres.sandbox.xyz.net), or alternatively modify the hook script
(postgress-preinstall.sh) to write the hostname postgres.sandbox.xyz.net into
esignet-global; ensure the same hostname is used in the hooks entries
(preInstall/postInstall) and in the esignet-global output so consumers see a
single consistent postgres host.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: d231a0d0-66c4-4f49-a6ee-086080c49bbd

📥 Commits

Reviewing files that changed from the base of the PR and between 9a02f0c and 75a45ca.

📒 Files selected for processing (1)
  • Helmsman/dsf/esignet/external-dsf.yaml

bhumi46 and others added 4 commits March 24, 2026 15:20
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: bhumi46 <111699703+bhumi46@users.noreply.github.com>
Signed-off-by: bhumi46 <thisisbn46@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: bhumi46 <111699703+bhumi46@users.noreply.github.com>
Signed-off-by: bhumi46 <thisisbn46@gmail.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🧹 Nitpick comments (2)
Helmsman/dsf/esignet/external-dsf.yaml (2)

121-143: Duplicate priority -16 may cause non-deterministic ordering.

Both postgres-init-esignet (line 123) and redis (line 141) have priority: -16. In Helmsman, releases with the same priority may execute in an undefined order. If these releases are truly independent, this is acceptable. However, if there are any implicit dependencies or if deterministic deployment order is desired for debugging/reproducibility, consider assigning distinct priorities.

♻️ Suggested fix to differentiate priorities
   postgres-init-esignet:
     ...
     wait: true
     timeout: 180
-    priority: -16
+    priority: -16
     hooks:
       preInstall: "$WORKDIR/hooks/esignet-1.7.1/esignet-init-db.sh"

   redis:
     ...
     wait: true
     timeout: 480
-    priority: -16
+    priority: -15.5

Or adjust redis to -15 and shift subsequent priorities accordingly.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Helmsman/dsf/esignet/external-dsf.yaml` around lines 121 - 143, The two
releases 'postgres-init-esignet' and 'redis' both use the same priority value
(-16), which can lead to non-deterministic ordering; to fix, change one of the
priorities (e.g., set the 'redis' release priority to -15 or adjust one of them
to a unique value) so each release has a distinct priority, and if you shift
priorities ensure any dependent releases after 'redis' are adjusted accordingly
to preserve intended ordering.

73-73: Hardcoded sandbox.xyz.net domain reduces environment portability.

Multiple host values are hardcoded with sandbox.xyz.net:

  • Line 73: postgresHost
  • Lines 111, 117: databases.*.host
  • Line 208: kafkaUiHost
  • Line 275: keycloakExternalHost
  • Line 325: externalHost (minio)

The hook scripts use ${INSTALLATION_DOMAIN} for portability. Consider using environment variable substitution in the DSF to maintain consistency and enable deployment to different environments without file modifications.

♻️ Example using environment variables
   istio-addons-psql:
     ...
     set:
-      postgresHost: "postgres.sandbox.xyz.net"
+      postgresHost: "postgres.$INSTALLATION_DOMAIN"

Apply similar changes to other hardcoded hosts. Ensure INSTALLATION_DOMAIN is exported in the workflow before invoking Helmsman.

Also applies to: 111-112, 208-208, 275-275, 325-325

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Helmsman/dsf/esignet/external-dsf.yaml` at line 73, Replace hardcoded
sandbox.sandbox.xyz.net domain values with environment-variable substitution so
the DSF is portable: update postgresHost, databases.*.host, kafkaUiHost,
keycloakExternalHost, and externalHost (minio) to use the same
INSTALLATION_DOMAIN substitution pattern used in the hook scripts (e.g.
reference ${INSTALLATION_DOMAIN} or the project's established envsubst pattern)
and ensure the CI/workflow exports INSTALLATION_DOMAIN before Helmsman runs;
apply the same substitution for the entries at the reported keys (postgresHost,
databases.*.host, kafkaUiHost, keycloakExternalHost, externalHost).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@Helmsman/dsf/esignet/external-dsf.yaml`:
- Around line 32-46: Add an explicit esignet namespace entry under the top-level
namespaces block in external-dsf.yaml so it matches how other namespaces are
declared; specifically add an "esignet:" key with an appropriate "protected:"
boolean (e.g., protected: false) to ensure consistent protection settings for
the postgres-init-esignet app (which uses namespace: esignet) and to align with
the namespaces handling elsewhere in the file.

In `@Helmsman/dsf/mosip-platform-java21/external-dsf.yaml`:
- Line 65: The dbUserPasswords.dbuserPassword entry is set to an empty string;
update the external-dsf YAML so dbUserPasswords.dbuserPassword is either
populated with a secure value or clearly linked to your secret management
mechanism (e.g., reference to a Kubernetes Secret, HashiCorp Vault, or an
injection placeholder), and add a short inline comment explaining that the
actual password is provided externally if that’s intentional to avoid accidental
deployment with a blank DB password.
- Around line 303-307: The postInstall hook currently uses literal placeholder
arguments to captcha-setup.sh (postInstall and captcha-setup.sh), which will
create invalid Kubernetes secrets if not replaced; update the manifest to pass
environment-variable references (e.g., $PREREG_SITE_KEY, $PREREG_SECRET_KEY,
etc.) instead of angle-bracket literals and/or modify captcha-setup.sh to
validate inputs (reject values matching placeholder patterns like "<.*>" or
empty/unset values and exit non‑zero) so deployment fails fast when real keys
are missing.
- Line 270: The postInstall entry contains an unintended trailing space in the
hook path ("$WORKDIR/hooks/s3-setup.sh "); remove the trailing space from the
postInstall value so the hook reads exactly "$WORKDIR/hooks/s3-setup.sh" (update
the postInstall key where it is defined in external-dsf.yaml).
- Line 392: The configuration key landing.name currently contains a literal
placeholder value "<sandbox>" which will render with angle brackets on the UI;
change landing.name to a final display string without angle brackets (e.g.,
"Sandbox") or replace it with a templated/env var pattern such as using a
variable token (e.g., landing.name: "${LANDING_NAME}") that will be substituted
at deployment so the UI shows the intended text rather than the literal
"<sandbox>".

---

Nitpick comments:
In `@Helmsman/dsf/esignet/external-dsf.yaml`:
- Around line 121-143: The two releases 'postgres-init-esignet' and 'redis' both
use the same priority value (-16), which can lead to non-deterministic ordering;
to fix, change one of the priorities (e.g., set the 'redis' release priority to
-15 or adjust one of them to a unique value) so each release has a distinct
priority, and if you shift priorities ensure any dependent releases after
'redis' are adjusted accordingly to preserve intended ordering.
- Line 73: Replace hardcoded sandbox.sandbox.xyz.net domain values with
environment-variable substitution so the DSF is portable: update postgresHost,
databases.*.host, kafkaUiHost, keycloakExternalHost, and externalHost (minio) to
use the same INSTALLATION_DOMAIN substitution pattern used in the hook scripts
(e.g. reference ${INSTALLATION_DOMAIN} or the project's established envsubst
pattern) and ensure the CI/workflow exports INSTALLATION_DOMAIN before Helmsman
runs; apply the same substitution for the entries at the reported keys
(postgresHost, databases.*.host, kafkaUiHost, keycloakExternalHost,
externalHost).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 97e179eb-eb8e-4964-82a3-01a6b7051ae1

📥 Commits

Reviewing files that changed from the base of the PR and between 75a45ca and 1a0a01f.

📒 Files selected for processing (2)
  • Helmsman/dsf/esignet/external-dsf.yaml
  • Helmsman/dsf/mosip-platform-java21/external-dsf.yaml

bhumi46 and others added 3 commits March 24, 2026 15:33
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: bhumi46 <111699703+bhumi46@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: bhumi46 <111699703+bhumi46@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: bhumi46 <111699703+bhumi46@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

♻️ Duplicate comments (1)
Helmsman/dsf/esignet/external-dsf.yaml (1)

69-77: ⚠️ Potential issue | 🟠 Major

Use one PostgreSQL endpoint for initialization and runtime config.

Helmsman/hooks/esignet-1.7.1/postgres-postinstall.sh defaults to postgres-postgresql.postgres:5432, but Lines 113-114 route the init chart through postgres.sandbox.xyz.net:5433. Since the init job runs inside the cluster, this adds a DNS/ingress dependency and leaves the DSF with conflicting PostgreSQL targets. The same mismatch is already baked into Lines 119-121 if mosip_mockidentitysystem is ever enabled.

🛠️ Align the init jobs with the in-cluster PostgreSQL service
   postgres-init-esignet:
@@
-      databases.mosip_esignet.host: "postgres.sandbox.xyz.net"
-      databases.mosip_esignet.port: 5433
+      databases.mosip_esignet.host: "postgres-postgresql.postgres"
+      databases.mosip_esignet.port: 5432
@@
-      databases.mosip_mockidentitysystem.host: "postgres.sandbox.xyz.net"
+      databases.mosip_mockidentitysystem.host: "postgres-postgresql.postgres"
@@
-      databases.mosip_mockidentitysystem.port: 5433
+      databases.mosip_mockidentitysystem.port: 5432

Also applies to: 111-121

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Helmsman/dsf/esignet/external-dsf.yaml` around lines 69 - 77, The init job
and runtime chart are using different PostgreSQL endpoints causing conflicting
targets: update the istio-addons-psql chart values so the postgresHost/port
matches the in-cluster service used by the init script
(Helmsman/hooks/esignet-1.7.1/postgres-postinstall.sh which expects
postgres-postgresql.postgres:5432) — change the postgresHost from
"postgres.sandbox.xyz.net" and port 5433 (where present) to the in-cluster DNS
"postgres-postgresql.postgres:5432" (and ensure any conditional block for
mosip_mockidentitysystem likewise uses the same postgresHost/port) so both
initialization (postgres-postinstall.sh) and runtime charts reference one
consistent in-cluster PostgreSQL endpoint.
🧹 Nitpick comments (3)
Helmsman/dsf/mosip-platform-java21/prereq-dsf.yaml (3)

36-37: Placeholder values require environment-specific substitution.

The hook parameters contain placeholders (sandbox.xyz.net, <version>) that must be replaced with actual values before deployment. If these are meant to be dynamically substituted, consider using environment variables (e.g., $DOMAIN, $ISTIO_VERSION) for consistency with the $WORKDIR pattern used elsewhere.

♻️ Suggested approach
     hooks:
-      postInstall: "$WORKDIR/hooks/install-istio-and-httpbin.sh sandbox.xyz.net <version>"
-      postUpgrade: "$WORKDIR/hooks/install-istio-and-httpbin.sh sandbox.xyz.net <version>"
+      postInstall: "$WORKDIR/hooks/install-istio-and-httpbin.sh $DOMAIN $ISTIO_VERSION"
+      postUpgrade: "$WORKDIR/hooks/install-istio-and-httpbin.sh $DOMAIN $ISTIO_VERSION"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Helmsman/dsf/mosip-platform-java21/prereq-dsf.yaml` around lines 36 - 37, The
postInstall and postUpgrade hook lines use hardcoded placeholders
("sandbox.xyz.net" and "<version>")—update these to use environment-specific
substitution by replacing the placeholders with environment variables (for
example $DOMAIN and $ISTIO_VERSION) consistent with the existing $WORKDIR
pattern; modify the two entries referencing
$WORKDIR/hooks/install-istio-and-httpbin.sh so they pass "$DOMAIN" and
"$ISTIO_VERSION" (or other agreed variable names) instead of the literal
placeholders and ensure any documentation or deployment scripts set those env
vars prior to running the helm chart.

88-89: Hardcoded Kibana host should be parameterized.

kibanaHost: "kibana.sandbox.xyz.net" is environment-specific and should use an environment variable for portability across deployments.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Helmsman/dsf/mosip-platform-java21/prereq-dsf.yaml` around lines 88 - 89, The
kibanaHost entry is hardcoded; replace the literal "kibana.sandbox.xyz.net" with
a parameter reference (e.g. a Helm/chart/value or environment variable) so
deployments can supply the host per environment; update the key kibanaHost to
use the templated value (for example {{ .Values.kibanaHost }} or ${KIBANA_HOST})
and ensure the corresponding default is added to values.yaml or documented in
the deployment env variables alongside installName to maintain backward
compatibility.

6-9: Remove unused and deprecated repository reference.

The banzaicloud-stable repository points to https://charts.helm.sh/stable, which is the deprecated and archived Helm stable repository (read-only since November 2020). Additionally, no charts in this file reference this repository—all use mosip/ charts or local paths. Since this configuration also appears identically in other DSF profiles (java11, esignet), consider removing this unused repository across all affected files.

If a Banzaicloud repository is needed in the future, use the correct URL instead of the deprecated Helm stable archive.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Helmsman/dsf/mosip-platform-java21/prereq-dsf.yaml` around lines 6 - 9,
Remove the unused/deprecated helm repo entry by deleting the
"banzaicloud-stable: https://charts.helm.sh/stable" line from the helmRepos
block (symbol: helmRepos) in this file and the other DSF profile YAMLs that
contain the identical entry (symbols: banzaicloud-stable,
https://charts.helm.sh/stable); ensure only active repositories (e.g., mosip and
bitnami) remain, run a quick grep across DSF profiles to locate other instances,
and commit the cleaned YAMLs so no references to the deprecated Helm stable
archive remain.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@Helmsman/dsf/esignet/external-dsf.yaml`:
- Around line 209-210: The esignet profile currently hard-codes sandbox hosts
(e.g., the kafkaUiHost key set to "kafka.sandbox.xyz.net"); remove those literal
hostnames and source them from profile/installation inputs instead (e.g., use
the installation-domain/profile-provided value or a templated variable) so the
DSF remains environment-agnostic; update the kafkaUiHost entries in the esignet
profile (and the same pattern used for the other host keys in that profile) to
reference the appropriate input variable (installation-domain or
profile-specific input) rather than a fixed "sandbox.xyz.net" string.
- Around line 160-162: Find every occurrence of the YAML key logRetentionBytes
in the DSF config files and remove the leading underscore from its value (e.g.,
change "_1073741824" to "1073741824") so the value is a valid integer string for
Kafka's log.retention.bytes; update all three DSF configs that contain this key
to use the corrected value.

In `@Helmsman/dsf/mosip-platform-java21/prereq-dsf.yaml`:
- Around line 67-74: The configured JVM heap sizes (data.heapSize and
master.heapSize) exceed their Kubernetes memory requests; update either the heap
settings or the memory requests so requests > heap (recommend requests >= 1.5x
heap to allow JVM native/metaspace overhead). Specifically, adjust
data.resources.requests.memory and master.resources.requests.memory to values at
least 1.5 times data.heapSize and master.heapSize respectively (or reduce
data.heapSize/master.heapSize to fit the current requests) so the memory request
always exceeds the configured heap.

---

Duplicate comments:
In `@Helmsman/dsf/esignet/external-dsf.yaml`:
- Around line 69-77: The init job and runtime chart are using different
PostgreSQL endpoints causing conflicting targets: update the istio-addons-psql
chart values so the postgresHost/port matches the in-cluster service used by the
init script (Helmsman/hooks/esignet-1.7.1/postgres-postinstall.sh which expects
postgres-postgresql.postgres:5432) — change the postgresHost from
"postgres.sandbox.xyz.net" and port 5433 (where present) to the in-cluster DNS
"postgres-postgresql.postgres:5432" (and ensure any conditional block for
mosip_mockidentitysystem likewise uses the same postgresHost/port) so both
initialization (postgres-postinstall.sh) and runtime charts reference one
consistent in-cluster PostgreSQL endpoint.

---

Nitpick comments:
In `@Helmsman/dsf/mosip-platform-java21/prereq-dsf.yaml`:
- Around line 36-37: The postInstall and postUpgrade hook lines use hardcoded
placeholders ("sandbox.xyz.net" and "<version>")—update these to use
environment-specific substitution by replacing the placeholders with environment
variables (for example $DOMAIN and $ISTIO_VERSION) consistent with the existing
$WORKDIR pattern; modify the two entries referencing
$WORKDIR/hooks/install-istio-and-httpbin.sh so they pass "$DOMAIN" and
"$ISTIO_VERSION" (or other agreed variable names) instead of the literal
placeholders and ensure any documentation or deployment scripts set those env
vars prior to running the helm chart.
- Around line 88-89: The kibanaHost entry is hardcoded; replace the literal
"kibana.sandbox.xyz.net" with a parameter reference (e.g. a Helm/chart/value or
environment variable) so deployments can supply the host per environment; update
the key kibanaHost to use the templated value (for example {{ .Values.kibanaHost
}} or ${KIBANA_HOST}) and ensure the corresponding default is added to
values.yaml or documented in the deployment env variables alongside installName
to maintain backward compatibility.
- Around line 6-9: Remove the unused/deprecated helm repo entry by deleting the
"banzaicloud-stable: https://charts.helm.sh/stable" line from the helmRepos
block (symbol: helmRepos) in this file and the other DSF profile YAMLs that
contain the identical entry (symbols: banzaicloud-stable,
https://charts.helm.sh/stable); ensure only active repositories (e.g., mosip and
bitnami) remain, run a quick grep across DSF profiles to locate other instances,
and commit the cleaned YAMLs so no references to the deprecated Helm stable
archive remain.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 8a017482-eda7-4492-98fb-2fdf32d151d6

📥 Commits

Reviewing files that changed from the base of the PR and between 1a0a01f and efbeb08.

📒 Files selected for processing (3)
  • Helmsman/dsf/esignet/external-dsf.yaml
  • Helmsman/dsf/mosip-platform-java21/prereq-dsf.yaml
  • Helmsman/utils/rancher-loggig-values.yaml
💤 Files with no reviewable changes (1)
  • Helmsman/utils/rancher-loggig-values.yaml

bhumi46 and others added 6 commits March 24, 2026 17:01
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: bhumi46 <111699703+bhumi46@users.noreply.github.com>
Signed-off-by: bhumi46 <thisisbn46@gmail.com>
Signed-off-by: bhumi46 <thisisbn46@gmail.com>
Signed-off-by: bhumi46 <thisisbn46@gmail.com>
Signed-off-by: bhumi46 <thisisbn46@gmail.com>
Signed-off-by: bhumi46 <thisisbn46@gmail.com>
@bhumi46 bhumi46 merged commit 4dd71f3 into mosip:develop Mar 24, 2026
2 checks passed
bhumi46 added a commit to bhumi46/infra that referenced this pull request Mar 26, 2026
Merge pull request mosip#173 from bhumi46/develop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant