Skip to content

Commit

Permalink
KUBE-515: fix retry duration (#133)
Browse files Browse the repository at this point in the history
* nojira: fix retry duration by default and for get node
  • Loading branch information
ValyaB authored Aug 30, 2024
1 parent 0b42dac commit ef7a1d6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions actions/approve_csr_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ func TestApproveCSRHandler(t *testing.T) {
h := &approveCSRHandler{
log: log,
clientset: client,
csrFetchInterval: 100 * time.Millisecond,
initialCSRFetchTimeout: 1000 * time.Millisecond,
csrFetchInterval: 500 * time.Millisecond,
initialCSRFetchTimeout: 5000 * time.Millisecond,
}

ctx := context.Background()
Expand Down
1 change: 1 addition & 0 deletions actions/kubernetes_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ func getNodeForPatching(ctx context.Context, log logrus.FieldLogger, clientset k
var node *v1.Node

boff := waitext.DefaultExponentialBackoff()
boff.Duration = 5 * time.Second

err := waitext.Retry(
ctx,
Expand Down
2 changes: 1 addition & 1 deletion waitext/extensions.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

const (
defaultInitialInterval = 500 * time.Millisecond
defaultInitialInterval = 1 * time.Second
defaultRandomizationFactor = 0.5
defaultMultiplier = 1.5
defaultMaxInterval = 60 * time.Second
Expand Down

0 comments on commit ef7a1d6

Please sign in to comment.