cleanup: clarify the meaning when the port of mcs is empty

Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
This commit is contained in:
chaunceyjiang 2023-07-11 10:58:39 +08:00
parent 3766b8e1a0
commit e4adcbe084
4 changed files with 9 additions and 5 deletions

View File

@ -61,6 +61,8 @@ spec:
description: Port specifies the exposed service port.
format: int32
type: integer
required:
- port
type: object
type: array
range:

View File

@ -128,8 +128,8 @@ type ExposurePort struct {
Name string `json:"name,omitempty"`
// Port specifies the exposed service port.
// +optional
Port int32 `json:"port,omitempty"`
// +required
Port int32 `json:"port"`
}
// ExposureRange describes a list of clusters where the service is exposed.
@ -174,7 +174,7 @@ spec:
ports:
- port: 80
types:
- LoadBalance
- LoadBalancer
```
![image](statics/service-exposure.png)

View File

@ -72,8 +72,8 @@ type ExposurePort struct {
Name string `json:"name,omitempty"`
// Port specifies the exposed service port.
// +optional
Port int32 `json:"port,omitempty"`
// +required
Port int32 `json:"port"`
}
// ExposureRange describes a list of clusters where the service is exposed.

View File

@ -2641,11 +2641,13 @@ func schema_pkg_apis_networking_v1alpha1_ExposurePort(ref common.ReferenceCallba
"port": {
SchemaProps: spec.SchemaProps{
Description: "Port specifies the exposed service port.",
Default: 0,
Type: []string{"integer"},
Format: "int32",
},
},
},
Required: []string{"port"},
},
},
}