From bc8e7ac1a0daca13b8c464f14ace7e3d5c610ce8 Mon Sep 17 00:00:00 2001 From: Antonio Ojea Date: Mon, 29 Nov 2021 16:07:18 +0100 Subject: [PATCH] ignore CRI PodSandboxNetworkStatus for host network pods --- pkg/kubelet/kubelet_pods_test.go | 1 + staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.pb.go | 1 + staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.proto | 1 + staging/src/k8s.io/cri-api/pkg/apis/runtime/v1alpha2/api.pb.go | 1 + staging/src/k8s.io/cri-api/pkg/apis/runtime/v1alpha2/api.proto | 1 + 5 files changed, 5 insertions(+) diff --git a/pkg/kubelet/kubelet_pods_test.go b/pkg/kubelet/kubelet_pods_test.go index 78263de16e9..02006e51a92 100644 --- a/pkg/kubelet/kubelet_pods_test.go +++ b/pkg/kubelet/kubelet_pods_test.go @@ -3284,6 +3284,7 @@ func TestGenerateAPIPodStatusHostNetworkPodIPs(t *testing.T) { criPodIPs: []string{"192.168.0.1"}, podIPs: []v1.PodIP{ {IP: "192.168.0.1"}, + {IP: "fd01::1234"}, }, }, { diff --git a/staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.pb.go b/staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.pb.go index f8762ae63a0..998673fc923 100644 --- a/staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.pb.go +++ b/staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.pb.go @@ -1608,6 +1608,7 @@ func (m *PodIP) GetIp() string { } // PodSandboxNetworkStatus is the status of the network for a PodSandbox. +// Currently ignored for pods sharing the host networking namespace. type PodSandboxNetworkStatus struct { // IP address of the PodSandbox. Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` diff --git a/staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.proto b/staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.proto index 8f96c97ebc6..43bca464dab 100644 --- a/staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.proto +++ b/staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.proto @@ -445,6 +445,7 @@ message PodIP{ string ip = 1; } // PodSandboxNetworkStatus is the status of the network for a PodSandbox. +// Currently ignored for pods sharing the host networking namespace. message PodSandboxNetworkStatus { // IP address of the PodSandbox. string ip = 1; diff --git a/staging/src/k8s.io/cri-api/pkg/apis/runtime/v1alpha2/api.pb.go b/staging/src/k8s.io/cri-api/pkg/apis/runtime/v1alpha2/api.pb.go index dd1d1d84e93..c333e73c9d5 100644 --- a/staging/src/k8s.io/cri-api/pkg/apis/runtime/v1alpha2/api.pb.go +++ b/staging/src/k8s.io/cri-api/pkg/apis/runtime/v1alpha2/api.pb.go @@ -1613,6 +1613,7 @@ func (m *PodIP) GetIp() string { } // PodSandboxNetworkStatus is the status of the network for a PodSandbox. +// Currently ignored for pods sharing the host networking namespace. type PodSandboxNetworkStatus struct { // IP address of the PodSandbox. Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` diff --git a/staging/src/k8s.io/cri-api/pkg/apis/runtime/v1alpha2/api.proto b/staging/src/k8s.io/cri-api/pkg/apis/runtime/v1alpha2/api.proto index ba3230d183b..19ec2e7871c 100644 --- a/staging/src/k8s.io/cri-api/pkg/apis/runtime/v1alpha2/api.proto +++ b/staging/src/k8s.io/cri-api/pkg/apis/runtime/v1alpha2/api.proto @@ -449,6 +449,7 @@ message PodIP{ string ip = 1; } // PodSandboxNetworkStatus is the status of the network for a PodSandbox. +// Currently ignored for pods sharing the host networking namespace. message PodSandboxNetworkStatus { // IP address of the PodSandbox. string ip = 1;