mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 03:03:59 +00:00
Remove providerless tag in controller_test.go
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
parent
e25e1d39bd
commit
b7012da2ad
@ -22,6 +22,8 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"k8s.io/kubernetes/pkg/controller/nodeipam/ipam/cidrset"
|
||||||
|
|
||||||
v1 "k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/apimachinery/pkg/fields"
|
"k8s.io/apimachinery/pkg/fields"
|
||||||
@ -160,3 +162,14 @@ func ipnetToStringList(inCIDRs []*net.IPNet) []string {
|
|||||||
}
|
}
|
||||||
return outCIDRs
|
return outCIDRs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// occupyServiceCIDR removes the service CIDR range from the cluster CIDR if it
|
||||||
|
// intersects.
|
||||||
|
func occupyServiceCIDR(set *cidrset.CidrSet, clusterCIDR, serviceCIDR *net.IPNet) error {
|
||||||
|
if clusterCIDR.Contains(serviceCIDR.IP) || serviceCIDR.Contains(clusterCIDR.IP) {
|
||||||
|
if err := set.Occupy(serviceCIDR); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
@ -165,17 +165,6 @@ func (c *Controller) Run(ctx context.Context) {
|
|||||||
<-ctx.Done()
|
<-ctx.Done()
|
||||||
}
|
}
|
||||||
|
|
||||||
// occupyServiceCIDR removes the service CIDR range from the cluster CIDR if it
|
|
||||||
// intersects.
|
|
||||||
func occupyServiceCIDR(set *cidrset.CidrSet, clusterCIDR, serviceCIDR *net.IPNet) error {
|
|
||||||
if clusterCIDR.Contains(serviceCIDR.IP) || serviceCIDR.Contains(clusterCIDR.IP) {
|
|
||||||
if err := set.Occupy(serviceCIDR); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
type nodeState struct {
|
type nodeState struct {
|
||||||
t Timeout
|
t Timeout
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
//go:build !providerless
|
|
||||||
// +build !providerless
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2017 The Kubernetes Authors.
|
Copyright 2017 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user