apiserver endpoint reconciler ip families
The apiserver may be configured to generate the Service kubernetes.default and its endpoints addresses. This service is single-stack, hence, the endpoints and the ClusterIP must have the same IP family.
This commit is contained in:
@@ -270,6 +270,8 @@ func TestCreateServiceDualStackIPv6(t *testing.T) {
|
||||
t.Fatalf("bad cidr: %v", err)
|
||||
}
|
||||
cfg.ExtraConfig.ServiceIPRange = *cidr
|
||||
cfg.GenericConfig.PublicAddress = netutils.ParseIPSloppy("2001:db8::10")
|
||||
|
||||
_, s, closeFn := framework.RunAnAPIServer(cfg)
|
||||
defer closeFn()
|
||||
|
||||
@@ -715,6 +717,7 @@ func TestCreateServiceDualStackIPv6IPv4(t *testing.T) {
|
||||
t.Fatalf("bad cidr: %v", err)
|
||||
}
|
||||
cfg.ExtraConfig.ServiceIPRange = *cidr
|
||||
cfg.GenericConfig.PublicAddress = netutils.ParseIPSloppy("2001:db8::10")
|
||||
|
||||
_, secCidr, err := netutils.ParseCIDRSloppy(secondaryServiceCIDR)
|
||||
if err != nil {
|
||||
|
@@ -325,7 +325,8 @@ func NewControlPlaneConfigWithOptions(opts *ControlPlaneConfigOptions) *controlp
|
||||
|
||||
// TODO: get rid of these tests or port them to secure serving
|
||||
genericConfig.SecureServing = &genericapiserver.SecureServingInfo{Listener: fakeLocalhost443Listener{}}
|
||||
|
||||
// if using endpoint reconciler the service subnet IP family must match the Public address
|
||||
genericConfig.PublicAddress = netutils.ParseIPSloppy("10.1.1.1")
|
||||
err = etcdOptions.ApplyWithStorageFactoryTo(storageFactory, genericConfig)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
Reference in New Issue
Block a user