mirror of
https://github.com/dredx/prole.git
synced 2026-09-24 19:34:31 +00:00
chore: refine post-remediation checks in init_gitlab.sh for GitLab workload convergence
- Introduced `gitlab_post_remediation_success` flag to streamline corrective action logging. - Adjusted logic to skip unnecessary workload convergence gates when remediation is successful.
This commit is contained in:
parent
b04ce825c9
commit
a4f96d5365
@ -3104,6 +3104,7 @@ fi
|
||||
# Some components may remain at 2 replicas even after CR is Available.
|
||||
# ---------------------------------------------------------------------------
|
||||
log "Verifying GitLab deployment replica counts (desired=1)..."
|
||||
gitlab_post_remediation_success=0
|
||||
_over_replicated_found=0
|
||||
# Explicit list of components to verify and scale if needed (Requirement 2)
|
||||
for _dep_suffix in "gitlab-shell" "kas" "registry" "sidekiq-all-in-1-v2"; do
|
||||
@ -3154,6 +3155,8 @@ if [[ "$_over_replicated_found" == "1" ]]; then
|
||||
|
||||
gitlab_replica_drift=0
|
||||
_over_replicated_found=0
|
||||
gitlab_reconcile_required=0
|
||||
gitlab_post_remediation_success=1
|
||||
if [[ "$_remediation_rollout_failed" == "1" ]]; then
|
||||
log "GitLab corrective action converged by final replica state (all final_live values match desired=1)."
|
||||
else
|
||||
@ -3162,7 +3165,11 @@ if [[ "$_over_replicated_found" == "1" ]]; then
|
||||
fi
|
||||
|
||||
if [[ "${GITLAB_NO_WAIT:-0}" != "1" ]]; then
|
||||
wait_for_gitlab_workload_convergence
|
||||
if [[ "${gitlab_post_remediation_success:-0}" == "1" ]]; then
|
||||
log "GitLab corrective action success is authoritative; skipping additional post-remediation convergence gate."
|
||||
else
|
||||
wait_for_gitlab_workload_convergence
|
||||
fi
|
||||
else
|
||||
warn "GITLAB_NO_WAIT=1, skipping strict GitLab workload convergence checks."
|
||||
fi
|
||||
|
||||
Loading…
Reference in New Issue
Block a user