Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extra explanation of the purpose of service's ContainerPort field to the API comments. #4371

Merged
merged 1 commit into from
Feb 12, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions pkg/api/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -710,8 +710,9 @@ type ServiceSpec struct {
// PublicIPs are used by external load balancers.
PublicIPs []string `json:"publicIPs,omitempty"`

// ContainerPort is the name of the port on the container to direct traffic to.
// Optional, if unspecified use the first port on the container.
// ContainerPort is the name or number of the port on the container to direct traffic to.
// This is useful if the containers the service points to have multiple open ports.
// Optional: If unspecified, the first port on the container will be used.
ContainerPort util.IntOrString `json:"containerPort,omitempty"`

// Optional: Supports "ClientIP" and "None". Used to maintain session affinity.
Expand Down
7 changes: 4 additions & 3 deletions pkg/api/v1beta1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -573,9 +573,10 @@ type Service struct {
// PublicIPs are used by external load balancers.
PublicIPs []string `json:"publicIPs,omitempty" description:"externally visible IPs from which to select the address for the external load balancer"`

// ContainerPort is the name of the port on the container to direct traffic to.
// Optional, if unspecified use the first port on the container.
ContainerPort util.IntOrString `json:"containerPort,omitempty" description:"number or name of the port to access on the containers belonging to pods targeted by the service"`
// ContainerPort is the name or number of the port on the container to direct traffic to.
// This is useful if the containers the service points to have multiple open ports.
// Optional: If unspecified, the first port on the container will be used.
ContainerPort util.IntOrString `json:"containerPort,omitempty" description:"number or name of the port to access on the containers belonging to pods targeted by the service; defaults to the container's first open port"`

// PortalIP is usually assigned by the master. If specified by the user
// we will try to respect it or else fail the request. This field can
Expand Down
7 changes: 4 additions & 3 deletions pkg/api/v1beta2/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -537,9 +537,10 @@ type Service struct {
// PublicIPs are used by external load balancers.
PublicIPs []string `json:"publicIPs,omitempty" description:"externally visible IPs from which to select the address for the external load balancer"`

// ContainerPort is the name of the port on the container to direct traffic to.
// Optional, if unspecified use the first port on the container.
ContainerPort util.IntOrString `json:"containerPort,omitempty" description:"number or name of the port to access on the containers belonging to pods targeted by the service"`
// ContainerPort is the name or number of the port on the container to direct traffic to.
// This is useful if the containers the service points to have multiple open ports.
// Optional: If unspecified, the first port on the container will be used.
ContainerPort util.IntOrString `json:"containerPort,omitempty" description:"number or name of the port to access on the containers belonging to pods targeted by the service; defaults to the container's first open port"`

// PortalIP is usually assigned by the master. If specified by the user
// we will try to respect it or else fail the request. This field can
Expand Down
5 changes: 3 additions & 2 deletions pkg/api/v1beta3/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -734,8 +734,9 @@ type ServiceSpec struct {
// PublicIPs are used by external load balancers.
PublicIPs []string `json:"publicIPs,omitempty"`

// ContainerPort is the name of the port on the container to direct traffic to.
// Optional, if unspecified use the first port on the container.
// ContainerPort is the name or number of the port on the container to direct traffic to.
// This is useful if the containers the service points to have multiple open ports.
// Optional: If unspecified, the first port on the container will be used.
ContainerPort util.IntOrString `json:"containerPort,omitempty"`

// Optional: Supports "ClientIP" and "None". Used to maintain session affinity.
Expand Down