From 5b86ee1c8223a20a8157080dd545358696aae119 Mon Sep 17 00:00:00 2001 From: Lantao Liu Date: Thu, 7 Feb 2019 18:37:59 -0800 Subject: [PATCH] Clarify hostname emptiness in CRI. --- pkg/kubelet/apis/cri/runtime/v1alpha2/api.pb.go | 3 ++- pkg/kubelet/apis/cri/runtime/v1alpha2/api.proto | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/kubelet/apis/cri/runtime/v1alpha2/api.pb.go b/pkg/kubelet/apis/cri/runtime/v1alpha2/api.pb.go index bb29c29521..fbb1510197 100644 --- a/pkg/kubelet/apis/cri/runtime/v1alpha2/api.pb.go +++ b/pkg/kubelet/apis/cri/runtime/v1alpha2/api.pb.go @@ -736,7 +736,8 @@ type PodSandboxConfig struct { // operation. The runtime may also use this information to improve UX, such // as by constructing a readable name. Metadata *PodSandboxMetadata `protobuf:"bytes,1,opt,name=metadata" json:"metadata,omitempty"` - // Hostname of the sandbox. + // Hostname of the sandbox. Hostname could only be empty when the pod + // network namespace is NODE. Hostname string `protobuf:"bytes,2,opt,name=hostname,proto3" json:"hostname,omitempty"` // Path to the directory on the host in which container log files are // stored. diff --git a/pkg/kubelet/apis/cri/runtime/v1alpha2/api.proto b/pkg/kubelet/apis/cri/runtime/v1alpha2/api.proto index f68ca9f050..0aac013993 100644 --- a/pkg/kubelet/apis/cri/runtime/v1alpha2/api.proto +++ b/pkg/kubelet/apis/cri/runtime/v1alpha2/api.proto @@ -313,7 +313,8 @@ message PodSandboxConfig { // operation. The runtime may also use this information to improve UX, such // as by constructing a readable name. PodSandboxMetadata metadata = 1; - // Hostname of the sandbox. + // Hostname of the sandbox. Hostname could only be empty when the pod + // network namespace is NODE. string hostname = 2; // Path to the directory on the host in which container log files are // stored.