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
Configletdoes not adapt its paths or configuration payloads to schema changes between operating system versions. Use separateConfigletresources for incompatible versions. - Other resources do not reference
Configletresources, so aConfigletcannot automatically attach additional configuration to instances of another resource. - The
Configletstatus 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#
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
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.
-
Configurations to apply, being sets of paths, operations and JSON configurations.
-
Label selector to use to match targets to deploy Configlet to.
-
Reference to targets to deploy Configlet to.
-
Operating system to match against when selecting targets.
enum: "srl", "sros", "eos", +5 more -
Priority of this Configlet, between -100 and 100. Higher priorities overwrite lower priorities in the event of conflicts.
default: 0format: int32range: -100 to 100 -
Version to match against when selecting targets.
STATUS
Deployment status of this Configlet.
-
List of targets this configlet has been applied to.