mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 21:47:07 +00:00
Merge pull request #12831 from thockin/nodeport-optional
Make nodePort optional in v1 API
This commit is contained in:
commit
736945faba
@ -13446,8 +13446,7 @@
|
|||||||
"v1.ServicePort": {
|
"v1.ServicePort": {
|
||||||
"id": "v1.ServicePort",
|
"id": "v1.ServicePort",
|
||||||
"required": [
|
"required": [
|
||||||
"port",
|
"port"
|
||||||
"nodePort"
|
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"name": {
|
"name": {
|
||||||
|
@ -1178,7 +1178,7 @@ type ServicePort struct {
|
|||||||
|
|
||||||
// The port on each node on which this service is exposed.
|
// The port on each node on which this service is exposed.
|
||||||
// Default is to auto-allocate a port if the ServiceType of this Service requires one.
|
// Default is to auto-allocate a port if the ServiceType of this Service requires one.
|
||||||
NodePort int `json:"nodePort" description:"the port on each node on which this service is exposed when type=NodePort or LoadBalancer; usually assigned by the system; if specified, it will be allocated to the service if unused or else creation of the service will fail; see http://releases.k8s.io/HEAD/docs/user-guide/services.md#type--nodeport"`
|
NodePort int `json:"nodePort,omitempty" description:"the port on each node on which this service is exposed when type=NodePort or LoadBalancer; usually assigned by the system; if specified, it will be allocated to the service if unused or else creation of the service will fail; see http://releases.k8s.io/HEAD/docs/user-guide/services.md#type--nodeport"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Service is a named abstraction of software service (for example, mysql) consisting of local port
|
// Service is a named abstraction of software service (for example, mysql) consisting of local port
|
||||||
|
Loading…
Reference in New Issue
Block a user