Skip to content

Commit 90ea77e

Browse files
authored
chore: log when route causes .status.phase to be pending (#2046)
Signed-off-by: Jonathan West <jgwest@gmail.com>
1 parent d396145 commit 90ea77e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

controllers/argocd/status.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,7 @@ func (r *ReconcileArgoCD) reconcileStatusHost(cr *argoproj.ArgoCD, argocdStatus
388388
if route.Status.Ingress == nil {
389389
argocdStatus.Host = ""
390390
argocdStatus.Phase = "Pending"
391+
log.Info("Route '" + route.Name + "' has 'status.ingress' value of nil, so ArgoCD .status.phase is set to Pending")
391392
} else {
392393
// conditions exist and type is RouteAdmitted
393394
if len(route.Status.Ingress[0].Conditions) > 0 && route.Status.Ingress[0].Conditions[0].Type == routev1.RouteAdmitted {
@@ -396,12 +397,14 @@ func (r *ReconcileArgoCD) reconcileStatusHost(cr *argoproj.ArgoCD, argocdStatus
396397
} else {
397398
argocdStatus.Host = ""
398399
argocdStatus.Phase = "Pending"
400+
log.Info("Route '" + route.Name + "' has 'status.ingress[0].conditions[RouteAdmitted]' value of false or empty, so ArgoCD .status.phase is set to Pending")
399401
}
400402
} else {
401403
// no conditions are available
402404
if route.Status.Ingress[0].Host != "" {
403405
argocdStatus.Host = route.Status.Ingress[0].Host
404406
} else {
407+
log.Info("Route '" + route.Name + "' has 'status.ingress[0].host' value of \"\", so ArgoCD .status.phase is set to Pending")
405408
argocdStatus.Host = "Unavailable"
406409
argocdStatus.Phase = "Pending"
407410
}

0 commit comments

Comments
 (0)