Merge pull request #84971 from robscott/endpointslice-iptypes
Splitting IP address type into IPv4 and IPv6 for EndpointSlices Kubernetes-commit: c5609071d805036b251f22ce122bbf13ca94bff7
This commit is contained in:
commit
b031036a44
|
@ -592,11 +592,11 @@
|
|||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api",
|
||||
"Rev": "bfea6b930ba5"
|
||||
"Rev": "40f4bbc2b486"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery",
|
||||
"Rev": "46fc763c3981"
|
||||
"Rev": "3db02fd2eea7"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/cli-runtime",
|
||||
|
|
8
go.mod
8
go.mod
|
@ -36,8 +36,8 @@ require (
|
|||
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456
|
||||
gopkg.in/yaml.v2 v2.2.4
|
||||
gotest.tools v2.2.0+incompatible // indirect
|
||||
k8s.io/api v0.0.0-20191114100033-bfea6b930ba5
|
||||
k8s.io/apimachinery v0.0.0-20191114095528-46fc763c3981
|
||||
k8s.io/api v0.0.0-20191114100036-40f4bbc2b486
|
||||
k8s.io/apimachinery v0.0.0-20191114095528-3db02fd2eea7
|
||||
k8s.io/cli-runtime v0.0.0-20191114105952-7b87a9605630
|
||||
k8s.io/client-go v0.0.0-20191114100700-74d7a2e0ebca
|
||||
k8s.io/component-base v0.0.0-20191114102134-93d53c1bdbbd
|
||||
|
@ -53,8 +53,8 @@ require (
|
|||
replace (
|
||||
golang.org/x/sys => golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a
|
||||
golang.org/x/tools => golang.org/x/tools v0.0.0-20190821162956-65e3620a7ae7
|
||||
k8s.io/api => k8s.io/api v0.0.0-20191114100033-bfea6b930ba5
|
||||
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20191114095528-46fc763c3981
|
||||
k8s.io/api => k8s.io/api v0.0.0-20191114100036-40f4bbc2b486
|
||||
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20191114095528-3db02fd2eea7
|
||||
k8s.io/cli-runtime => k8s.io/cli-runtime v0.0.0-20191114105952-7b87a9605630
|
||||
k8s.io/client-go => k8s.io/client-go v0.0.0-20191114100700-74d7a2e0ebca
|
||||
k8s.io/code-generator => k8s.io/code-generator v0.0.0-20191109100332-a9a0d9c0b3aa
|
||||
|
|
4
go.sum
4
go.sum
|
@ -316,8 +316,8 @@ gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
|
|||
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
k8s.io/api v0.0.0-20191114100033-bfea6b930ba5/go.mod h1:J3f3O6tWqxQZx55pJVnBWTkeC85oPosnzvvsKzJ0fwg=
|
||||
k8s.io/apimachinery v0.0.0-20191114095528-46fc763c3981/go.mod h1:+6CX7hP4aLfX2sb91JYDMIp0VqDSog2kZu0BHe+lP+s=
|
||||
k8s.io/api v0.0.0-20191114100036-40f4bbc2b486/go.mod h1:IM5ceavki8HjRhUlaRYP3oGw0J/hbXKiKiSqS5AR728=
|
||||
k8s.io/apimachinery v0.0.0-20191114095528-3db02fd2eea7/go.mod h1:+6CX7hP4aLfX2sb91JYDMIp0VqDSog2kZu0BHe+lP+s=
|
||||
k8s.io/cli-runtime v0.0.0-20191114105952-7b87a9605630/go.mod h1:reOVNGV6gGhkgMHuJnmeiEqRL3z49lQEGo8E5CGlAic=
|
||||
k8s.io/client-go v0.0.0-20191114100700-74d7a2e0ebca/go.mod h1:NWDcvX+oAkmke5fjHiErMvbgGGoaHcZcxGNYutZ3MtQ=
|
||||
k8s.io/code-generator v0.0.0-20191109100332-a9a0d9c0b3aa/go.mod h1:fRFrKVixH946mn5PeglV2fvxbE86JesGi16bsWZ1xz4=
|
||||
|
|
|
@ -2644,11 +2644,7 @@ func describeEndpointSlice(eps *discoveryv1alpha1.EndpointSlice, events *corev1.
|
|||
printLabelsMultiline(w, "Labels", eps.Labels)
|
||||
printAnnotationsMultiline(w, "Annotations", eps.Annotations)
|
||||
|
||||
addressType := "<unset>"
|
||||
if eps.AddressType != nil {
|
||||
addressType = string(*eps.AddressType)
|
||||
}
|
||||
w.Write(LEVEL_0, "AddressType:\t%s\n", addressType)
|
||||
w.Write(LEVEL_0, "AddressType:\t%s\n", string(eps.AddressType))
|
||||
|
||||
if len(eps.Ports) == 0 {
|
||||
w.Write(LEVEL_0, "Ports: <unset>\n")
|
||||
|
|
|
@ -3516,7 +3516,6 @@ func TestDescribeStatefulSet(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestDescribeEndpointSlice(t *testing.T) {
|
||||
addressTypeIP := discoveryv1alpha1.AddressTypeIP
|
||||
protocolTCP := corev1.ProtocolTCP
|
||||
port80 := int32(80)
|
||||
|
||||
|
@ -3525,7 +3524,7 @@ func TestDescribeEndpointSlice(t *testing.T) {
|
|||
Name: "foo.123",
|
||||
Namespace: "bar",
|
||||
},
|
||||
AddressType: &addressTypeIP,
|
||||
AddressType: discoveryv1alpha1.AddressTypeIPv4,
|
||||
Endpoints: []discoveryv1alpha1.Endpoint{
|
||||
{
|
||||
Addresses: []string{"1.2.3.4", "1.2.3.5"},
|
||||
|
@ -3564,7 +3563,7 @@ func TestDescribeEndpointSlice(t *testing.T) {
|
|||
Namespace: bar
|
||||
Labels: <none>
|
||||
Annotations: <none>
|
||||
AddressType: IP
|
||||
AddressType: IPv4
|
||||
Ports:
|
||||
Name Port Protocol
|
||||
---- ---- --------
|
||||
|
|
Loading…
Reference in New Issue