INNER CODE UNIT · Go

setupChainedPlugin

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

func setupChainedPlugin(ctx context.Context, mountedCniNetDir, cniConfName, kumaCniConfig string) error {
	extension := filepath.Ext(cniConfName)
	pathConf := filepath.Join(mountedCniNetDir, cniConfName)
	pathConflist := filepath.Join(mountedCniNetDir, cniConfName+"list")

	resolvedName := cniConfName
	if !files.FileExists(pathConf) && extension == ".conf" && files.FileExists(pathConflist) {
		resolvedName = cniConfName + "list"
	}

	cniConfPath := filepath.Join(mountedCniNetDir, resolvedName)

	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
		}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…