Topology
Topology custom resource schema.
The Topology CRD is a supported, backward-compatible auxiliary resource for defining a whole
containerlab lab. Its controller compiles the definition into independently reconciled
LauncherProfile, Link, and Node resources. Node and Link are the primary API and do not
require a Topology.
Topology
SPEC
TopologySpec is the spec for a Topology resource.
-
Connectivity defines the type of connectivity to use between nodes in the topology. The default behavior is to use vxlan tunnels, alternatively you can enable a more experimental "slurpeeth" connectivity flavor that stuffs traffic into tcp tunnels to avoid any vxlan mtu and/or fragmentation challenges.
default: "vxlan"enum: "vxlan", "slurpeeth" -
Deployment holds configurations relevant to how clabernetes configures deployments that make up a given topology.
-
ContainerlabDebug sets the
--debugflag when invoking containerlab in the launcher pods. This is disabled by default. If this value is unset, the global config value (default of "false") will be used. -
ContainerlabTimeout sets the
--timeoutflag when invoking containerlab in the launcher pods. -
ContainerlabVersion sets a custom version to use for containerlab -- when set this will cause the launcher pods to download and use this specific version of containerlab. Setting a bad version (version that doesnt exist/typo/etc.) will cause pods to fail to launch, so be careful! You never "need" to this as the publicly available launcher image will always be built with a (reasonably) up to date containerlab version, this setting exists in case you want to pin back to an older version for some reason or you want to be bleeding edge with some new feature (but do note that just because it exists in containerlab doesnt necessarily mean it will be auto-working in clabernetes! 0.78.0 is the floor -- the Node vocabulary includes fields older releases reject outright.
-
ExtraEnv is a list of additional environment variables to set on the launcher container. The values here override any configured global config extra envs!
-
EnvVar represents an environment variable present in a Container.
-
Name of the environment variable. May consist of any printable ASCII characters except '='.
-
Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
-
Source for the environment variable's value. Cannot be used if value is not empty.
-
Selects a key of a ConfigMap.
-
The key to select.
-
Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
default: "" -
Specify whether the ConfigMap or its key must be defined
-
-
Selects a field of the pod: supports metadata.name, metadata.namespace,
metadata.labels['<KEY>'],metadata.annotations['<KEY>'], spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.-
Version of the schema the FieldPath is written in terms of, defaults to "v1".
-
Path of the field to select in the specified API version.
-
-
FileKeyRef selects a key of the env file. Requires the EnvFiles feature gate to be enabled.
-
The key within the env file. An invalid key will prevent the pod from starting. The keys defined within a source may consist of any printable ASCII characters except '='. During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
-
Specify whether the file or its key must be defined. If the file or key does not exist, then the env var is not published. If optional is set to true and the specified key does not exist, the environment variable will not be set in the Pod's containers.
If optional is set to false and the specified key does not exist, an error will be returned during Pod creation.
default: false -
The path within the volume from which to select the file. Must be relative and may not contain the '..' path or start with '..'.
-
The name of the volume mount containing the env file.
-
-
Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
-
Container name: required for volumes, optional for env vars
-
Specifies the output format of the exposed resources, defaults to "1"
-
Required: resource to select
-
-
Selects a key of a secret in the pod's namespace
-
The key of the secret to select from. Must be a valid secret key.
-
Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
default: "" -
Specify whether the Secret or its key must be defined
-
-
-
-
-
FilesFromConfigMap is a slice of FileFromConfigMap that define the configmap/path and node and path on a launcher node that the file should be mounted to. If the path is not provided the configmap is mounted in its entirety (like normal k8s things), so you probably want to specify the sub path unless you are sure what you're doing!
-
Schema for additional map entries.
-
FileFromConfigMap represents a file that you would like to mount (from a configmap) in the launcher pod for a given node.
-
ConfigMapName is the name of the configmap to mount.
-
ConfigMapPath is the path/key in the configmap to mount, if not specified the configmap will be mounted without a sub-path.
-
FilePath is the path to mount the file.
-
Mode sets the file permissions when mounting the configmap. Since the configmap will be read only filesystem anyway, we basically just want to expose if the file should be mounted as executable or not. So, default permissions would be 0o444 (read) and execute would be 0o555.
default: "read"enum: "read", "execute"
-
-
-
-
FilesFromURL is a mapping of FileFromURL that define a URL at which to fetch a file, and path on a launcher node that the file should be downloaded to. This is useful for configs that are larger than the ConfigMap (etcd) 1Mb size limit.
-
Schema for additional map entries.
-
FileFromURL represents a file that you would like to mount from a URL in the launcher pod for a given node.
-
FilePath is the path to mount the file.
-
URL is the url to fetch and mount at the provided FilePath. This URL must be a url that can be simply downloaded and dumped to disk -- meaning a normal file server type endpoint or if using GitHub or similar a "raw" path.
-
-
-
-
LauncherImage sets the default launcher image to use when spawning launcher deployments for this Topology. This is optional, the launcher image will default to whatever is set in the global config CR.
-
LauncherImagePullPolicy sets the default launcher image pull policy to use when spawning launcher deployments for this Topology. This is also optional and defaults to whatever is set in the global config CR (typically "IfNotPresent"). Note: omitempty because empty str does not satisfy enum of course.
enum: "IfNotPresent", "Always", "Never" -
LauncherLogLevel sets the launcher clabernetes worker log level -- this overrides whatever is set on the controllers env vars for this topology. Note: omitempty because empty str does not satisfy enum of course.
enum: "disabled", "critical", "warn", +2 more -
Persistence holds configurations relating to persisting each nodes working containerlab directory.
-
ClaimSize is the size of the PVC for this topology -- if not provided this defaults to 5Gi. If provided, the string value must be a valid kubernetes storage requests style string. Note the claim size cannot be made smaller once created, but it can be expanded. If you need to make the claim smaller you must delete the topology (or the node from the topology) and re-add it.
-
Enabled indicates if persistence of hte containerlab lab/working directory will be placed in a mounted PVC.
-
StorageClassName is the storage class to set in the PVC -- if not provided this will be left empty which will end up using your default storage class. Note that currently we assume you have (as default) or provide a dynamically provisionable storage class, hence no selector.
-
-
PrivilegedLauncher, when true, sets the launcher containers to privileged. Historically we tried very hard to not need to set privileged mode on pods, however the reality is it is much, much easier to get various network operating system images booting with this enabled, so, the default mode is to set the privileged flag on pods. Disabling this option causes clabernetes to try to run the pods for this topology in the "not so privileged" mode -- this basically means we mount all capabilities we think should be available, set apparmor to "unconfined", and mount paths like /dev/kvm and dev/net/tun. With this "not so privileged" mode, Nokia SRL devices and Arista cEOS devices have been able to boot on some clusters, but your mileage may vary. In short: if you don't care about having some privileged pods, just leave this alone.
-
Resources is a mapping of nodeName (or "default") to kubernetes resource requirements -- any value set here overrides the "global" config resource definitions. If a key "default" is set, those resource values will be preferred over all global settings for this topology -- meaning, the "global" resource settings will never be looked up for this topology, and any kind/type that is not in this resources map will have the "default" resources from this mapping applied.
-
ResourceRequirements describes the compute resource requirements.
-
Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container.
This field depends on the DynamicResourceAllocation feature gate.
This field is immutable. It can only be set for containers.
-
ResourceClaim references one entry in PodSpec.ResourceClaims.
-
Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.
-
Request is the name chosen for a request in the referenced claim. If empty, everything from the claim is made available, otherwise only the result of this request.
-
-
-
Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
-
Schema for additional map entries.
-
-
-
-
Scheduling holds information about how the launcher pod(s) should be configured with respect to "scheduling" things (affinity/node selector/tolerations).
-
Affinity sets the affinity rules that will be configured on all launcher pods using this scheduling policy. This supports node affinity, pod affinity, and pod anti-affinity.
-
Describes node affinity scheduling rules for the pod.
-
The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.
-
An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).
-
A node selector term, associated with the corresponding weight.
-
A list of node selector requirements by node's labels.
-
A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
-
The label key that the selector applies to.
-
Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
-
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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.
-
-
-
A list of node selector requirements by node's fields.
-
A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
-
The label key that the selector applies to.
-
Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
-
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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.
-
-
-
-
Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.
format: int32
-
-
-
If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.
-
Required. A list of node selector terms. The terms are ORed.
-
A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.
-
A list of node selector requirements by node's labels.
-
A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
-
The label key that the selector applies to.
-
Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
-
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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.
-
-
-
A list of node selector requirements by node's fields.
-
A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
-
The label key that the selector applies to.
-
Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
-
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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.
-
-
-
-
-
-
-
Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).
-
The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.
-
The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)
-
Required. A pod affinity term, associated with the corresponding weight.
-
A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods.
-
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.
-
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.
-
-
-
-
MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with
labelSelectoraskey in (value)to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. -
MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with
labelSelectoraskey notin (value)to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. -
A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces.
-
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.
-
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.
-
-
-
-
namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace".
-
This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.
-
-
weight associated with matching the corresponding podAffinityTerm, in the range 1-100.
format: int32
-
-
-
If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.
-
Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running
-
A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods.
-
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.
-
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.
-
-
-
-
MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with
labelSelectoraskey in (value)to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. -
MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with
labelSelectoraskey notin (value)to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. -
A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces.
-
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.
-
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.
-
-
-
-
namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace".
-
This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.
-
-
-
-
Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).
-
The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and subtracting "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.
-
The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)
-
Required. A pod affinity term, associated with the corresponding weight.
-
A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods.
-
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.
-
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.
-
-
-
-
MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with
labelSelectoraskey in (value)to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. -
MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with
labelSelectoraskey notin (value)to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. -
A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces.
-
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.
-
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.
-
-
-
-
namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace".
-
This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.
-
-
weight associated with matching the corresponding podAffinityTerm, in the range 1-100.
format: int32
-
-
-
If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.
-
Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running
-
A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods.
-
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.
-
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.
-
-
-
-
MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with
labelSelectoraskey in (value)to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. -
MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with
labelSelectoraskey notin (value)to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. -
A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces.
-
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.
-
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.
-
-
-
-
namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace".
-
This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.
-
-
-
-
-
Tolerations is a list of Tolerations that will be set on the launcher pod spec.
-
The pod this Toleration is attached to tolerates any taint that matches the triple <key,value,effect> using the matching operator .
-
Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
-
Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.
-
Operator represents a key's relationship to the value. Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators).
-
TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.
format: int64 -
Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.
-
-
-
-
-
Expose holds configurations relevant to how clabernetes exposes a topology.
-
DisableAutoExpose disables the automagic exposing of ports for a given topology. When this setting is disabled clabernetes will not auto add ports so if you want to expose (via a load balancer service) you will need to have ports outlined in your containerlab config. When this is
false(default), clabernetes will add and expose the following list of ports to whatever ports you have already defined:21 - tcp - ftp 22 - tcp - ssh 23 - tcp - telnet 80 - tcp - http 161 - udp - snmp 443 - tcp - https 830 - tcp - netconf (over ssh) 5000 - tcp - telnet for vrnetlab qemu host 5900 - tcp - vnc 6030 - tcp - gnmi (arista default) 9339 - tcp - gnmi/gnoi 9340 - tcp - gribi 9559 - tcp - p4rt 57400 - tcp - gnmi (nokia srl/sros default)
This setting is ignored completely if
DisableExposeis true! -
DisableExpose indicates if exposing nodes via LoadBalancer service should be disabled, by default any mapped ports in a containerlab topology will be exposed.
-
ExposeType configures the service type(s) related to exposing the topology. This is an enum that has the following valid values:
- None: expose is not disabled, but we just don't create any services related to the pods, you may want to do this if you want to tickle the pods by pod name directly for some reason while not having extra services floating around.
- ClusterIP: a clusterip service is created so you can hit that service name for the pods.
- Headless: a headless service (clusterIP: None) is created. This is useful when you don't need load-balancing or a single service IP but want to directly connect to pods via DNS records that return pod IPs.
- LoadBalancer: (default) creates a load balancer service so you can access your pods from outside the cluster. this is/was the only behavior up to v0.2.4.
default: "LoadBalancer"enum: "None", "ClusterIP", "Headless", "LoadBalancer" -
UseNodeMgmtIpv4Address, when set to true, the controller will look up each node’s management IPv4 address (from the
mgmt-ipv4field in your containerlab topology) and assign that address toService.spec.loadBalancerIPon the corresponding LoadBalancer Service.- Only applies if
spec.expose.exposeTypeisLoadBalancer. - If the IP is missing or fails validation, a warning is emitted and Kubernetes will allocate an IP automatically.
- Only applies if
-
UseNodeMgmtIpv6Address, when set to true, the controller will look up each node’s management IPv6 address (from the
mgmt-ipv6field in your containerlab topology) and assign that address toService.spec.loadBalancerIPon the corresponding LoadBalancer Service.- Only applies if
spec.expose.exposeTypeisLoadBalancer. - If the IP is missing or fails validation, a warning is emitted and Kubernetes will allocate an IP automatically.
- Only applies if
-
-
ImagePull holds configurations relevant to how clabernetes launcher pods handle pulling images.
-
DockerConfig allows for setting the docker user (for root) config for all launchers in this topology. The secret must be present in the namespace of this topology. The secret must contain a key "config.json" -- as this secret will be mounted to /root/.docker/config.json and as such wil be utilized when doing docker-y things -- this means you can put auth things in here in the event your cluster doesn't support the preferred image pull through option.
-
DockerDaemonConfig allows for setting the docker daemon config for all launchers in this topology. The secret must be present in the namespace of this topology. The secret must contain a key "daemon.json" -- as this secret will be mounted to /etc/docker and docker will be expecting the config at /etc/docker/daemon.json.
-
InsecureRegistries is a slice of strings of insecure registries to configure in the launcher pods.
-
PullSecrets allows for providing secret(s) to use when pulling the image. This is only applicable if ImagePullThrough mode is auto or always. The secret is used by the launcher pod to pull the image via the cluster CRI. The secret is not mounted to the pod, but instead is used in conjunction with a job that spawns a pod using the specified secret. The job will kill the pod as soon as the image has been pulled -- we do this because we don't care if the pod runs, we only care that the image gets pulled on a specific node. Note that just like "normal" pull secrets, the secret needs to be in the namespace that the topology is in.
-
PullThroughOverride allows for overriding the image pull through mode for this particular topology.
enum: "auto", "always", "never"
-
-
Naming tells the clabernetes controller how it should name resources it creates -- that is whether it should include the containerlab topology name as a prefix on resources spawned from this Topology or not; this includes the actual (containerlab) node Deployment(s), as well as the Service(s) for the Topology. This setting has three modes; "prefixed" -- which of course includes the containerlab topology name as a prefix, "non-prefixed" which does not include the containerlab topology name as a prefix, and "global" which defers to the global config setting for this (which defaults to "prefixed"). "non-prefixed" mode should only be enabled when/if Topologies are deployed in their own namespace -- the reason for this is simple: if two Topologies exist in the same namespace with a (containerlab) node named "my-router" there will be a conflicting Deployment and Services for the "my-router" (containerlab) node. Note that this field is immutable! If you want to change its value you need to delete the Topology and re-create it.
default: "global"enum: "prefixed", "non-prefixed", "global" -
StatusProbes holds the configurations relevant to how clabernetes and the launcher handle checking and reporting the containerlab node status
-
Enabled sets the status probes to enabled (or obviously disabled). A Node that has previously started but later fails its readiness check remains running and is reported not ready. A Node that never passes its startup check is restarted after its startup allowance expires.
default: true -
ExcludedNodes is a set of nodes to be excluded from status probe checking. It may be desirable to exclude some node(s) from status checking due to them not having an easy way for clabernetes to check the state of the node. The node names here should match the name of the nodes in the containerlab sub-topology.
-
NodeProbeConfigurations is a map of node specific probe configurations -- if you only need a simple ssh or tcp connect style setup that works on all node types in the topology you can ignore this and just configure ProbeConfiguration.
-
ProbeConfiguration holds optional application-specific probes for a (containerlab) node in a Topology. If both styles are configured, both and the generic nested-container probe must succeed in order to report healthy.
-
StartupSeconds is the total amount of seconds to allow for the node to start. This defaults to roughly 15 minutes to account for slow-to-boot nodes. The allowance must include time for c9s to pull the image, load it into Docker on the launcher, and boot the node. A larger value does not delay fast nodes because the readiness probe takes over as soon as startup succeeds.
-
TCPProbeConfiguration defines a TCP probe.
-
Port defines the port to try to open a TCP connection to. When using TCP probe setup this connection happens inside the launcher rather than the "normal" k8s style probes. This style probe behaves like a k8s style probe though in that it is "successful" whenever a TCP connection to this port can be opened successfully.
-
-
-
ProbeConfiguration is the default probe configuration for the Topology.
-
StartupSeconds is the total amount of seconds to allow for the node to start. This defaults to roughly 15 minutes to account for slow-to-boot nodes. The allowance must include time for c9s to pull the image, load it into Docker on the launcher, and boot the node. A larger value does not delay fast nodes because the readiness probe takes over as soon as startup succeeds.
-
TCPProbeConfiguration defines a TCP probe.
-
Port defines the port to try to open a TCP connection to. When using TCP probe setup this connection happens inside the launcher rather than the "normal" k8s style probes. This style probe behaves like a k8s style probe though in that it is "successful" whenever a TCP connection to this port can be opened successfully.
-
-