Skip to content

Commit

Permalink
Add aro operator deployment logging
Browse files Browse the repository at this point in the history
  • Loading branch information
ventifus committed Aug 27, 2024
1 parent e83bf05 commit aba0f9a
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions pkg/operator/deploy/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -495,14 +495,27 @@ func (o *operator) EnsureUpgradeAnnotation(ctx context.Context) error {
}

func (o *operator) IsReady(ctx context.Context) (bool, error) {
ok, err := ready.CheckDeploymentIsReady(ctx, o.kubernetescli.AppsV1().Deployments(pkgoperator.Namespace), "aro-operator-master")()
deployments := o.kubernetescli.AppsV1().Deployments(pkgoperator.Namespace)
ok, err := ready.CheckDeploymentIsReady(ctx, deployments, "aro-operator-master")()
o.log.Infof("deployment %q ok status is: %v, err is: %v", "aro-operator-master", ok, err)
if !ok || err != nil {
d, err := deployments.Get(ctx, "aro-operator-master", metav1.GetOptions{})
if err != nil {
o.log.Debugf("deployment \"aro-operator-master\" error: %s", err)
} else {
o.log.Debugf("deployment \"aro-operator-master\" status: %v", &d.Status)
}
return ok, err
}
ok, err = ready.CheckDeploymentIsReady(ctx, o.kubernetescli.AppsV1().Deployments(pkgoperator.Namespace), "aro-operator-worker")()
ok, err = ready.CheckDeploymentIsReady(ctx, deployments, "aro-operator-worker")()
o.log.Infof("deployment %q ok status is: %v, err is: %v", "aro-operator-worker", ok, err)
if !ok || err != nil {
d, err := deployments.Get(ctx, "aro-operator-worker", metav1.GetOptions{})
if err != nil {
o.log.Debugf("deployment \"aro-operator-worker\" error: %s", err)
} else {
o.log.Debugf("deployment \"aro-operator-worker\" status: %v", &d.Status)
}
return ok, err
}

Expand Down

0 comments on commit aba0f9a

Please sign in to comment.