Skip to content

Commit b669e6c

Browse files
authored
Merge pull request kubernetes#130512 from HirazawaUi/Clarify-cri-fields
Clarify the behavior when the host_port value is set to 0 in CRI
2 parents 0556b20 + d5c0721 commit b669e6c

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.pb.go

Lines changed: 10 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.proto

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,16 @@ message PortMapping {
201201
Protocol protocol = 1;
202202
// Port number within the container. Default: 0 (not specified).
203203
int32 container_port = 2;
204-
// Port number on the host. Default: 0 (not specified).
204+
// Port number on the host to map the container port to.
205+
//
206+
// * Valid host port range is 1-65535.
207+
// * The value 0 has explicit semantic meaning: it indicates NO host port should be allocated.
208+
// * The value 0 does NOT indicate dynamic port allocation. Future implementations
209+
// of dynamic allocation will use different values/semantics.
210+
// * Implementations MUST handle the case where this field is explicitly set to 0,
211+
// This field SHOULD be omitted when no port is required.
212+
//
213+
// Default: If omitted, container port will not be exposed on the host.
205214
int32 host_port = 3;
206215
// Host IP.
207216
string host_ip = 4;

0 commit comments

Comments
 (0)