Skip to content

Drain#

Maintenance → DDrains

The Drain resource is used to divert traffic away from a certain node. It accomplishes this by installing a routing Policy that artificially extends the AS path of outgoing BGP routes, causing peers to uninstall those routes as they are no longer the most optimal.

Warning

Installing a Drain resource on a DefaultRouter does not stop the advertisement of any routes, and therefore does not drop traffic: if the only route to a particular IP-prefix goes through the drained DefaultRouter, it will still go through that node!

This resource is usually created as part of a workflow, like the DeployImage workflow.

Dependencies#

DefaultRouter#

The Drain resource creates and installs a BGP routing Policy which is installed in any selected DefaultRouter. If these DefaultRouter resources are selected using the defaultRouters property, they must exist before the Drain resource is created.

Referenced resources#

The Drain has no references to any other EDA resources.

Examples#

apiVersion: routing.eda.nokia.com/v1
kind: Drain
metadata:
  namespace: eda
  name: my-drain
spec:
  enabled: true
  defaultRouters:
    - router-leaf-1
    - router-spine-2
cat << 'EOF' | kubectl apply -f -
apiVersion: routing.eda.nokia.com/v1
kind: Drain
metadata:
  namespace: eda
  name: my-drain
spec:
  enabled: true
  defaultRouters:
    - router-leaf-1
    - router-spine-2
EOF

Custom Resource Definition#

To browse the Custom Resource Definition go to crd.eda.dev.

Drain

routing.eda.nokia.com / v1

SPEC

Drain allows for the controlled disabling or draining of specific DefaultRouters, either by selecting them through labels or directly referencing them, ensuring traffic is safely rerouted or dropped before the routers are decommissioned.

  • #
  • #
  • #

STATUS

DrainStatus defines the observed state of Drain.

  • #