mirror of
https://codeberg.org/crowci/crow.git
synced 2025-08-09 07:42:52 +03:00
Enable golangci linter gomnd (#3171)
This commit is contained in:
@@ -42,6 +42,8 @@ import (
|
||||
|
||||
const (
|
||||
EngineName = "kubernetes"
|
||||
// TODO 5 seconds is against best practice, k3s didn't work otherwise
|
||||
defaultResyncDuration = 5 * time.Second
|
||||
)
|
||||
|
||||
var defaultDeleteOptions = newDefaultDeleteOptions()
|
||||
@@ -249,8 +251,7 @@ func (e *kube) WaitStep(ctx context.Context, step *types.Step, taskUUID string)
|
||||
}
|
||||
}
|
||||
|
||||
// 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 := informers.NewSharedInformerFactoryWithOptions(e.client, defaultResyncDuration, informers.WithNamespace(e.config.Namespace))
|
||||
if _, err := si.Core().V1().Pods().Informer().AddEventHandler(
|
||||
cache.ResourceEventHandlerFuncs{
|
||||
UpdateFunc: podUpdated,
|
||||
@@ -322,8 +323,7 @@ func (e *kube) TailStep(ctx context.Context, step *types.Step, taskUUID string)
|
||||
}
|
||||
}
|
||||
|
||||
// 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 := informers.NewSharedInformerFactoryWithOptions(e.client, defaultResyncDuration, informers.WithNamespace(e.config.Namespace))
|
||||
if _, err := si.Core().V1().Pods().Informer().AddEventHandler(
|
||||
cache.ResourceEventHandlerFuncs{
|
||||
UpdateFunc: podUpdated,
|
||||
|
Reference in New Issue
Block a user