Skip to content

Configlet#

Configuration → CConfiglets

Sometimes custom configuration must be pushed to a node because an existing EDA abstraction does not support it. As the number of supported operating systems increases, abstracting new features into custom resources may take time. Older features that newer protocols have largely replaced may also not have an abstraction.

The Configlet resource allows an operator to make quick configuration adjustments on one or more nodes while preserving EDA's declarative design and network-wide transactions.

Although it may be tempting to make Configlet resources part of your network design, limit their use to small or temporary workarounds. Custom applications avoid the following limitations:

  • A Configlet does not adapt its paths or configuration payloads to schema changes between operating system versions. Use separate Configlet resources for incompatible versions.
  • Other resources do not reference Configlet resources, so a Configlet cannot automatically attach additional configuration to instances of another resource.
  • The Configlet status reports the selected endpoints, but it does not provide per-path operational health or generate alarms for the configuration it pushes.

Targeting nodes#

The Configlet targets nodes listed in the endpoints field and nodes whose labels match the endpointSelectors field.

The operatingSystem and version fields can further restrict the nodes matched by endpointSelectors. Version matching is exact and does not support wildcard characters.

Use label selectors wherever possible

When selecting targets manually with endpoints, every listed node must match the operatingSystem and version specified in the Configlet. Otherwise, the transaction fails.

Priorities#

The priority of a Configlet is an integer between -100 and 100. When configuration values conflict, higher priorities overwrite lower priorities. The default priority is 0.

Dependencies#

TopoNode#

A Configlet can target one or more TopoNode resources. Nodes listed explicitly in endpoints must exist and must match the operatingSystem and version of the Configlet when those fields are set.

Tip

Use endpointSelectors to select nodes by label wherever possible. A Configlet can be created even if no nodes currently match its label selectors, allowing it to target hardware onboarded in the future.

The Configlet is applied only to nodes that match a label selector and, when specified, its operatingSystem and version. This supports node upgrades with schema changes, where a single Configlet is not valid for both operating system versions.

Referenced resources#

The Configlet does not reference any other EDA resources.

Examples#

apiVersion: config.eda.nokia.com/v1
kind: Configlet
metadata:
  name: my-hostname
  namespace: eda
spec:
  priority: 100
  endpointSelectors:
    - eda.nokia.com/role = leaf
  operatingSystem: srl
  version: 25.10.1
  configs:
    - operation: Create
      path: .system.name
      config: |-
        {
            "host-name": "my-hostname-override"
        }
cat << 'EOF' | kubectl apply -f -
apiVersion: config.eda.nokia.com/v1
kind: Configlet
metadata:
  name: my-hostname
  namespace: eda
spec:
  priority: 100
  endpointSelectors:
    - eda.nokia.com/role = leaf
  operatingSystem: srl
  version: 25.10.1
  configs:
    - operation: Create
      path: .system.name
      config: |-
        {
            "host-name": "my-hostname-override"
        }
EOF

Custom Resource Definition#

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

Configlet

config.eda.nokia.com / v1

SPEC

Configlet is a configuration snippet that can be applied to a set of targets. The path on the target is provided in jspath notation, and the configuration is provided as a JSON string. Configlets can be applied to a set of targets based on a label selector, a list of targets, or a combination of both.

  • #
  • #
  • #
  • #
  • #
  • #

STATUS

Deployment status of this Configlet.

  • #