func (i *IndexSyncer) Start(stop <-chan struct{}) error {
	return wait.PollUntil(time.Second*time.Duration(i.interval),
		func() (done bool, err error) {
			klog.V(4).Info("update helm repo index")
			err = initReposIndex()
			if err != nil {
				klog.Error("update helm repo index error: ", err)
			}
			return false, nil
		},
		stop,
	)
}
Start will refresh the repo index periodically
package helm
import (
	"time"
	"helm.sh/helm/v3/pkg/repo"
	"k8s.io/apimachinery/pkg/util/wait"
	"k8s.io/klog"
)
var (
	defaultInterval = 30
)
type IndexSyncer struct {
	interval int
}
func NewDefaultIndexSyncer() *IndexSyncer {
	return &IndexSyncer{
		interval: defaultInterval,
	}
}