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 22c9c011ca7..0e151bc3e88 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 @@ -555,7 +555,16 @@ type PortMapping struct { Protocol Protocol `protobuf:"varint,1,opt,name=protocol,proto3,enum=runtime.v1.Protocol" json:"protocol,omitempty"` // Port number within the container. Default: 0 (not specified). ContainerPort int32 `protobuf:"varint,2,opt,name=container_port,json=containerPort,proto3" json:"container_port,omitempty"` - // Port number on the host. Default: 0 (not specified). + // Port number on the host to map the container port to. + // + // - Valid host port range is 1-65535. + // - The value 0 has explicit semantic meaning: it indicates NO host port should be allocated. + // - The value 0 does NOT indicate dynamic port allocation. Future implementations + // of dynamic allocation will use different values/semantics. + // - Implementations MUST handle the case where this field is explicitly set to 0, + // This field SHOULD be omitted when no port is required. + // + // Default: If omitted, container port will not be exposed on the host. HostPort int32 `protobuf:"varint,3,opt,name=host_port,json=hostPort,proto3" json:"host_port,omitempty"` // Host IP. HostIp string `protobuf:"bytes,4,opt,name=host_ip,json=hostIp,proto3" json:"host_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 a19133001d0..78398a6163a 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 @@ -201,7 +201,16 @@ message PortMapping { Protocol protocol = 1; // Port number within the container. Default: 0 (not specified). int32 container_port = 2; - // Port number on the host. Default: 0 (not specified). + // Port number on the host to map the container port to. + // + // * Valid host port range is 1-65535. + // * The value 0 has explicit semantic meaning: it indicates NO host port should be allocated. + // * The value 0 does NOT indicate dynamic port allocation. Future implementations + // of dynamic allocation will use different values/semantics. + // * Implementations MUST handle the case where this field is explicitly set to 0, + // This field SHOULD be omitted when no port is required. + // + // Default: If omitted, container port will not be exposed on the host. int32 host_port = 3; // Host IP. string host_ip = 4;