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 9050320
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions pkg/operator/deploy/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,8 @@ func (o *operator) applyDeployment(ctx context.Context, resources []kruntime.Obj
return err
}

o.log.Info("item", gvks)

switch gvks[0].GroupKind().String() {
case "CustomResourceDefinition.apiextensions.k8s.io":
acc, err := meta.Accessor(resource)
Expand Down Expand Up @@ -415,6 +417,21 @@ func (o *operator) applyDeployment(ctx context.Context, resources []kruntime.Obj
if err != nil {
return err
}
case "Deployment.apps":
err = retry.OnError(wait.Backoff{
Steps: 60,
Duration: time.Second,
}, func(err error) bool {
return true
}, func() error {
deployments, err := o.kubernetescli.AppsV1().Deployments(pkgoperator.Namespace).List(ctx, metav1.ListOptions{})
if err != nil {
return err
}
o.log.Info(deployments)
return nil
})
o.log.Error("Failed to retrieve deployments", err)
}
}
return nil
Expand Down

0 comments on commit 9050320

Please sign in to comment.