1
0
mirror of https://codeberg.org/crowci/crow.git synced 2025-08-07 20:23:03 +03:00

Update Go dependencies and minimal Go version to 1.20 (#1650)

Signed-off-by: 6543 <6543@obermui.de>
Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
Lauris BH
2023-03-21 01:48:15 +02:00
committed by GitHub
parent 60733c5cb9
commit 46452fbd84
29 changed files with 251 additions and 224 deletions

View File

@@ -190,11 +190,14 @@ func (e *kube) Wait(ctx context.Context, step *types.Step) (*types.State, error)
// TODO 5 seconds is against best practice, k3s didn't work otherwise
si := informers.NewSharedInformerFactoryWithOptions(e.client, 5*time.Second, informers.WithNamespace(e.config.Namespace))
si.Core().V1().Pods().Informer().AddEventHandler(
if _, err := si.Core().V1().Pods().Informer().AddEventHandler(
cache.ResourceEventHandlerFuncs{
UpdateFunc: podUpdated,
},
)
); err != nil {
return nil, err
}
stop := make(chan struct{})
si.Start(stop)
defer close(stop)
@@ -238,11 +241,14 @@ func (e *kube) Tail(ctx context.Context, step *types.Step) (io.ReadCloser, error
// TODO 5 seconds is against best practice, k3s didn't work otherwise
si := informers.NewSharedInformerFactoryWithOptions(e.client, 5*time.Second, informers.WithNamespace(e.config.Namespace))
si.Core().V1().Pods().Informer().AddEventHandler(
if _, err := si.Core().V1().Pods().Informer().AddEventHandler(
cache.ResourceEventHandlerFuncs{
UpdateFunc: podUpdated,
},
)
); err != nil {
return nil, err
}
stop := make(chan struct{})
si.Start(stop)
defer close(stop)