func (_ IPPool) APIV1ToBackendV1(rIn unversioned.Resource) (*model.KVPair, error) {
	p := rIn.(*apiv1.IPPool)
	var ipipInterface string
	var ipipMode encap.Mode
	if p.Spec.IPIP != nil {
		if p.Spec.IPIP.Enabled {
			ipipInterface = "tunl0"
		} else {
			ipipInterface = ""
		}
		ipipMode = p.Spec.IPIP.Mode
	}
	d := model.KVPair{
		Key: model.IPPoolKey{
			CIDR: p.Metadata.CIDR,
		},
		Value: &model.IPPool{
			CIDR:          p.Metadata.CIDR,
			IPIPInterface: ipipInterface,
			IPIPMode:      ipipMode,
			Masquerade:    p.Spec.NATOutgoing,
			IPAM:          !p.Spec.Disabled,
			Disabled:      p.Spec.Disabled,
		},
	}
	return &d, nil
}
APIV1ToBackendV1 converts v1 IPPool API to v1 IPPool KVPair.
package converters
import (
	"fmt"
	"strings"
	apiv3 "github.com/projectcalico/api/pkg/apis/projectcalico/v3"
	apiv1 "github.com/projectcalico/libcalico-go/lib/apis/v1"
	"github.com/projectcalico/libcalico-go/lib/apis/v1/unversioned"
	"github.com/projectcalico/libcalico-go/lib/backend/encap"
	"github.com/projectcalico/libcalico-go/lib/backend/model"
	"github.com/projectcalico/libcalico-go/lib/names"
)
type IPPool struct{}