Network APIs
Reference guide for network APIs
Abstract
Chapter 1. Network APIs
1.1. AdminNetworkPolicy [policy.networking.k8s.io/v1alpha1]
- Description
- AdminNetworkPolicy is a cluster level resource that is part of the AdminNetworkPolicy API.
- Type
-
object
1.2. AdminPolicyBasedExternalRoute [k8s.ovn.org/v1]
- Description
- AdminPolicyBasedExternalRoute is a CRD allowing the cluster administrators to configure policies for external gateway IPs to be applied to all the pods contained in selected namespaces. Egress traffic from the pods that belong to the selected namespaces to outside the cluster is routed through these external gateway IPs.
- Type
-
object
1.3. BaselineAdminNetworkPolicy [policy.networking.k8s.io/v1alpha1]
- Description
- BaselineAdminNetworkPolicy is a cluster level resource that is part of the AdminNetworkPolicy API.
- Type
-
object
1.4. CloudPrivateIPConfig [cloud.network.openshift.io/v1]
- Description
- CloudPrivateIPConfig performs an assignment of a private IP address to the primary NIC associated with cloud VMs. This is done by specifying the IP and Kubernetes node which the IP should be assigned to. This CRD is intended to be used by the network plugin which manages the cluster network. The spec side represents the desired state requested by the network plugin, and the status side represents the current state that this CRD’s controller has executed. No users will have permission to modify it, and if a cluster-admin decides to edit it for some reason, their changes will be overwritten the next time the network plugin reconciles the object. Note: the CR’s name must specify the requested private IP address (can be IPv4 or IPv6). Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
- Type
-
object
1.5. EgressFirewall [k8s.ovn.org/v1]
- Description
- EgressFirewall describes the current egress firewall for a Namespace. Traffic from a pod to an IP address outside the cluster will be checked against each EgressFirewallRule in the pod’s namespace’s EgressFirewall, in order. If no rule matches (or no EgressFirewall is present) then the traffic will be allowed by default.
- Type
-
object
1.6. 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
1.7. EgressQoS [k8s.ovn.org/v1]
- Description
- EgressQoS is a CRD that allows the user to define a DSCP value for pods egress traffic on its namespace to specified CIDRs. Traffic from these pods will be checked against each EgressQoSRule in the namespace’s EgressQoS, and if there is a match the traffic is marked with the relevant DSCP value.
- Type
-
object
1.8. EgressService [k8s.ovn.org/v1]
- Description
- EgressService is a CRD that allows the user to request that the source IP of egress packets originating from all of the pods that are endpoints of the corresponding LoadBalancer Service would be its ingress IP. In addition, it allows the user to request that egress packets originating from all of the pods that are endpoints of the LoadBalancer service would use a different network than the main one.
- Type
-
object
1.9. Endpoints [v1]
- Description
Endpoints is a collection of endpoints that implement the actual service. Example:
Name: "mysvc", Subsets: [ { Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}], Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}] }, { Addresses: [{"ip": "10.10.3.3"}], Ports: [{"name": "a", "port": 93}, {"name": "b", "port": 76}] }, ]
- Type
-
object
1.10. EndpointSlice [discovery.k8s.io/v1]
- Description
- EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints.
- Type
-
object
1.11. 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
1.12. Ingress [networking.k8s.io/v1]
- Description
- Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.
- Type
-
object
1.13. IngressClass [networking.k8s.io/v1]
- Description
-
IngressClass represents the class of the Ingress, referenced by the Ingress Spec. The
ingressclass.kubernetes.io/is-default-class
annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class. - Type
-
object
1.14. IPAddress [ipam.cluster.x-k8s.io/v1beta1]
- Description
- IPAddress is the Schema for the ipaddress API.
- Type
-
object
1.15. IPAddressClaim [ipam.cluster.x-k8s.io/v1beta1]
- Description
- IPAddressClaim is the Schema for the ipaddressclaim API.
- Type
-
object
1.16. IPPool [whereabouts.cni.cncf.io/v1alpha1]
- Description
- IPPool is the Schema for the ippools API
- Type
-
object
1.17. NetworkAttachmentDefinition [k8s.cni.cncf.io/v1]
- Description
- NetworkAttachmentDefinition is a CRD schema specified by the Network Plumbing Working Group to express the intent for attaching pods to one or more logical or physical networks. More information available at: https://github.com/k8snetworkplumbingwg/multi-net-spec
- Type
-
object
1.18. NetworkPolicy [networking.k8s.io/v1]
- Description
- NetworkPolicy describes what network traffic is allowed for a set of Pods
- Type
-
object
1.19. OverlappingRangeIPReservation [whereabouts.cni.cncf.io/v1alpha1]
- Description
- OverlappingRangeIPReservation is the Schema for the OverlappingRangeIPReservations API
- Type
-
object
1.20. PodNetworkConnectivityCheck [controlplane.operator.openshift.io/v1alpha1]
- Description
- PodNetworkConnectivityCheck Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.
- Type
-
object
1.21. Route [route.openshift.io/v1]
- Description
A route allows developers to expose services through an HTTP(S) aware load balancing and proxy layer via a public DNS entry. The route may further specify TLS options and a certificate, or specify a public CNAME that the router should also accept for HTTP and HTTPS traffic. An administrator typically configures their router to be visible outside the cluster firewall, and may also add additional security, caching, or traffic controls on the service content. Routers usually talk directly to the service endpoints.
Once a route is created, the
host
field may not be changed. Generally, routers use the oldest route with a given host when resolving conflicts.Routers are subject to additional customization and may support additional controls via the annotations field.
Because administrators may configure multiple routers, the route status field is used to return information to clients about the names and states of the route under each router. If a client chooses a duplicate name, for instance, the route status conditions are used to indicate the route cannot be chosen.
To enable HTTP/2 ALPN on a route it requires a custom (non-wildcard) certificate. This prevents connection coalescing by clients, notably web browsers. We do not support HTTP/2 ALPN on routes that use the default certificate because of the risk of connection re-use/coalescing. Routes that do not have their own custom certificate will not be HTTP/2 ALPN-enabled on either the frontend or the backend.
Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
- Type
-
object
1.22. Service [v1]
- Description
- Service is a named abstraction of software service (for example, mysql) consisting of local port (for example 3306) that the proxy listens on, and the selector that determines which pods will answer requests sent through the proxy.
- Type
-
object
Chapter 2. AdminNetworkPolicy [policy.networking.k8s.io/v1alpha1]
- Description
- AdminNetworkPolicy is a cluster level resource that is part of the AdminNetworkPolicy API.
- Type
-
object
- Required
-
metadata
-
spec
-
2.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 AdminNetworkPolicy. |
|
| Status is the status to be reported by the implementation. |
2.1.1. .spec
- Description
- Specification of the desired behavior of AdminNetworkPolicy.
- Type
-
object
- Required
-
priority
-
subject
-
Property | Type | Description |
---|---|---|
|
| Egress is the list of Egress rules to be applied to the selected pods. A total of 100 rules will be allowed in each ANP instance. The relative precedence of egress rules within a single ANP object (all of which share the priority) will be determined by the order in which the rule is written. Thus, a rule that appears at the top of the egress rules would take the highest precedence. ANPs with no egress rules do not affect egress traffic. Support: Core |
|
| AdminNetworkPolicyEgressRule describes an action to take on a particular set of traffic originating from pods selected by a AdminNetworkPolicy’s Subject field. <network-policy-api:experimental:validation> |
|
| Ingress is the list of Ingress rules to be applied to the selected pods. A total of 100 rules will be allowed in each ANP instance. The relative precedence of ingress rules within a single ANP object (all of which share the priority) will be determined by the order in which the rule is written. Thus, a rule that appears at the top of the ingress rules would take the highest precedence. ANPs with no ingress rules do not affect ingress traffic. Support: Core |
|
| AdminNetworkPolicyIngressRule describes an action to take on a particular set of traffic destined for pods selected by an AdminNetworkPolicy’s Subject field. |
|
| Priority is a value from 0 to 1000. Rules with lower priority values have higher precedence, and are checked before rules with higher priority values. All AdminNetworkPolicy rules have higher precedence than NetworkPolicy or BaselineAdminNetworkPolicy rules The behavior is undefined if two ANP objects have same priority. Support: Core |
|
| Subject defines the pods to which this AdminNetworkPolicy applies. Note that host-networked pods are not included in subject selection. Support: Core |
2.1.2. .spec.egress
- Description
Egress is the list of Egress rules to be applied to the selected pods. A total of 100 rules will be allowed in each ANP instance. The relative precedence of egress rules within a single ANP object (all of which share the priority) will be determined by the order in which the rule is written. Thus, a rule that appears at the top of the egress rules would take the highest precedence. ANPs with no egress rules do not affect egress traffic.
Support: Core
- Type
-
array
2.1.3. .spec.egress[]
- Description
- AdminNetworkPolicyEgressRule describes an action to take on a particular set of traffic originating from pods selected by a AdminNetworkPolicy’s Subject field. <network-policy-api:experimental:validation>
- Type
-
object
- Required
-
action
-
to
-
Property | Type | Description |
---|---|---|
|
| Action specifies the effect this rule will have on matching traffic. Currently the following actions are supported: Allow: allows the selected traffic (even if it would otherwise have been denied by NetworkPolicy) Deny: denies the selected traffic Pass: instructs the selected traffic to skip any remaining ANP rules, and then pass execution to any NetworkPolicies that select the pod. If the pod is not selected by any NetworkPolicies then execution is passed to any BaselineAdminNetworkPolicies that select the pod. Support: Core |
|
| Name is an identifier for this rule, that may be no more than 100 characters in length. This field should be used by the implementation to help improve observability, readability and error-reporting for any applied AdminNetworkPolicies. Support: Core |
|
| Ports allows for matching traffic based on port and protocols. This field is a list of destination ports for the outgoing egress traffic. If Ports is not set then the rule does not filter traffic via port. Support: Core |
|
| AdminNetworkPolicyPort describes how to select network ports on pod(s). Exactly one field must be set. |
|
| To is the List of destinations whose traffic this rule applies to. If any AdminNetworkPolicyEgressPeer matches the destination of outgoing traffic then the specified action is applied. This field must be defined and contain at least one item. Support: Core |
|
| AdminNetworkPolicyEgressPeer defines a peer to allow traffic to. Exactly one of the selector pointers must be set for a given peer. If a consumer observes none of its fields are set, they must assume an unknown option has been specified and fail closed. |
2.1.4. .spec.egress[].ports
- Description
Ports allows for matching traffic based on port and protocols. This field is a list of destination ports for the outgoing egress traffic. If Ports is not set then the rule does not filter traffic via port.
Support: Core
- Type
-
array
2.1.5. .spec.egress[].ports[]
- Description
- AdminNetworkPolicyPort describes how to select network ports on pod(s). Exactly one field must be set.
- Type
-
object
Property | Type | Description |
---|---|---|
|
| NamedPort selects a port on a pod(s) based on name. Support: Extended <network-policy-api:experimental> |
|
| Port selects a port on a pod(s) based on number. Support: Core |
|
| PortRange selects a port range on a pod(s) based on provided start and end values. Support: Core |
2.1.6. .spec.egress[].ports[].portNumber
- Description
Port selects a port on a pod(s) based on number.
Support: Core
- Type
-
object
- Required
-
port
-
protocol
-
Property | Type | Description |
---|---|---|
|
| Number defines a network port value. Support: Core |
|
| Protocol is the network protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP. Support: Core |
2.1.7. .spec.egress[].ports[].portRange
- Description
PortRange selects a port range on a pod(s) based on provided start and end values.
Support: Core
- Type
-
object
- Required
-
end
-
start
-
Property | Type | Description |
---|---|---|
|
| End defines a network port that is the end of a port range, the End value must be greater than Start. Support: Core |
|
| Protocol is the network protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP. Support: Core |
|
| Start defines a network port that is the start of a port range, the Start value must be less than End. Support: Core |
2.1.8. .spec.egress[].to
- Description
To is the List of destinations whose traffic this rule applies to. If any AdminNetworkPolicyEgressPeer matches the destination of outgoing traffic then the specified action is applied. This field must be defined and contain at least one item.
Support: Core
- Type
-
array
2.1.9. .spec.egress[].to[]
- Description
- AdminNetworkPolicyEgressPeer defines a peer to allow traffic to. Exactly one of the selector pointers must be set for a given peer. If a consumer observes none of its fields are set, they must assume an unknown option has been specified and fail closed.
- Type
-
object
Property | Type | Description |
---|---|---|
|
| Namespaces defines a way to select all pods within a set of Namespaces. Note that host-networked pods are not included in this type of peer. Support: Core |
|
|
Networks defines a way to select peers via CIDR blocks. This is intended for representing entities that live outside the cluster, which can’t be selected by pods, namespaces and nodes peers, but note that cluster-internal traffic will be checked against the rule as well. So if you Allow or Deny traffic to Each item in Networks should be provided in the CIDR format and should be IPv4 or IPv6, for example "10.0.0.0/8" or "fd00::/8". Networks can have upto 25 CIDRs specified. Support: Extended <network-policy-api:experimental> |
|
| Nodes defines a way to select a set of nodes in the cluster. This field follows standard label selector semantics; if present but empty, it selects all Nodes. Support: Extended <network-policy-api:experimental> |
|
| Pods defines a way to select a set of pods in a set of namespaces. Note that host-networked pods are not included in this type of peer. Support: Core |
2.1.10. .spec.egress[].to[].namespaces
- Description
Namespaces defines a way to select all pods within a set of Namespaces. Note that host-networked pods are not included in this type of peer.
Support: Core
- 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. |
2.1.11. .spec.egress[].to[].namespaces.matchExpressions
- Description
- matchExpressions is a list of label selector requirements. The requirements are ANDed.
- Type
-
array
2.1.12. .spec.egress[].to[].namespaces.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. |
2.1.13. .spec.egress[].to[].nodes
- Description
Nodes defines a way to select a set of nodes in the cluster. This field follows standard label selector semantics; if present but empty, it selects all Nodes.
Support: Extended
<network-policy-api:experimental>
- 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. |
2.1.14. .spec.egress[].to[].nodes.matchExpressions
- Description
- matchExpressions is a list of label selector requirements. The requirements are ANDed.
- Type
-
array
2.1.15. .spec.egress[].to[].nodes.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. |
2.1.16. .spec.egress[].to[].pods
- Description
Pods defines a way to select a set of pods in a set of namespaces. Note that host-networked pods are not included in this type of peer.
Support: Core
- Type
-
object
- Required
-
namespaceSelector
-
podSelector
-
Property | Type | Description |
---|---|---|
|
| NamespaceSelector follows standard label selector semantics; if empty, it selects all Namespaces. |
|
| PodSelector is used to explicitly select pods within a namespace; if empty, it selects all Pods. |
2.1.17. .spec.egress[].to[].pods.namespaceSelector
- Description
- NamespaceSelector follows standard label selector semantics; if empty, it selects all Namespaces.
- 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. |
2.1.18. .spec.egress[].to[].pods.namespaceSelector.matchExpressions
- Description
- matchExpressions is a list of label selector requirements. The requirements are ANDed.
- Type
-
array
2.1.19. .spec.egress[].to[].pods.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. |
2.1.20. .spec.egress[].to[].pods.podSelector
- Description
- PodSelector is used to explicitly select pods within a namespace; if empty, it selects all Pods.
- 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. |
2.1.21. .spec.egress[].to[].pods.podSelector.matchExpressions
- Description
- matchExpressions is a list of label selector requirements. The requirements are ANDed.
- Type
-
array
2.1.22. .spec.egress[].to[].pods.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. |
2.1.23. .spec.ingress
- Description
Ingress is the list of Ingress rules to be applied to the selected pods. A total of 100 rules will be allowed in each ANP instance. The relative precedence of ingress rules within a single ANP object (all of which share the priority) will be determined by the order in which the rule is written. Thus, a rule that appears at the top of the ingress rules would take the highest precedence. ANPs with no ingress rules do not affect ingress traffic.
Support: Core
- Type
-
array
2.1.24. .spec.ingress[]
- Description
- AdminNetworkPolicyIngressRule describes an action to take on a particular set of traffic destined for pods selected by an AdminNetworkPolicy’s Subject field.
- Type
-
object
- Required
-
action
-
from
-
Property | Type | Description |
---|---|---|
|
| Action specifies the effect this rule will have on matching traffic. Currently the following actions are supported: Allow: allows the selected traffic (even if it would otherwise have been denied by NetworkPolicy) Deny: denies the selected traffic Pass: instructs the selected traffic to skip any remaining ANP rules, and then pass execution to any NetworkPolicies that select the pod. If the pod is not selected by any NetworkPolicies then execution is passed to any BaselineAdminNetworkPolicies that select the pod. Support: Core |
|
| From is the list of sources whose traffic this rule applies to. If any AdminNetworkPolicyIngressPeer matches the source of incoming traffic then the specified action is applied. This field must be defined and contain at least one item. Support: Core |
|
| AdminNetworkPolicyIngressPeer defines an in-cluster peer to allow traffic from. Exactly one of the selector pointers must be set for a given peer. If a consumer observes none of its fields are set, they must assume an unknown option has been specified and fail closed. |
|
| Name is an identifier for this rule, that may be no more than 100 characters in length. This field should be used by the implementation to help improve observability, readability and error-reporting for any applied AdminNetworkPolicies. Support: Core |
|
| Ports allows for matching traffic based on port and protocols. This field is a list of ports which should be matched on the pods selected for this policy i.e the subject of the policy. So it matches on the destination port for the ingress traffic. If Ports is not set then the rule does not filter traffic via port. Support: Core |
|
| AdminNetworkPolicyPort describes how to select network ports on pod(s). Exactly one field must be set. |
2.1.25. .spec.ingress[].from
- Description
From is the list of sources whose traffic this rule applies to. If any AdminNetworkPolicyIngressPeer matches the source of incoming traffic then the specified action is applied. This field must be defined and contain at least one item.
Support: Core
- Type
-
array
2.1.26. .spec.ingress[].from[]
- Description
- AdminNetworkPolicyIngressPeer defines an in-cluster peer to allow traffic from. Exactly one of the selector pointers must be set for a given peer. If a consumer observes none of its fields are set, they must assume an unknown option has been specified and fail closed.
- Type
-
object
Property | Type | Description |
---|---|---|
|
| Namespaces defines a way to select all pods within a set of Namespaces. Note that host-networked pods are not included in this type of peer. Support: Core |
|
| Pods defines a way to select a set of pods in a set of namespaces. Note that host-networked pods are not included in this type of peer. Support: Core |
2.1.27. .spec.ingress[].from[].namespaces
- Description
Namespaces defines a way to select all pods within a set of Namespaces. Note that host-networked pods are not included in this type of peer.
Support: Core
- 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. |
2.1.28. .spec.ingress[].from[].namespaces.matchExpressions
- Description
- matchExpressions is a list of label selector requirements. The requirements are ANDed.
- Type
-
array
2.1.29. .spec.ingress[].from[].namespaces.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. |
2.1.30. .spec.ingress[].from[].pods
- Description
Pods defines a way to select a set of pods in a set of namespaces. Note that host-networked pods are not included in this type of peer.
Support: Core
- Type
-
object
- Required
-
namespaceSelector
-
podSelector
-
Property | Type | Description |
---|---|---|
|
| NamespaceSelector follows standard label selector semantics; if empty, it selects all Namespaces. |
|
| PodSelector is used to explicitly select pods within a namespace; if empty, it selects all Pods. |
2.1.31. .spec.ingress[].from[].pods.namespaceSelector
- Description
- NamespaceSelector follows standard label selector semantics; if empty, it selects all Namespaces.
- 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. |
2.1.32. .spec.ingress[].from[].pods.namespaceSelector.matchExpressions
- Description
- matchExpressions is a list of label selector requirements. The requirements are ANDed.
- Type
-
array
2.1.33. .spec.ingress[].from[].pods.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. |
2.1.34. .spec.ingress[].from[].pods.podSelector
- Description
- PodSelector is used to explicitly select pods within a namespace; if empty, it selects all Pods.
- 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. |
2.1.35. .spec.ingress[].from[].pods.podSelector.matchExpressions
- Description
- matchExpressions is a list of label selector requirements. The requirements are ANDed.
- Type
-
array
2.1.36. .spec.ingress[].from[].pods.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. |
2.1.37. .spec.ingress[].ports
- Description
Ports allows for matching traffic based on port and protocols. This field is a list of ports which should be matched on the pods selected for this policy i.e the subject of the policy. So it matches on the destination port for the ingress traffic. If Ports is not set then the rule does not filter traffic via port.
Support: Core
- Type
-
array
2.1.38. .spec.ingress[].ports[]
- Description
- AdminNetworkPolicyPort describes how to select network ports on pod(s). Exactly one field must be set.
- Type
-
object
Property | Type | Description |
---|---|---|
|
| NamedPort selects a port on a pod(s) based on name. Support: Extended <network-policy-api:experimental> |
|
| Port selects a port on a pod(s) based on number. Support: Core |
|
| PortRange selects a port range on a pod(s) based on provided start and end values. Support: Core |
2.1.39. .spec.ingress[].ports[].portNumber
- Description
Port selects a port on a pod(s) based on number.
Support: Core
- Type
-
object
- Required
-
port
-
protocol
-
Property | Type | Description |
---|---|---|
|
| Number defines a network port value. Support: Core |
|
| Protocol is the network protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP. Support: Core |
2.1.40. .spec.ingress[].ports[].portRange
- Description
PortRange selects a port range on a pod(s) based on provided start and end values.
Support: Core
- Type
-
object
- Required
-
end
-
start
-
Property | Type | Description |
---|---|---|
|
| End defines a network port that is the end of a port range, the End value must be greater than Start. Support: Core |
|
| Protocol is the network protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP. Support: Core |
|
| Start defines a network port that is the start of a port range, the Start value must be less than End. Support: Core |
2.1.41. .spec.subject
- Description
Subject defines the pods to which this AdminNetworkPolicy applies. Note that host-networked pods are not included in subject selection.
Support: Core
- Type
-
object
Property | Type | Description |
---|---|---|
|
| Namespaces is used to select pods via namespace selectors. |
|
| Pods is used to select pods via namespace AND pod selectors. |
2.1.42. .spec.subject.namespaces
- Description
- Namespaces is used to select pods via namespace selectors.
- 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. |
2.1.43. .spec.subject.namespaces.matchExpressions
- Description
- matchExpressions is a list of label selector requirements. The requirements are ANDed.
- Type
-
array
2.1.44. .spec.subject.namespaces.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. |
2.1.45. .spec.subject.pods
- Description
- Pods is used to select pods via namespace AND pod selectors.
- Type
-
object
- Required
-
namespaceSelector
-
podSelector
-
Property | Type | Description |
---|---|---|
|
| NamespaceSelector follows standard label selector semantics; if empty, it selects all Namespaces. |
|
| PodSelector is used to explicitly select pods within a namespace; if empty, it selects all Pods. |
2.1.46. .spec.subject.pods.namespaceSelector
- Description
- NamespaceSelector follows standard label selector semantics; if empty, it selects all Namespaces.
- 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. |
2.1.47. .spec.subject.pods.namespaceSelector.matchExpressions
- Description
- matchExpressions is a list of label selector requirements. The requirements are ANDed.
- Type
-
array
2.1.48. .spec.subject.pods.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. |
2.1.49. .spec.subject.pods.podSelector
- Description
- PodSelector is used to explicitly select pods within a namespace; if empty, it selects all Pods.
- 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. |
2.1.50. .spec.subject.pods.podSelector.matchExpressions
- Description
- matchExpressions is a list of label selector requirements. The requirements are ANDed.
- Type
-
array
2.1.51. .spec.subject.pods.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. |
2.1.52. .status
- Description
- Status is the status to be reported by the implementation.
- Type
-
object
- Required
-
conditions
-
Property | Type | Description |
---|---|---|
|
| |
|
| Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example,
type FooStatus struct{ // Represents the observations of a foo’s current state. // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition // other fields } |
2.1.53. .status.conditions
- Description
- Type
-
array
2.1.54. .status.conditions[]
- Description
Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example,
type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
// other fields }
- Type
-
object
- Required
-
lastTransitionTime
-
message
-
reason
-
status
-
type
-
Property | Type | Description |
---|---|---|
|
| lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. |
|
| message is a human readable message indicating details about the transition. This may be an empty string. |
|
| observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. |
|
| reason contains a programmatic identifier indicating the reason for the condition’s last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. |
|
| status of the condition, one of True, False, Unknown. |
|
| type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) |
2.2. API endpoints
The following API endpoints are available:
/apis/policy.networking.k8s.io/v1alpha1/adminnetworkpolicies
-
DELETE
: delete collection of AdminNetworkPolicy -
GET
: list objects of kind AdminNetworkPolicy -
POST
: create an AdminNetworkPolicy
-
/apis/policy.networking.k8s.io/v1alpha1/adminnetworkpolicies/{name}
-
DELETE
: delete an AdminNetworkPolicy -
GET
: read the specified AdminNetworkPolicy -
PATCH
: partially update the specified AdminNetworkPolicy -
PUT
: replace the specified AdminNetworkPolicy
-
/apis/policy.networking.k8s.io/v1alpha1/adminnetworkpolicies/{name}/status
-
GET
: read status of the specified AdminNetworkPolicy -
PATCH
: partially update status of the specified AdminNetworkPolicy -
PUT
: replace status of the specified AdminNetworkPolicy
-
2.2.1. /apis/policy.networking.k8s.io/v1alpha1/adminnetworkpolicies
- HTTP method
-
DELETE
- Description
- delete collection of AdminNetworkPolicy
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
GET
- Description
- list objects of kind AdminNetworkPolicy
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
POST
- Description
- create an AdminNetworkPolicy
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 |
2.2.2. /apis/policy.networking.k8s.io/v1alpha1/adminnetworkpolicies/{name}
Parameter | Type | Description |
---|---|---|
|
| name of the AdminNetworkPolicy |
- HTTP method
-
DELETE
- Description
- delete an AdminNetworkPolicy
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 AdminNetworkPolicy
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
PATCH
- Description
- partially update the specified AdminNetworkPolicy
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 AdminNetworkPolicy
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 |
2.2.3. /apis/policy.networking.k8s.io/v1alpha1/adminnetworkpolicies/{name}/status
Parameter | Type | Description |
---|---|---|
|
| name of the AdminNetworkPolicy |
- HTTP method
-
GET
- Description
- read status of the specified AdminNetworkPolicy
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
PATCH
- Description
- partially update status of the specified AdminNetworkPolicy
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 AdminNetworkPolicy
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 |
Chapter 3. AdminPolicyBasedExternalRoute [k8s.ovn.org/v1]
- Description
- AdminPolicyBasedExternalRoute is a CRD allowing the cluster administrators to configure policies for external gateway IPs to be applied to all the pods contained in selected namespaces. Egress traffic from the pods that belong to the selected namespaces to outside the cluster is routed through these external gateway IPs.
- Type
-
object
- Required
-
spec
-
3.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 | |
|
| AdminPolicyBasedExternalRouteSpec defines the desired state of AdminPolicyBasedExternalRoute |
|
| AdminPolicyBasedRouteStatus contains the observed status of the AdminPolicyBased route types. |
3.1.1. .spec
- Description
- AdminPolicyBasedExternalRouteSpec defines the desired state of AdminPolicyBasedExternalRoute
- Type
-
object
- Required
-
from
-
nextHops
-
Property | Type | Description |
---|---|---|
|
| From defines the selectors that will determine the target namespaces to this CR. |
|
| NextHops defines two types of hops: Static and Dynamic. Each hop defines at least one external gateway IP. |
3.1.2. .spec.from
- Description
- From defines the selectors that will determine the target namespaces to this CR.
- Type
-
object
- Required
-
namespaceSelector
-
Property | Type | Description |
---|---|---|
|
| NamespaceSelector defines a selector to be used to determine which namespaces will be targeted by this CR |
3.1.3. .spec.from.namespaceSelector
- Description
- NamespaceSelector defines a selector to be used to determine which namespaces will be targeted by this CR
- 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. |
3.1.4. .spec.from.namespaceSelector.matchExpressions
- Description
- matchExpressions is a list of label selector requirements. The requirements are ANDed.
- Type
-
array
3.1.5. .spec.from.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. |
3.1.6. .spec.nextHops
- Description
- NextHops defines two types of hops: Static and Dynamic. Each hop defines at least one external gateway IP.
- Type
-
object
Property | Type | Description |
---|---|---|
|
| DynamicHops defines a slices of DynamicHop. This field is optional. |
|
| DynamicHop defines the configuration for a dynamic external gateway interface. These interfaces are wrapped around a pod object that resides inside the cluster. The field NetworkAttachmentName captures the name of the multus network name to use when retrieving the gateway IP to use. The PodSelector and the NamespaceSelector are mandatory fields. |
|
| StaticHops defines a slice of StaticHop. This field is optional. |
|
| StaticHop defines the configuration of a static IP that acts as an external Gateway Interface. IP field is mandatory. |
3.1.7. .spec.nextHops.dynamic
- Description
- DynamicHops defines a slices of DynamicHop. This field is optional.
- Type
-
array
3.1.8. .spec.nextHops.dynamic[]
- Description
- DynamicHop defines the configuration for a dynamic external gateway interface. These interfaces are wrapped around a pod object that resides inside the cluster. The field NetworkAttachmentName captures the name of the multus network name to use when retrieving the gateway IP to use. The PodSelector and the NamespaceSelector are mandatory fields.
- Type
-
object
- Required
-
namespaceSelector
-
podSelector
-
Property | Type | Description |
---|---|---|
|
| BFDEnabled determines if the interface implements the Bidirectional Forward Detection protocol. Defaults to false. |
|
| NamespaceSelector defines a selector to filter the namespaces where the pod gateways are located. |
|
| NetworkAttachmentName determines the multus network name to use when retrieving the pod IPs that will be used as the gateway IP. When this field is empty, the logic assumes that the pod is configured with HostNetwork and is using the node’s IP as gateway. |
|
| PodSelector defines the selector to filter the pods that are external gateways. |
3.1.9. .spec.nextHops.dynamic[].namespaceSelector
- Description
- NamespaceSelector defines a selector to filter the namespaces where the pod gateways are located.
- 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. |
3.1.10. .spec.nextHops.dynamic[].namespaceSelector.matchExpressions
- Description
- matchExpressions is a list of label selector requirements. The requirements are ANDed.
- Type
-
array
3.1.11. .spec.nextHops.dynamic[].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. |
3.1.12. .spec.nextHops.dynamic[].podSelector
- Description
- PodSelector defines the selector to filter the pods that are external gateways.
- 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. |
3.1.13. .spec.nextHops.dynamic[].podSelector.matchExpressions
- Description
- matchExpressions is a list of label selector requirements. The requirements are ANDed.
- Type
-
array
3.1.14. .spec.nextHops.dynamic[].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. |
3.1.15. .spec.nextHops.static
- Description
- StaticHops defines a slice of StaticHop. This field is optional.
- Type
-
array
3.1.16. .spec.nextHops.static[]
- Description
- StaticHop defines the configuration of a static IP that acts as an external Gateway Interface. IP field is mandatory.
- Type
-
object
- Required
-
ip
-
Property | Type | Description |
---|---|---|
|
| BFDEnabled determines if the interface implements the Bidirectional Forward Detection protocol. Defaults to false. |
|
| IP defines the static IP to be used for egress traffic. The IP can be either IPv4 or IPv6. |
3.1.17. .status
- Description
- AdminPolicyBasedRouteStatus contains the observed status of the AdminPolicyBased route types.
- Type
-
object
Property | Type | Description |
---|---|---|
|
| Captures the time when the last change was applied. |
|
| An array of Human-readable messages indicating details about the status of the object. |
|
| A concise indication of whether the AdminPolicyBasedRoute resource is applied with success |
3.2. API endpoints
The following API endpoints are available:
/apis/k8s.ovn.org/v1/adminpolicybasedexternalroutes
-
DELETE
: delete collection of AdminPolicyBasedExternalRoute -
GET
: list objects of kind AdminPolicyBasedExternalRoute -
POST
: create an AdminPolicyBasedExternalRoute
-
/apis/k8s.ovn.org/v1/adminpolicybasedexternalroutes/{name}
-
DELETE
: delete an AdminPolicyBasedExternalRoute -
GET
: read the specified AdminPolicyBasedExternalRoute -
PATCH
: partially update the specified AdminPolicyBasedExternalRoute -
PUT
: replace the specified AdminPolicyBasedExternalRoute
-
/apis/k8s.ovn.org/v1/adminpolicybasedexternalroutes/{name}/status
-
GET
: read status of the specified AdminPolicyBasedExternalRoute -
PATCH
: partially update status of the specified AdminPolicyBasedExternalRoute -
PUT
: replace status of the specified AdminPolicyBasedExternalRoute
-
3.2.1. /apis/k8s.ovn.org/v1/adminpolicybasedexternalroutes
- HTTP method
-
DELETE
- Description
- delete collection of AdminPolicyBasedExternalRoute
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
GET
- Description
- list objects of kind AdminPolicyBasedExternalRoute
HTTP code | Reponse body |
---|---|
200 - OK | |
401 - Unauthorized | Empty |
- HTTP method
-
POST
- Description
- create an AdminPolicyBasedExternalRoute
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 |
3.2.2. /apis/k8s.ovn.org/v1/adminpolicybasedexternalroutes/{name}
Parameter | Type | Description |
---|---|---|
|
| name of the AdminPolicyBasedExternalRoute |
- HTTP method
-
DELETE
- Description
- delete an AdminPolicyBasedExternalRoute
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 AdminPolicyBasedExternalRoute
HTTP code | Reponse body |
---|---|
200 - OK | |
401 - Unauthorized | Empty |
- HTTP method
-
PATCH
- Description
- partially update the specified AdminPolicyBasedExternalRoute
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 AdminPolicyBasedExternalRoute
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 |
3.2.3. /apis/k8s.ovn.org/v1/adminpolicybasedexternalroutes/{name}/status
Parameter | Type | Description |
---|---|---|
|
| name of the AdminPolicyBasedExternalRoute |
- HTTP method
-
GET
- Description
- read status of the specified AdminPolicyBasedExternalRoute
HTTP code | Reponse body |
---|---|
200 - OK | |
401 - Unauthorized | Empty |
- HTTP method
-
PATCH
- Description
- partially update status of the specified AdminPolicyBasedExternalRoute
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 AdminPolicyBasedExternalRoute
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 |
Chapter 4. BaselineAdminNetworkPolicy [policy.networking.k8s.io/v1alpha1]
- Description
- BaselineAdminNetworkPolicy is a cluster level resource that is part of the AdminNetworkPolicy API.
- Type
-
object
- Required
-
metadata
-
spec
-
4.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 BaselineAdminNetworkPolicy. |
|
| Status is the status to be reported by the implementation. |
4.1.1. .spec
- Description
- Specification of the desired behavior of BaselineAdminNetworkPolicy.
- Type
-
object
- Required
-
subject
-
Property | Type | Description |
---|---|---|
|
| Egress is the list of Egress rules to be applied to the selected pods if they are not matched by any AdminNetworkPolicy or NetworkPolicy rules. A total of 100 Egress rules will be allowed in each BANP instance. The relative precedence of egress rules within a single BANP object will be determined by the order in which the rule is written. Thus, a rule that appears at the top of the egress rules would take the highest precedence. BANPs with no egress rules do not affect egress traffic. Support: Core |
|
| BaselineAdminNetworkPolicyEgressRule describes an action to take on a particular set of traffic originating from pods selected by a BaselineAdminNetworkPolicy’s Subject field. <network-policy-api:experimental:validation> |
|
| Ingress is the list of Ingress rules to be applied to the selected pods if they are not matched by any AdminNetworkPolicy or NetworkPolicy rules. A total of 100 Ingress rules will be allowed in each BANP instance. The relative precedence of ingress rules within a single BANP object will be determined by the order in which the rule is written. Thus, a rule that appears at the top of the ingress rules would take the highest precedence. BANPs with no ingress rules do not affect ingress traffic. Support: Core |
|
| BaselineAdminNetworkPolicyIngressRule describes an action to take on a particular set of traffic destined for pods selected by a BaselineAdminNetworkPolicy’s Subject field. |
|
| Subject defines the pods to which this BaselineAdminNetworkPolicy applies. Note that host-networked pods are not included in subject selection. Support: Core |
4.1.2. .spec.egress
- Description
Egress is the list of Egress rules to be applied to the selected pods if they are not matched by any AdminNetworkPolicy or NetworkPolicy rules. A total of 100 Egress rules will be allowed in each BANP instance. The relative precedence of egress rules within a single BANP object will be determined by the order in which the rule is written. Thus, a rule that appears at the top of the egress rules would take the highest precedence. BANPs with no egress rules do not affect egress traffic.
Support: Core
- Type
-
array
4.1.3. .spec.egress[]
- Description
- BaselineAdminNetworkPolicyEgressRule describes an action to take on a particular set of traffic originating from pods selected by a BaselineAdminNetworkPolicy’s Subject field. <network-policy-api:experimental:validation>
- Type
-
object
- Required
-
action
-
to
-
Property | Type | Description |
---|---|---|
|
| Action specifies the effect this rule will have on matching traffic. Currently the following actions are supported: Allow: allows the selected traffic Deny: denies the selected traffic Support: Core |
|
| Name is an identifier for this rule, that may be no more than 100 characters in length. This field should be used by the implementation to help improve observability, readability and error-reporting for any applied BaselineAdminNetworkPolicies. Support: Core |
|
| Ports allows for matching traffic based on port and protocols. This field is a list of destination ports for the outgoing egress traffic. If Ports is not set then the rule does not filter traffic via port. |
|
| AdminNetworkPolicyPort describes how to select network ports on pod(s). Exactly one field must be set. |
|
| To is the list of destinations whose traffic this rule applies to. If any AdminNetworkPolicyEgressPeer matches the destination of outgoing traffic then the specified action is applied. This field must be defined and contain at least one item. Support: Core |
|
| AdminNetworkPolicyEgressPeer defines a peer to allow traffic to. Exactly one of the selector pointers must be set for a given peer. If a consumer observes none of its fields are set, they must assume an unknown option has been specified and fail closed. |
4.1.4. .spec.egress[].ports
- Description
- Ports allows for matching traffic based on port and protocols. This field is a list of destination ports for the outgoing egress traffic. If Ports is not set then the rule does not filter traffic via port.
- Type
-
array
4.1.5. .spec.egress[].ports[]
- Description
- AdminNetworkPolicyPort describes how to select network ports on pod(s). Exactly one field must be set.
- Type
-
object
Property | Type | Description |
---|---|---|
|
| NamedPort selects a port on a pod(s) based on name. Support: Extended <network-policy-api:experimental> |
|
| Port selects a port on a pod(s) based on number. Support: Core |
|
| PortRange selects a port range on a pod(s) based on provided start and end values. Support: Core |
4.1.6. .spec.egress[].ports[].portNumber
- Description
Port selects a port on a pod(s) based on number.
Support: Core
- Type
-
object
- Required
-
port
-
protocol
-
Property | Type | Description |
---|---|---|
|
| Number defines a network port value. Support: Core |
|
| Protocol is the network protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP. Support: Core |
4.1.7. .spec.egress[].ports[].portRange
- Description
PortRange selects a port range on a pod(s) based on provided start and end values.
Support: Core
- Type
-
object
- Required
-
end
-
start
-
Property | Type | Description |
---|---|---|
|
| End defines a network port that is the end of a port range, the End value must be greater than Start. Support: Core |
|
| Protocol is the network protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP. Support: Core |
|
| Start defines a network port that is the start of a port range, the Start value must be less than End. Support: Core |
4.1.8. .spec.egress[].to
- Description
To is the list of destinations whose traffic this rule applies to. If any AdminNetworkPolicyEgressPeer matches the destination of outgoing traffic then the specified action is applied. This field must be defined and contain at least one item.
Support: Core
- Type
-
array
4.1.9. .spec.egress[].to[]
- Description
- AdminNetworkPolicyEgressPeer defines a peer to allow traffic to. Exactly one of the selector pointers must be set for a given peer. If a consumer observes none of its fields are set, they must assume an unknown option has been specified and fail closed.
- Type
-
object
Property | Type | Description |
---|---|---|
|
| Namespaces defines a way to select all pods within a set of Namespaces. Note that host-networked pods are not included in this type of peer. Support: Core |
|
|
Networks defines a way to select peers via CIDR blocks. This is intended for representing entities that live outside the cluster, which can’t be selected by pods, namespaces and nodes peers, but note that cluster-internal traffic will be checked against the rule as well. So if you Allow or Deny traffic to Each item in Networks should be provided in the CIDR format and should be IPv4 or IPv6, for example "10.0.0.0/8" or "fd00::/8". Networks can have upto 25 CIDRs specified. Support: Extended <network-policy-api:experimental> |
|
| Nodes defines a way to select a set of nodes in the cluster. This field follows standard label selector semantics; if present but empty, it selects all Nodes. Support: Extended <network-policy-api:experimental> |
|
| Pods defines a way to select a set of pods in a set of namespaces. Note that host-networked pods are not included in this type of peer. Support: Core |
4.1.10. .spec.egress[].to[].namespaces
- Description
Namespaces defines a way to select all pods within a set of Namespaces. Note that host-networked pods are not included in this type of peer.
Support: Core
- 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. |
4.1.11. .spec.egress[].to[].namespaces.matchExpressions
- Description
- matchExpressions is a list of label selector requirements. The requirements are ANDed.
- Type
-
array
4.1.12. .spec.egress[].to[].namespaces.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. |
4.1.13. .spec.egress[].to[].nodes
- Description
Nodes defines a way to select a set of nodes in the cluster. This field follows standard label selector semantics; if present but empty, it selects all Nodes.
Support: Extended
<network-policy-api:experimental>
- 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. |
4.1.14. .spec.egress[].to[].nodes.matchExpressions
- Description
- matchExpressions is a list of label selector requirements. The requirements are ANDed.
- Type
-
array
4.1.15. .spec.egress[].to[].nodes.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. |
4.1.16. .spec.egress[].to[].pods
- Description
Pods defines a way to select a set of pods in a set of namespaces. Note that host-networked pods are not included in this type of peer.
Support: Core
- Type
-
object
- Required
-
namespaceSelector
-
podSelector
-
Property | Type | Description |
---|---|---|
|
| NamespaceSelector follows standard label selector semantics; if empty, it selects all Namespaces. |
|
| PodSelector is used to explicitly select pods within a namespace; if empty, it selects all Pods. |
4.1.17. .spec.egress[].to[].pods.namespaceSelector
- Description
- NamespaceSelector follows standard label selector semantics; if empty, it selects all Namespaces.
- 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. |
4.1.18. .spec.egress[].to[].pods.namespaceSelector.matchExpressions
- Description
- matchExpressions is a list of label selector requirements. The requirements are ANDed.
- Type
-
array
4.1.19. .spec.egress[].to[].pods.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. |
4.1.20. .spec.egress[].to[].pods.podSelector
- Description
- PodSelector is used to explicitly select pods within a namespace; if empty, it selects all Pods.
- 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. |
4.1.21. .spec.egress[].to[].pods.podSelector.matchExpressions
- Description
- matchExpressions is a list of label selector requirements. The requirements are ANDed.
- Type
-
array
4.1.22. .spec.egress[].to[].pods.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. |
4.1.23. .spec.ingress
- Description
Ingress is the list of Ingress rules to be applied to the selected pods if they are not matched by any AdminNetworkPolicy or NetworkPolicy rules. A total of 100 Ingress rules will be allowed in each BANP instance. The relative precedence of ingress rules within a single BANP object will be determined by the order in which the rule is written. Thus, a rule that appears at the top of the ingress rules would take the highest precedence. BANPs with no ingress rules do not affect ingress traffic.
Support: Core
- Type
-
array
4.1.24. .spec.ingress[]
- Description
- BaselineAdminNetworkPolicyIngressRule describes an action to take on a particular set of traffic destined for pods selected by a BaselineAdminNetworkPolicy’s Subject field.
- Type
-
object
- Required
-
action
-
from
-
Property | Type | Description |
---|---|---|
|
| Action specifies the effect this rule will have on matching traffic. Currently the following actions are supported: Allow: allows the selected traffic Deny: denies the selected traffic Support: Core |
|
| From is the list of sources whose traffic this rule applies to. If any AdminNetworkPolicyIngressPeer matches the source of incoming traffic then the specified action is applied. This field must be defined and contain at least one item. Support: Core |
|
| AdminNetworkPolicyIngressPeer defines an in-cluster peer to allow traffic from. Exactly one of the selector pointers must be set for a given peer. If a consumer observes none of its fields are set, they must assume an unknown option has been specified and fail closed. |
|
| Name is an identifier for this rule, that may be no more than 100 characters in length. This field should be used by the implementation to help improve observability, readability and error-reporting for any applied BaselineAdminNetworkPolicies. Support: Core |
|
| Ports allows for matching traffic based on port and protocols. This field is a list of ports which should be matched on the pods selected for this policy i.e the subject of the policy. So it matches on the destination port for the ingress traffic. If Ports is not set then the rule does not filter traffic via port. Support: Core |
|
| AdminNetworkPolicyPort describes how to select network ports on pod(s). Exactly one field must be set. |
4.1.25. .spec.ingress[].from
- Description
From is the list of sources whose traffic this rule applies to. If any AdminNetworkPolicyIngressPeer matches the source of incoming traffic then the specified action is applied. This field must be defined and contain at least one item.
Support: Core
- Type
-
array
4.1.26. .spec.ingress[].from[]
- Description
- AdminNetworkPolicyIngressPeer defines an in-cluster peer to allow traffic from. Exactly one of the selector pointers must be set for a given peer. If a consumer observes none of its fields are set, they must assume an unknown option has been specified and fail closed.
- Type
-
object
Property | Type | Description |
---|---|---|
|
| Namespaces defines a way to select all pods within a set of Namespaces. Note that host-networked pods are not included in this type of peer. Support: Core |
|
| Pods defines a way to select a set of pods in a set of namespaces. Note that host-networked pods are not included in this type of peer. Support: Core |
4.1.27. .spec.ingress[].from[].namespaces
- Description
Namespaces defines a way to select all pods within a set of Namespaces. Note that host-networked pods are not included in this type of peer.
Support: Core
- 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. |
4.1.28. .spec.ingress[].from[].namespaces.matchExpressions
- Description
- matchExpressions is a list of label selector requirements. The requirements are ANDed.
- Type
-
array
4.1.29. .spec.ingress[].from[].namespaces.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. |
4.1.30. .spec.ingress[].from[].pods
- Description
Pods defines a way to select a set of pods in a set of namespaces. Note that host-networked pods are not included in this type of peer.
Support: Core
- Type
-
object
- Required
-
namespaceSelector
-
podSelector
-
Property | Type | Description |
---|---|---|
|
| NamespaceSelector follows standard label selector semantics; if empty, it selects all Namespaces. |
|
| PodSelector is used to explicitly select pods within a namespace; if empty, it selects all Pods. |
4.1.31. .spec.ingress[].from[].pods.namespaceSelector
- Description
- NamespaceSelector follows standard label selector semantics; if empty, it selects all Namespaces.
- 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. |
4.1.32. .spec.ingress[].from[].pods.namespaceSelector.matchExpressions
- Description
- matchExpressions is a list of label selector requirements. The requirements are ANDed.
- Type
-
array
4.1.33. .spec.ingress[].from[].pods.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. |
4.1.34. .spec.ingress[].from[].pods.podSelector
- Description
- PodSelector is used to explicitly select pods within a namespace; if empty, it selects all Pods.
- 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. |
4.1.35. .spec.ingress[].from[].pods.podSelector.matchExpressions
- Description
- matchExpressions is a list of label selector requirements. The requirements are ANDed.
- Type
-
array
4.1.36. .spec.ingress[].from[].pods.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. |
4.1.37. .spec.ingress[].ports
- Description
Ports allows for matching traffic based on port and protocols. This field is a list of ports which should be matched on the pods selected for this policy i.e the subject of the policy. So it matches on the destination port for the ingress traffic. If Ports is not set then the rule does not filter traffic via port.
Support: Core
- Type
-
array
4.1.38. .spec.ingress[].ports[]
- Description
- AdminNetworkPolicyPort describes how to select network ports on pod(s). Exactly one field must be set.
- Type
-
object
Property | Type | Description |
---|---|---|
|
| NamedPort selects a port on a pod(s) based on name. Support: Extended <network-policy-api:experimental> |
|
| Port selects a port on a pod(s) based on number. Support: Core |
|
| PortRange selects a port range on a pod(s) based on provided start and end values. Support: Core |
4.1.39. .spec.ingress[].ports[].portNumber
- Description
Port selects a port on a pod(s) based on number.
Support: Core
- Type
-
object
- Required
-
port
-
protocol
-
Property | Type | Description |
---|---|---|
|
| Number defines a network port value. Support: Core |
|
| Protocol is the network protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP. Support: Core |
4.1.40. .spec.ingress[].ports[].portRange
- Description
PortRange selects a port range on a pod(s) based on provided start and end values.
Support: Core
- Type
-
object
- Required
-
end
-
start
-
Property | Type | Description |
---|---|---|
|
| End defines a network port that is the end of a port range, the End value must be greater than Start. Support: Core |
|
| Protocol is the network protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP. Support: Core |
|
| Start defines a network port that is the start of a port range, the Start value must be less than End. Support: Core |
4.1.41. .spec.subject
- Description
Subject defines the pods to which this BaselineAdminNetworkPolicy applies. Note that host-networked pods are not included in subject selection.
Support: Core
- Type
-
object
Property | Type | Description |
---|---|---|
|
| Namespaces is used to select pods via namespace selectors. |
|
| Pods is used to select pods via namespace AND pod selectors. |
4.1.42. .spec.subject.namespaces
- Description
- Namespaces is used to select pods via namespace selectors.
- 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. |
4.1.43. .spec.subject.namespaces.matchExpressions
- Description
- matchExpressions is a list of label selector requirements. The requirements are ANDed.
- Type
-
array
4.1.44. .spec.subject.namespaces.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. |
4.1.45. .spec.subject.pods
- Description
- Pods is used to select pods via namespace AND pod selectors.
- Type
-
object
- Required
-
namespaceSelector
-
podSelector
-
Property | Type | Description |
---|---|---|
|
| NamespaceSelector follows standard label selector semantics; if empty, it selects all Namespaces. |
|
| PodSelector is used to explicitly select pods within a namespace; if empty, it selects all Pods. |
4.1.46. .spec.subject.pods.namespaceSelector
- Description
- NamespaceSelector follows standard label selector semantics; if empty, it selects all Namespaces.
- 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. |
4.1.47. .spec.subject.pods.namespaceSelector.matchExpressions
- Description
- matchExpressions is a list of label selector requirements. The requirements are ANDed.
- Type
-
array
4.1.48. .spec.subject.pods.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. |
4.1.49. .spec.subject.pods.podSelector
- Description
- PodSelector is used to explicitly select pods within a namespace; if empty, it selects all Pods.
- 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. |
4.1.50. .spec.subject.pods.podSelector.matchExpressions
- Description
- matchExpressions is a list of label selector requirements. The requirements are ANDed.
- Type
-
array
4.1.51. .spec.subject.pods.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. |
4.1.52. .status
- Description
- Status is the status to be reported by the implementation.
- Type
-
object
- Required
-
conditions
-
Property | Type | Description |
---|---|---|
|
| |
|
| Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example,
type FooStatus struct{ // Represents the observations of a foo’s current state. // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition // other fields } |
4.1.53. .status.conditions
- Description
- Type
-
array
4.1.54. .status.conditions[]
- Description
Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example,
type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
// other fields }
- Type
-
object
- Required
-
lastTransitionTime
-
message
-
reason
-
status
-
type
-
Property | Type | Description |
---|---|---|
|
| lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. |
|
| message is a human readable message indicating details about the transition. This may be an empty string. |
|
| observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. |
|
| reason contains a programmatic identifier indicating the reason for the condition’s last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. |
|
| status of the condition, one of True, False, Unknown. |
|
| type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) |
4.2. API endpoints
The following API endpoints are available:
/apis/policy.networking.k8s.io/v1alpha1/baselineadminnetworkpolicies
-
DELETE
: delete collection of BaselineAdminNetworkPolicy -
GET
: list objects of kind BaselineAdminNetworkPolicy -
POST
: create a BaselineAdminNetworkPolicy
-
/apis/policy.networking.k8s.io/v1alpha1/baselineadminnetworkpolicies/{name}
-
DELETE
: delete a BaselineAdminNetworkPolicy -
GET
: read the specified BaselineAdminNetworkPolicy -
PATCH
: partially update the specified BaselineAdminNetworkPolicy -
PUT
: replace the specified BaselineAdminNetworkPolicy
-
/apis/policy.networking.k8s.io/v1alpha1/baselineadminnetworkpolicies/{name}/status
-
GET
: read status of the specified BaselineAdminNetworkPolicy -
PATCH
: partially update status of the specified BaselineAdminNetworkPolicy -
PUT
: replace status of the specified BaselineAdminNetworkPolicy
-
4.2.1. /apis/policy.networking.k8s.io/v1alpha1/baselineadminnetworkpolicies
- HTTP method
-
DELETE
- Description
- delete collection of BaselineAdminNetworkPolicy
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
GET
- Description
- list objects of kind BaselineAdminNetworkPolicy
HTTP code | Reponse body |
---|---|
200 - OK | |
401 - Unauthorized | Empty |
- HTTP method
-
POST
- Description
- create a BaselineAdminNetworkPolicy
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 |
4.2.2. /apis/policy.networking.k8s.io/v1alpha1/baselineadminnetworkpolicies/{name}
Parameter | Type | Description |
---|---|---|
|
| name of the BaselineAdminNetworkPolicy |
- HTTP method
-
DELETE
- Description
- delete a BaselineAdminNetworkPolicy
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 BaselineAdminNetworkPolicy
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
PATCH
- Description
- partially update the specified BaselineAdminNetworkPolicy
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 BaselineAdminNetworkPolicy
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 |
4.2.3. /apis/policy.networking.k8s.io/v1alpha1/baselineadminnetworkpolicies/{name}/status
Parameter | Type | Description |
---|---|---|
|
| name of the BaselineAdminNetworkPolicy |
- HTTP method
-
GET
- Description
- read status of the specified BaselineAdminNetworkPolicy
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
PATCH
- Description
- partially update status of the specified BaselineAdminNetworkPolicy
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 BaselineAdminNetworkPolicy
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 |
Chapter 5. CloudPrivateIPConfig [cloud.network.openshift.io/v1]
- Description
- CloudPrivateIPConfig performs an assignment of a private IP address to the primary NIC associated with cloud VMs. This is done by specifying the IP and Kubernetes node which the IP should be assigned to. This CRD is intended to be used by the network plugin which manages the cluster network. The spec side represents the desired state requested by the network plugin, and the status side represents the current state that this CRD’s controller has executed. No users will have permission to modify it, and if a cluster-admin decides to edit it for some reason, their changes will be overwritten the next time the network plugin reconciles the object. Note: the CR’s name must specify the requested private IP address (can be IPv4 or IPv6). Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
- Type
-
object
- Required
-
spec
-
5.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 | |
|
| spec is the definition of the desired private IP request. |
|
| status is the observed status of the desired private IP request. Read-only. |
5.1.1. .spec
- Description
- spec is the definition of the desired private IP request.
- Type
-
object
Property | Type | Description |
---|---|---|
|
| node is the node name, as specified by the Kubernetes field: node.metadata.name |
5.1.2. .status
- Description
- status is the observed status of the desired private IP request. Read-only.
- Type
-
object
- Required
-
conditions
-
Property | Type | Description |
---|---|---|
|
| condition is the assignment condition of the private IP and its status |
|
|
Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo’s current state. // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition |
|
| node is the node name, as specified by the Kubernetes field: node.metadata.name |
5.1.3. .status.conditions
- Description
- condition is the assignment condition of the private IP and its status
- Type
-
array
5.1.4. .status.conditions[]
- Description
-
Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo’s current state. // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition
json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"
// other fields } - Type
-
object
- Required
-
lastTransitionTime
-
message
-
reason
-
status
-
type
-
Property | Type | Description |
---|---|---|
|
| lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. |
|
| message is a human readable message indicating details about the transition. This may be an empty string. |
|
| observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. |
|
| reason contains a programmatic identifier indicating the reason for the condition’s last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. |
|
| status of the condition, one of True, False, Unknown. |
|
| type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) |
5.2. API endpoints
The following API endpoints are available:
/apis/cloud.network.openshift.io/v1/cloudprivateipconfigs
-
DELETE
: delete collection of CloudPrivateIPConfig -
GET
: list objects of kind CloudPrivateIPConfig -
POST
: create a CloudPrivateIPConfig
-
/apis/cloud.network.openshift.io/v1/cloudprivateipconfigs/{name}
-
DELETE
: delete a CloudPrivateIPConfig -
GET
: read the specified CloudPrivateIPConfig -
PATCH
: partially update the specified CloudPrivateIPConfig -
PUT
: replace the specified CloudPrivateIPConfig
-
/apis/cloud.network.openshift.io/v1/cloudprivateipconfigs/{name}/status
-
GET
: read status of the specified CloudPrivateIPConfig -
PATCH
: partially update status of the specified CloudPrivateIPConfig -
PUT
: replace status of the specified CloudPrivateIPConfig
-
5.2.1. /apis/cloud.network.openshift.io/v1/cloudprivateipconfigs
- HTTP method
-
DELETE
- Description
- delete collection of CloudPrivateIPConfig
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
GET
- Description
- list objects of kind CloudPrivateIPConfig
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
POST
- Description
- create a CloudPrivateIPConfig
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 |
5.2.2. /apis/cloud.network.openshift.io/v1/cloudprivateipconfigs/{name}
Parameter | Type | Description |
---|---|---|
|
| name of the CloudPrivateIPConfig |
- HTTP method
-
DELETE
- Description
- delete a CloudPrivateIPConfig
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 CloudPrivateIPConfig
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
PATCH
- Description
- partially update the specified CloudPrivateIPConfig
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 CloudPrivateIPConfig
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 |
5.2.3. /apis/cloud.network.openshift.io/v1/cloudprivateipconfigs/{name}/status
Parameter | Type | Description |
---|---|---|
|
| name of the CloudPrivateIPConfig |
- HTTP method
-
GET
- Description
- read status of the specified CloudPrivateIPConfig
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
PATCH
- Description
- partially update status of the specified CloudPrivateIPConfig
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 CloudPrivateIPConfig
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 ser |