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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user