Este contenido no está disponible en el idioma seleccionado.
Chapter 12. EgressRouter [network.operator.openshift.io/v1]
- Description
- EgressRouter is a feature allowing the user to define an egress router that acts as a bridge between pods and external systems. The egress router runs a service that redirects egress traffic originating from a pod or a group of pods to a remote external system or multiple destinations as per configuration. It is consumed by the cluster-network-operator. More specifically, given an EgressRouter CR with <name>, the CNO will create and manage: - A service called <name> - An egress pod called <name> - A NAD called <name> Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). EgressRouter is a single egressrouter pod configuration object.
- Type
-
object
- Required
-
spec
-
12.1. Specification
Property | Type | Description |
---|---|---|
|
| APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
|
| Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
| Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata | |
|
| Specification of the desired egress router. |
|
| Observed status of EgressRouter. |
12.1.1. .spec
- Description
- Specification of the desired egress router.
- Type
-
object
- Required
-
addresses
-
mode
-
networkInterface
-
Property | Type | Description |
---|---|---|
|
| List of IP addresses to configure on the pod’s secondary interface. |
|
| EgressRouterAddress contains a pair of IP CIDR and gateway to be configured on the router’s interface |
|
| Mode depicts the mode that is used for the egress router. The default mode is "Redirect" and is the only supported mode currently. |
|
| Specification of interface to create/use. The default is macvlan. Currently only macvlan is supported. |
|
| Redirect represents the configuration parameters specific to redirect mode. |
12.1.2. .spec.addresses
- Description
- List of IP addresses to configure on the pod’s secondary interface.
- Type
-
array
12.1.3. .spec.addresses[]
- Description
- EgressRouterAddress contains a pair of IP CIDR and gateway to be configured on the router’s interface
- Type
-
object
- Required
-
ip
-
Property | Type | Description |
---|---|---|
|
| IP address of the next-hop gateway, if it cannot be automatically determined. Can be IPv4 or IPv6. |
|
| IP is the address to configure on the router’s interface. Can be IPv4 or IPv6. |
12.1.4. .spec.networkInterface
- Description
- Specification of interface to create/use. The default is macvlan. Currently only macvlan is supported.
- Type
-
object
Property | Type | Description |
---|---|---|
|
| Arguments specific to the interfaceType macvlan |
12.1.5. .spec.networkInterface.macvlan
- Description
- Arguments specific to the interfaceType macvlan
- Type
-
object
- Required
-
mode
-
Property | Type | Description |
---|---|---|
|
| Name of the master interface. Need not be specified if it can be inferred from the IP address. |
|
| Mode depicts the mode that is used for the macvlan interface; one of Bridge|Private|VEPA|Passthru. The default mode is "Bridge". |
12.1.6. .spec.redirect
- Description
- Redirect represents the configuration parameters specific to redirect mode.
- Type
-
object
Property | Type | Description |
---|---|---|
|
| FallbackIP specifies the remote destination’s IP address. Can be IPv4 or IPv6. If no redirect rules are specified, all traffic from the router are redirected to this IP. If redirect rules are specified, then any connections on any other port (undefined in the rules) on the router will be redirected to this IP. If redirect rules are specified and no fallback IP is provided, connections on other ports will simply be rejected. |
|
| List of L4RedirectRules that define the DNAT redirection from the pod to the destination in redirect mode. |
|
| L4RedirectRule defines a DNAT redirection from a given port to a destination IP and port. |
12.1.7. .spec.redirect.redirectRules
- Description
- List of L4RedirectRules that define the DNAT redirection from the pod to the destination in redirect mode.
- Type
-
array
12.1.8. .spec.redirect.redirectRules[]
- Description
- L4RedirectRule defines a DNAT redirection from a given port to a destination IP and port.
- Type
-
object
- Required
-
destinationIP
-
port
-
protocol
-
Property | Type | Description |
---|---|---|
|
| IP specifies the remote destination’s IP address. Can be IPv4 or IPv6. |
|
| Port is the port number to which clients should send traffic to be redirected. |
|
| Protocol can be TCP, SCTP or UDP. |
|
| TargetPort allows specifying the port number on the remote destination to which the traffic gets redirected to. If unspecified, the value from "Port" is used. |
12.1.9. .status
- Description
- Observed status of EgressRouter.
- Type
-
object
- Required
-
conditions
-
Property | Type | Description |
---|---|---|
|
| Observed status of the egress router |
|
| EgressRouterStatusCondition represents the state of the egress router’s managed and monitored components. |
12.1.10. .status.conditions
- Description
- Observed status of the egress router
- Type
-
array
12.1.11. .status.conditions[]
- Description
- EgressRouterStatusCondition represents the state of the egress router’s managed and monitored components.
- Type
-
object
- Required
-
status
-
type
-
Property | Type | Description |
---|---|---|
| `` | LastTransitionTime is the time of the last update to the current status property. |
|
| Message provides additional information about the current condition. This is only to be consumed by humans. It may contain Line Feed characters (U+000A), which should be rendered as new lines. |
|
| Reason is the CamelCase reason for the condition’s current status. |
|
| Status of the condition, one of True, False, Unknown. |
|
| Type specifies the aspect reported by this condition; one of Available, Progressing, Degraded |
12.2. API endpoints
The following API endpoints are available:
/apis/network.operator.openshift.io/v1/egressrouters
-
GET
: list objects of kind EgressRouter
-
/apis/network.operator.openshift.io/v1/namespaces/{namespace}/egressrouters
-
DELETE
: delete collection of EgressRouter -
GET
: list objects of kind EgressRouter -
POST
: create an EgressRouter
-
/apis/network.operator.openshift.io/v1/namespaces/{namespace}/egressrouters/{name}
-
DELETE
: delete an EgressRouter -
GET
: read the specified EgressRouter -
PATCH
: partially update the specified EgressRouter -
PUT
: replace the specified EgressRouter
-
/apis/network.operator.openshift.io/v1/namespaces/{namespace}/egressrouters/{name}/status
-
GET
: read status of the specified EgressRouter -
PATCH
: partially update status of the specified EgressRouter -
PUT
: replace status of the specified EgressRouter
-
12.2.1. /apis/network.operator.openshift.io/v1/egressrouters
- HTTP method
-
GET
- Description
- list objects of kind EgressRouter
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
12.2.2. /apis/network.operator.openshift.io/v1/namespaces/{namespace}/egressrouters
- HTTP method
-
DELETE
- Description
- delete collection of EgressRouter
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
GET
- Description
- list objects of kind EgressRouter
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
POST
- Description
- create an EgressRouter
Parameter | Type | Description |
---|---|---|
|
| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
|
| fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. |
Parameter | Type | Description |
---|---|---|
|
|
HTTP code | Reponse body |
---|---|
200 - OK |
|
201 - Created |
|
202 - Accepted |
|
401 - Unauthorized | Empty |
12.2.3. /apis/network.operator.openshift.io/v1/namespaces/{namespace}/egressrouters/{name}
Parameter | Type | Description |
---|---|---|
|
| name of the EgressRouter |
- HTTP method
-
DELETE
- Description
- delete an EgressRouter
Parameter | Type | Description |
---|---|---|
|
| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
HTTP code | Reponse body |
---|---|
200 - OK |
|
202 - Accepted |
|
401 - Unauthorized | Empty |
- HTTP method
-
GET
- Description
- read the specified EgressRouter
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
PATCH
- Description
- partially update the specified EgressRouter
Parameter | Type | Description |
---|---|---|
|
| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
|
| fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. |
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
PUT
- Description
- replace the specified EgressRouter
Parameter | Type | Description |
---|---|---|
|
| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
|
| fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. |
Parameter | Type | Description |
---|---|---|
|
|
HTTP code | Reponse body |
---|---|
200 - OK |
|
201 - Created |
|
401 - Unauthorized | Empty |
12.2.4. /apis/network.operator.openshift.io/v1/namespaces/{namespace}/egressrouters/{name}/status
Parameter | Type | Description |
---|---|---|
|
| name of the EgressRouter |
- HTTP method
-
GET
- Description
- read status of the specified EgressRouter
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
PATCH
- Description
- partially update status of the specified EgressRouter
Parameter | Type | Description |
---|---|---|
|
| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
|
| fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. |
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
PUT
- Description
- replace status of the specified EgressRouter
Parameter | Type | Description |
---|---|---|
|
| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
|
| fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. |
Parameter | Type | Description |
---|---|---|
|
|
HTTP code | Reponse body |
---|---|
200 - OK |
|
201 - Created |
|
401 - Unauthorized | Empty |