Skip to main content
Calico Cloud documentation

BFD configuration

A bidirectional forwarding detection (BFD) configuration resource (BFDConfiguration) represents BFD-specific configuration options for a selection of one or more nodes.

For kubectl commands, the following case-insensitive aliases may be used to specify the resource type on the CLI: bfdconfiguration.projectcalico.org, bfdconfigurations.projectcalico.org as well as abbreviations such as bfdconfiguration.p and bfdconfigurations.p.

Sample YAML​

apiVersion: projectcalico.org/v3
kind: BFDConfiguration
metadata:
name: default
spec:
nodeSelector: "all()"
interfaces:
- matchPattern: "*"
minimumRecvInterval: 10ms
minimumSendInterval: 100ms
idleSendInterval: 1m
multiplier: 5

BFD configuration definition​

Metadata​

FieldDescriptionAccepted ValuesSchema
nameUnique name to describe this resource instance. Required.Alphanumeric string with optional ., _, or -.string

Spec​

FieldDescriptionAccepted ValuesSchemaDefault
nodeSelectorSelects one or more nodes to which this resource applies.stringselector
interfacesList of per-interface BFD configuration parameters.List of BFDInterface

BFDInterface​

FieldDescriptionAccepted ValuesSchemaDefault
matchPatternPattern to match one or more interfaces. Supports exact interface names, match on interface prefixes (e.g., “eth*”), or “*” to select all interfaces on the selected node(s).string
minimumRecvIntervalThe minimum interval between received BFD packets. Must be a whole number of milliseconds greater than 0.string10ms
minimumSendIntervalThe minimum interval between transmitted BFD packets. Must be a whole number of milliseconds greater than 0.string100ms
idleSendIntervalThe interval between transmitted BFD packets when the BFD peer is idle. Must be a whole number of milliseconds greater than 0.string1m
multiplierThe number of intervals that must pass without receiving a BFD packet before the peer is considered down.string5

Selector​

A label selector is an expression which either matches or does not match a resource based on its labels.

Calico Enterprise label selectors support a number of operators, which can be combined into larger expressions using the boolean operators and parentheses.

ExpressionMeaning
Logical operators
( <expression> )Matches if and only if <expression> matches. (Parentheses are used for grouping expressions.)
! <expression>Matches if and only if <expression> does not match. Tip: ! is a special character at the start of a YAML string, if you need to use ! at the start of a YAML string, enclose the string in quotes.
<expression 1> && <expression 2>"And": matches if and only if both <expression 1>, and, <expression 2> matches
<expression 1> || <expression 2>"Or": matches if and only if either <expression 1>, or, <expression 2> matches.
Match operators
all()Match all in-scope resources. To match no resources, combine this operator with ! to form !all().
global()Match all non-namespaced resources. Useful in a namespaceSelector to select global resources such as global network sets.
k == 'v'Matches resources with the label 'k' and value 'v'.
k != 'v'Matches resources without label 'k' or with label 'k' and value not equal to v
has(k)Matches resources with label 'k', independent of value. To match pods that do not have label k, combine this operator with ! to form !has(k)
k in { 'v1', 'v2' }Matches resources with label 'k' and value in the given set
k not in { 'v1', 'v2' }Matches resources without label 'k' or with label 'k' and value not in the given set
k contains 's'Matches resources with label 'k' and value containing the substring 's'
k starts with 's'Matches resources with label 'k' and value starting with the substring 's'
k ends with 's'Matches resources with label 'k' and value ending with the substring 's'

Operators have the following precedence:

  • Highest: all the match operators
  • Parentheses ( ... )
  • Negation with !
  • Conjunction with &&
  • Lowest: Disjunction with ||

For example, the expression

! has(my-label) || my-label starts with 'prod' && role in {'frontend','business'}

Would be "bracketed" like this:

((!(has(my-label)) || ((my-label starts with 'prod') && (role in {'frontend','business'}))

It would match:

  • Any resource that did not have label "my-label".
  • Any resource that both:
    • Has a value for my-label that starts with "prod", and,
    • Has a role label with value either "frontend", or "business".

Selectors can be at most 1024 characters long, with parentheses nested at most 100 deep. The API server rejects longer or deeper selectors. If a stored resource has a selector nested more than 100 deep, Felix ignores the resource and logs a warning.

Supported operations​

Datastore typeCreateDeleteUpdateGet/ListNotes
Kubernetes API serverYesYesYesYes