network
Schema Networkโ
Network defines the exposed port of Service, which can be used to describe how the Service
get accessed.
Attributesโ
| name | type | description | default value | 
|---|---|---|---|
| ports | [Port] | The list of ports which the Workload should get exposed. | 
Examplesโ
import network as n
"network": n.Network {
    ports: [
        n.Port {
            port: 80
            public: True
        }
    ]
}
Schema Portโ
Port defines the exposed port of Workload, which can be used to describe how the Workload get accessed.
| name | type | description | default value | 
|---|---|---|---|
| port required | int | The exposed port of the Workload. | 80 | 
| protocol required | "TCP" | "UDP" | The protocol to access the port. | 
| public required | bool | Public defines whether the port can be accessed through Internet. | False | 
| targetPort | int | The backend container port. If empty, set it the same as the port. | 
Examplesโ
import network as n
port = n.Port {
    port: 80
    targetPort: 8080
    protocol: "TCP"
    public: True
}