Este conteúdo não está disponível no idioma selecionado.
Chapter 7. EgressIP [k8s.ovn.org/v1]
- Description
- EgressIP is a CRD allowing the user to define a fixed source IP for all egress traffic originating from any pods which match the EgressIP resource according to its spec definition.
- Type
-
object
- Required
-
spec
-
7.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 behavior of EgressIP. |
|
| Observed status of EgressIP. Read-only. |
7.1.1. .spec
- Description
- Specification of the desired behavior of EgressIP.
- Type
-
object
- Required
-
egressIPs
-
namespaceSelector
-
Property | Type | Description |
---|---|---|
|
| EgressIPs is the list of egress IP addresses requested. Can be IPv4 and/or IPv6. This field is mandatory. |
|
| NamespaceSelector applies the egress IP only to the namespace(s) whose label matches this definition. This field is mandatory. |
|
| PodSelector applies the egress IP only to the pods whose label matches this definition. This field is optional, and in case it is not set: results in the egress IP being applied to all pods in the namespace(s) matched by the NamespaceSelector. In case it is set: is intersected with the NamespaceSelector, thus applying the egress IP to the pods (in the namespace(s) already matched by the NamespaceSelector) which match this pod selector. |
7.1.2. .spec.namespaceSelector
- Description
- NamespaceSelector applies the egress IP only to the namespace(s) whose label matches this definition. This field is mandatory.
- Type
-
object
Property | Type | Description |
---|---|---|
|
| matchExpressions is a list of label selector requirements. The requirements are ANDed. |
|
| A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. |
|
| matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. |
7.1.3. .spec.namespaceSelector.matchExpressions
- Description
- matchExpressions is a list of label selector requirements. The requirements are ANDed.
- Type
-
array
7.1.4. .spec.namespaceSelector.matchExpressions[]
- Description
- A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
- Type
-
object
- Required
-
key
-
operator
-
Property | Type | Description |
---|---|---|
|
| key is the label key that the selector applies to. |
|
| operator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. |
|
| values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. |
7.1.5. .spec.podSelector
- Description
- PodSelector applies the egress IP only to the pods whose label matches this definition. This field is optional, and in case it is not set: results in the egress IP being applied to all pods in the namespace(s) matched by the NamespaceSelector. In case it is set: is intersected with the NamespaceSelector, thus applying the egress IP to the pods (in the namespace(s) already matched by the NamespaceSelector) which match this pod selector.
- Type
-
object
Property | Type | Description |
---|---|---|
|
| matchExpressions is a list of label selector requirements. The requirements are ANDed. |
|
| A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. |
|
| matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. |
7.1.6. .spec.podSelector.matchExpressions
- Description
- matchExpressions is a list of label selector requirements. The requirements are ANDed.
- Type
-
array
7.1.7. .spec.podSelector.matchExpressions[]
- Description
- A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
- Type
-
object
- Required
-
key
-
operator
-
Property | Type | Description |
---|---|---|
|
| key is the label key that the selector applies to. |
|
| operator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. |
|
| values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. |
7.1.8. .status
- Description
- Observed status of EgressIP. Read-only.
- Type
-
object
- Required
-
items
-
Property | Type | Description |
---|---|---|
|
| The list of assigned egress IPs and their corresponding node assignment. |
|
| The per node status, for those egress IPs who have been assigned. |
7.1.9. .status.items
- Description
- The list of assigned egress IPs and their corresponding node assignment.
- Type
-
array
7.1.10. .status.items[]
- Description
- The per node status, for those egress IPs who have been assigned.
- Type
-
object
- Required
-
egressIP
-
node
-
Property | Type | Description |
---|---|---|
|
| Assigned egress IP |
|
| Assigned node name |
7.2. API endpoints
The following API endpoints are available:
/apis/k8s.ovn.org/v1/egressips
-
DELETE
: delete collection of EgressIP -
GET
: list objects of kind EgressIP -
POST
: create an EgressIP
-
/apis/k8s.ovn.org/v1/egressips/{name}
-
DELETE
: delete an EgressIP -
GET
: read the specified EgressIP -
PATCH
: partially update the specified EgressIP -
PUT
: replace the specified EgressIP
-
7.2.1. /apis/k8s.ovn.org/v1/egressips
- HTTP method
-
DELETE
- Description
- delete collection of EgressIP
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
GET
- Description
- list objects of kind EgressIP
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
POST
- Description
- create an EgressIP
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 |
7.2.2. /apis/k8s.ovn.org/v1/egressips/{name}
Parameter | Type | Description |
---|---|---|
|
| name of the EgressIP |
- HTTP method
-
DELETE
- Description
- delete an EgressIP
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 EgressIP
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
PATCH
- Description
- partially update the specified EgressIP
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 EgressIP
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 |