mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
cli: increase kubecmd retry limit (#2500)
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
a1b4db4175
commit
d218f296ad
@ -52,7 +52,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
maxRetryAttempts = 5
|
||||
maxRetryAttempts = 20
|
||||
)
|
||||
|
||||
// ErrInProgress signals that an upgrade is in progress inside the cluster.
|
||||
@ -231,7 +231,7 @@ func (k *KubeCmd) ApplyJoinConfig(ctx context.Context, newAttestConfig config.At
|
||||
}
|
||||
retries++
|
||||
k.log.Debugf("Getting join-config ConfigMap failed (attempt %d/%d): %s", retries, maxRetryAttempts, err)
|
||||
return retries <= maxRetryAttempts
|
||||
return retries < maxRetryAttempts
|
||||
}
|
||||
|
||||
var joinConfig *corev1.ConfigMap
|
||||
@ -488,7 +488,7 @@ func retryAction(ctx context.Context, retryInterval time.Duration, maxRetries in
|
||||
retrier := conretry.NewIntervalRetrier(&kubeDoer{action: action}, retryInterval, func(err error) bool {
|
||||
ctr++
|
||||
log.Debugf("Action failed (attempt %d/%d): %s", ctr, maxRetries, err)
|
||||
return ctr <= maxRetries
|
||||
return ctr < maxRetries
|
||||
})
|
||||
return retrier.Do(ctx)
|
||||
}
|
||||
|
@ -484,7 +484,7 @@ func TestApplyJoinConfig(t *testing.T) {
|
||||
// be updated here
|
||||
repeatedErrors := func(err error) []error {
|
||||
var errs []error
|
||||
for i := 0; i < 20; i++ {
|
||||
for i := 0; i < 30; i++ {
|
||||
errs = append(errs, err)
|
||||
}
|
||||
return errs
|
||||
|
Loading…
Reference in New Issue
Block a user