func NewParser(r resolver.Resolver) parser.IngressAnnotation {
	return ipwhitelist{r}
}
NewParser creates a new whitelist annotation parser
package ipwhitelist
import (
	"sort"
	"strings"
	"github.com/pkg/errors"
	"github.com/NCCloud/fluid/internal/net"
	extensions "k8s.io/api/extensions/v1beta1"
	"github.com/NCCloud/fluid/internal/ingress/annotations/parser"
	ing_errors "github.com/NCCloud/fluid/internal/ingress/errors"
	"github.com/NCCloud/fluid/internal/ingress/resolver"
)
type SourceRange struct {
	CIDR []string `json:"cidr,omitempty"`
}
func (sr1 *SourceRange) Equal(sr2 *SourceRange) bool {
	if sr1 == sr2 {
		return true
	}
	if sr1 == nil || sr2 == nil {
		return false
	}
	if len(sr1.CIDR) != len(sr2.CIDR) {
		return false
	}
	for _, s1l := range sr1.CIDR {
		found := false
		for _, sl2 := range sr2.CIDR {
			if s1l == sl2 {
				found = true
				break
			}
		}
		if !found {
			return false
		}
	}
	return true
}
type ipwhitelist struct {
	r resolver.Resolver
}