INNER CODE UNIT · Go

backoff

kumahq/kuma · app/cni/pkg/install/main.go:141

	backoff := retry.WithMaxDuration(5*time.Minute, retry.NewConstant(time.Second))
	err := retry.Do(ctx, backoff, func(ctx context.Context) error {
		if files.FileExists(cniConfPath) {
			return nil
		}

		err := errors.Errorf("cni config '%s' not found", cniConfPath)
		log.Error(err, "error chaining CNI config, retrying...")
		return retry.RetryableError(err)
	})
	if err != nil {
		return errors.Wrap(err, "failed to ensure CNI config presence")
	}

	hostCniConfig, err := os.ReadFile(cniConfPath)
	if err != nil {
		return errors.Wrap(err, "failed to read CNI config file")
	}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…