Documentation ¶
Overview ¶
+k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +groupName=clabernetes.containerlab.dev
Index ¶
- Constants
- Variables
- func GetAPIs() (apimachineryscheme.GroupVersion, []apimachineryruntime.Object)
- type Config
- type ConfigDeployment
- type ConfigImagePull
- type ConfigList
- type ConfigMetadata
- type ConfigSpec
- type ConfigStatus
- type Connectivity
- type ConnectivityList
- type ConnectivitySpec
- type ConnectivityStatus
- type Definition
- type Deployment
- type Expose
- type ExposedPorts
- type FileFromConfigMap
- type FileFromURL
- type ImagePull
- type ImageRequest
- type ImageRequestList
- type ImageRequestSpec
- type ImageRequestStatus
- type InsecureRegistries
- type LinkEndpoint
- type Persistence
- type PointToPointTunnel
- type ReconcileHashes
- type Scheduling
- type Topology
- type TopologyList
- type TopologySpec
- type TopologyStatus
Constants ¶
const LinkEndpointElementCount = 2
LinkEndpointElementCount defines the expected element count for a link endpoint slice.
const (
// Version is the API version.
Version = "v1alpha1"
)
Variables ¶
var AddToScheme = localSchemeBuilder.AddToScheme
AddToScheme adds the types in this group-version to the given scheme.
var SchemeGroupVersion = apimachineryscheme.GroupVersion{ Group: clabernetesapis.Group, Version: Version, }
SchemeGroupVersion is group version used to register these objects.
Functions ¶
func GetAPIs ¶
func GetAPIs() (apimachineryscheme.GroupVersion, []apimachineryruntime.Object)
GetAPIs returns the information necessary to register this package's types to a scheme.
Types ¶
type Config ¶
type Config struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ConfigSpec `json:"spec,omitempty"` Status ConfigStatus `json:"status,omitempty"` }
Config is an object that holds global clabernetes config information. Note that this CR is expected to effectively be a global singleton -- that is, there should be only *one* of these, and it *must* be named `clabernetes` -- CRD metadata spec will enforce this (via x-validation rules). +k8s:openapi-gen=true +kubebuilder:validation:XValidation:rule=(self.metadata.name == 'clabernetes')
func (*Config) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config.
func (*Config) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Config) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ConfigDeployment ¶
type ConfigDeployment struct { // ResourcesDefault is the default set of resources for clabernetes launcher pods. This is used // only as a last option if a Topology does not have resources, and there are no resources for // the given containerlab kind/type // +optional ResourcesDefault *k8scorev1.ResourceRequirements `json:"resourcesDefault"` // ResourcesByContainerlabKind is a mapping of container lab kind -> type -> default resource // settings. Note that a key value of "default" in the inner map will apply the given resources // for any pod of that containerlab *kind*. For example: // { // "srl": { // "default": DEFAULT RESOURCES FOR KIND "srl", // "ixr10": RESOURCES FOR KIND "srl", TYPE "ixr10" // } // Given resources as above, a containerlab node of kind "srl" and "type" ixr10" would get the // specific resources as allocated in the ixr10 key, whereas a containerlab kind of "srl" and // "type" unset or "ixr6" would get the "default" resource settings. To apply global default // resources, regardless of containerlab kind/type, use the `resourcesDefault` field. // +optional ResourcesByContainerlabKind map[string]map[string]*k8scorev1.ResourceRequirements `json:"resourcesByContainerlabKind"` //nolint:lll // PrivilegedLauncher, when true, sets the launcher containers to privileged. By default, we do // our best to *not* need this/set this, and instead set only the capabilities we need, however // its possible that some containers launched by the launcher may need/want more capabilities, // so this flag exists for users to bypass the default settings and enable fully privileged // launcher pods. // +optional PrivilegedLauncher bool `json:"privilegedLauncher"` // ContainerlabDebug sets the `--debug` flag when invoking containerlab in the launcher pods. // This is disabled by default. // +optional ContainerlabDebug bool `json:"containerlabDebug"` // ContainerlabTimeout sets the `--timeout` flag when invoking containerlab in the launcher // pods. // +optional ContainerlabTimeout string `json:"containerlabTimeout"` // 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! // +optional ContainerlabVersion string `json:"containerlabVersion,omitempty"` // LauncherImage sets the default launcher image to use when spawning launcher deployments. // +kubebuilder:default="ghcr.io/srl-labs/clabernetes/clabernetes-launcher:latest" LauncherImage string `json:"launcherImage"` // LauncherImagePullPolicy sets the default launcher image pull policy to use when spawning // launcher deployments. // +kubebuilder:validation:Enum=IfNotPresent;Always;Never // +kubebuilder:default=IfNotPresent LauncherImagePullPolicy string `json:"launcherImagePullPolicy"` // 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. // +kubebuilder:validation:Enum=disabled;critical;warn;info;debug // +optional LauncherLogLevel string `json:"launcherLogLevel,omitempty"` }
ConfigDeployment holds "global" or "default" configurations related to clabernetes spawned deployments. In the future this will likely include more of the "normal" (topology-level) deployment configs (ex: persistence, or maybe files from url).
func (*ConfigDeployment) DeepCopy ¶
func (in *ConfigDeployment) DeepCopy() *ConfigDeployment
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigDeployment.
func (*ConfigDeployment) DeepCopyInto ¶
func (in *ConfigDeployment) DeepCopyInto(out *ConfigDeployment)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConfigImagePull ¶
type ConfigImagePull struct { // PullThroughOverride allows for overriding the image pull through mode for this // particular topology. // +kubebuilder:validation:Enum=auto;always;never // +optional PullThroughOverride string `json:"pullThroughOverride,omitempty"` // CRISockOverride allows for overriding the path of the CRI sock that is mounted in the // launcher pods (if/when image pull through mode is auto or always). This can be useful if, // for example, the CRI sock is in a "non-standard" location like K3s which puts the containerd // sock at `/run/k3s/containerd/containerd.sock` rather than the "normal" (whatever that means) // location of `/run/containerd/containerd.sock`. The value must end with "containerd.sock" for // now, in the future maybe crio support will be added. // +kubebuilder:validation:Pattern=(.*containerd\.sock) // +optional CRISockOverride string `json:"criSockOverride,omitempty"` // CRIKindOverride allows for overriding the auto discovered cri flavor of the cluster -- this // may be useful if we fail to parse the cri kind for some reason, or in mixed cri flavor // clusters -- however in the latter case, make sure that if you are using image pull through // that clabernetes workloads are only run on the nodes of the cri kind specified here! // +kubebuilder:validation:Enum=containerd // +optional CRIKindOverride string `json:"criKindOverride,omitempty"` // DockerDaemonConfig allows for setting a default docker daemon config for launcher pods // with the specified secret. The secret *must be present in the namespace of any given // topology* -- so if you are configuring this at the "global config" level, ensure that you are // deploying topologies into a specific namespace, or have ensured there is a secret of the // given name in every namespace you wish to deploy a topology to. When set, insecure registries // config option is ignored as it is assumed you are handling that in the given docker config. // Note that 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. // +optional DockerDaemonConfig string `json:"dockerDaemonConfig,omitempty"` // 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. // +optional DockerConfig string `json:"dockerConfig,omitempty"` }
ConfigImagePull holds configurations relevant to how clabernetes launcher pods handle pulling images.
func (*ConfigImagePull) DeepCopy ¶
func (in *ConfigImagePull) DeepCopy() *ConfigImagePull
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigImagePull.
func (*ConfigImagePull) DeepCopyInto ¶
func (in *ConfigImagePull) DeepCopyInto(out *ConfigImagePull)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConfigList ¶
type ConfigList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Config `json:"items"` }
ConfigList is a list of Config objects.
func (*ConfigList) DeepCopy ¶
func (in *ConfigList) DeepCopy() *ConfigList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigList.
func (*ConfigList) DeepCopyInto ¶
func (in *ConfigList) DeepCopyInto(out *ConfigList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ConfigList) DeepCopyObject ¶
func (in *ConfigList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ConfigMetadata ¶
type ConfigMetadata struct { // Annotations holds key/value pairs that should be set as annotations on clabernetes created // resources. Note that (currently?) there is no input validation here, but this data must be // valid kubernetes annotation data. // +optional Annotations map[string]string `json:"annotations"` // Labels holds key/value pairs that should be set as labels on clabernetes created resources. // Note that (currently?) there is no input validation here, but this data must be valid // kubernetes label data. // +optional Labels map[string]string `json:"labels"` }
ConfigMetadata holds "global" configuration data that will be applied to all objects created by the clabernetes controller.
func (*ConfigMetadata) DeepCopy ¶
func (in *ConfigMetadata) DeepCopy() *ConfigMetadata
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMetadata.
func (*ConfigMetadata) DeepCopyInto ¶
func (in *ConfigMetadata) DeepCopyInto(out *ConfigMetadata)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConfigSpec ¶
type ConfigSpec struct { // Metadata holds "global" metadata -- that is, metadata that is applied to all objects created // by the clabernetes controller. // +optional Metadata ConfigMetadata `json:"metadata"` // InClusterDNSSuffix overrides the default in cluster dns suffix used when resolving services. // +optional InClusterDNSSuffix string `json:"inClusterDNSSuffix,omitempty"` // ImagePull holds configurations relevant to how clabernetes launcher pods handle pulling // images. // +optional ImagePull ConfigImagePull `json:"imagePull"` // Deployment holds clabernetes deployment related configuration settings. // +optional Deployment ConfigDeployment `json:"deployment"` // Naming holds the global override for the "naming" setting for Topology objects -- this // controls whether the Topology resources have the containerlab topology name as a prefix. // Of course this is ignored if a Topology sets its Naming field to something not "global". // +kubebuilder:validation:Enum=prefixed;non-prefixed // +kubebuilder:default=prefixed // +optional Naming string `json:"naming"` }
ConfigSpec is the spec for a Config resource.
func (*ConfigSpec) DeepCopy ¶
func (in *ConfigSpec) DeepCopy() *ConfigSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigSpec.
func (*ConfigSpec) DeepCopyInto ¶
func (in *ConfigSpec) DeepCopyInto(out *ConfigSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConfigStatus ¶
type ConfigStatus struct{}
ConfigStatus is the status for a Config resource.
func (*ConfigStatus) DeepCopy ¶
func (in *ConfigStatus) DeepCopy() *ConfigStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigStatus.
func (*ConfigStatus) DeepCopyInto ¶
func (in *ConfigStatus) DeepCopyInto(out *ConfigStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Connectivity ¶ added in v0.0.21
type Connectivity struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ConnectivitySpec `json:"spec,omitempty"` Status ConnectivityStatus `json:"status,omitempty"` }
Connectivity is an object that holds information about a connectivity between launcher pods in a clabernetes Topology. +k8s:openapi-gen=true
func (*Connectivity) DeepCopy ¶ added in v0.0.21
func (in *Connectivity) DeepCopy() *Connectivity
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Connectivity.
func (*Connectivity) DeepCopyInto ¶ added in v0.0.21
func (in *Connectivity) DeepCopyInto(out *Connectivity)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Connectivity) DeepCopyObject ¶ added in v0.0.21
func (in *Connectivity) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ConnectivityList ¶ added in v0.0.21
type ConnectivityList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Connectivity `json:"items"` }
ConnectivityList is a list of Connectivity objects.
func (*ConnectivityList) DeepCopy ¶ added in v0.0.21
func (in *ConnectivityList) DeepCopy() *ConnectivityList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectivityList.
func (*ConnectivityList) DeepCopyInto ¶ added in v0.0.21
func (in *ConnectivityList) DeepCopyInto(out *ConnectivityList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ConnectivityList) DeepCopyObject ¶ added in v0.0.21
func (in *ConnectivityList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ConnectivitySpec ¶ added in v0.0.21
type ConnectivitySpec struct { // PointToPointTunnels holds point-to-point connectivity information for a given topology. The // mapping is nodeName (i.e. srl1) -> p2p tunnel data. Both sides of the tunnel should be able // to use this information to establish connectivity between Topology nodes. PointToPointTunnels map[string][]*PointToPointTunnel `json:"pointToPointTunnels"` }
ConnectivitySpec is the spec for a Connectivity resource.
func (*ConnectivitySpec) DeepCopy ¶ added in v0.0.21
func (in *ConnectivitySpec) DeepCopy() *ConnectivitySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectivitySpec.
func (*ConnectivitySpec) DeepCopyInto ¶ added in v0.0.21
func (in *ConnectivitySpec) DeepCopyInto(out *ConnectivitySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConnectivityStatus ¶ added in v0.0.21
type ConnectivityStatus struct{}
ConnectivityStatus is the status for a Connectivity resource.
func (*ConnectivityStatus) DeepCopy ¶ added in v0.0.21
func (in *ConnectivityStatus) DeepCopy() *ConnectivityStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectivityStatus.
func (*ConnectivityStatus) DeepCopyInto ¶ added in v0.0.21
func (in *ConnectivityStatus) DeepCopyInto(out *ConnectivityStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Definition ¶
type Definition struct { // Containerlab holds a valid containerlab topology. // +optional Containerlab string `json:"containerlab,omitempty"` // Kne holds a valid kne topology. // +optional Kne string `json:"kne,omitempty"` }
Definition holds the underlying topology definition for the Topology CR. A Topology *must* have one -- and only one -- definition type defined.
func (*Definition) DeepCopy ¶
func (in *Definition) DeepCopy() *Definition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Definition.
func (*Definition) DeepCopyInto ¶
func (in *Definition) DeepCopyInto(out *Definition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Deployment ¶
type Deployment struct { // 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. // +optional Resources map[string]k8scorev1.ResourceRequirements `json:"resources"` // Scheduling holds information about how the launcher pod(s) should be configured with respect // to "scheduling" things (affinity/node selector/tolerations). // +optional Scheduling Scheduling `json:"scheduling"` // 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. // +optional PrivilegedLauncher *bool `json:"privilegedLauncher"` // 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! // +optional FilesFromConfigMap map[string][]FileFromConfigMap `json:"filesFromConfigMap"` // 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. // +optional FilesFromURL map[string][]FileFromURL `json:"filesFromURL"` // Persistence holds configurations relating to persisting each nodes working containerlab // directory. // +optional Persistence Persistence `json:"persistence"` // ContainerlabDebug sets the `--debug` flag 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. // +optional ContainerlabDebug *bool `json:"containerlabDebug"` // ContainerlabTimeout sets the `--timeout` flag when invoking containerlab in the launcher // pods. // +optional ContainerlabTimeout string `json:"containerlabTimeout"` // 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! // +optional ContainerlabVersion string `json:"containerlabVersion,omitempty"` // 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. // +optional LauncherImage string `json:"launcherImage,omitempty"` // 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. // +kubebuilder:validation:Enum=IfNotPresent;Always;Never // +optional LauncherImagePullPolicy string `json:"launcherImagePullPolicy,omitempty"` // 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. // +kubebuilder:validation:Enum=disabled;critical;warn;info;debug // +optional LauncherLogLevel string `json:"launcherLogLevel,omitempty"` }
Deployment holds configurations relevant to how clabernetes configures deployments that make up a given topology.
func (*Deployment) DeepCopy ¶
func (in *Deployment) DeepCopy() *Deployment
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Deployment.
func (*Deployment) DeepCopyInto ¶
func (in *Deployment) DeepCopyInto(out *Deployment)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Expose ¶
type Expose struct { // DisableExpose indicates if exposing nodes via LoadBalancer service should be disabled, by // default any mapped ports in a containerlab topology will be exposed. // +optional DisableExpose bool `json:"disableExpose"` // 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 // (or equivalent for kne). 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 `DisableExpose` is true! // // +optional DisableAutoExpose bool `json:"disableAutoExpose"` }
Expose holds configurations relevant to how clabernetes exposes a topology.
func (*Expose) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Expose.
func (*Expose) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExposedPorts ¶
type ExposedPorts struct { // LoadBalancerAddress holds the address assigned to the load balancer exposing ports for a // given node. LoadBalancerAddress string `json:"loadBalancerAddress"` // TCPPorts is a list of TCP ports exposed on the LoadBalancer service. // +listType=set TCPPorts []int `json:"tcpPorts"` // UDPPorts is a list of UDP ports exposed on the LoadBalancer service. // +listType=set UDPPorts []int `json:"udpPorts"` }
ExposedPorts holds information about exposed ports.
func (*ExposedPorts) DeepCopy ¶
func (in *ExposedPorts) DeepCopy() *ExposedPorts
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExposedPorts.
func (*ExposedPorts) DeepCopyInto ¶
func (in *ExposedPorts) DeepCopyInto(out *ExposedPorts)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FileFromConfigMap ¶
type FileFromConfigMap struct { // FilePath is the path to mount the file. FilePath string `json:"filePath"` // ConfigMapName is the name of the configmap to mount. ConfigMapName string `json:"configMapName"` // ConfigMapPath is the path/key in the configmap to mount, if not specified the configmap will // be mounted without a sub-path. // +optional ConfigMapPath string `json:"configMapPath"` // 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. // +kubebuilder:validation:Enum=read;execute // +kubebuilder:default=read Mode string `json:"mode"` }
FileFromConfigMap represents a file that you would like to mount (from a configmap) in the launcher pod for a given node.
func (*FileFromConfigMap) DeepCopy ¶
func (in *FileFromConfigMap) DeepCopy() *FileFromConfigMap
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileFromConfigMap.
func (*FileFromConfigMap) DeepCopyInto ¶
func (in *FileFromConfigMap) DeepCopyInto(out *FileFromConfigMap)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FileFromURL ¶
type FileFromURL struct { // FilePath is the path to mount the file. FilePath string `json:"filePath"` // 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. URL string `json:"url"` }
FileFromURL represents a file that you would like to mount from a URL in the launcher pod for a given node.
func (*FileFromURL) DeepCopy ¶
func (in *FileFromURL) DeepCopy() *FileFromURL
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileFromURL.
func (*FileFromURL) DeepCopyInto ¶
func (in *FileFromURL) DeepCopyInto(out *FileFromURL)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ImagePull ¶
type ImagePull struct { // InsecureRegistries is a slice of strings of insecure registries to configure in the launcher // pods. // +optional InsecureRegistries InsecureRegistries `json:"insecureRegistries"` // PullThroughOverride allows for overriding the image pull through mode for this // particular topology. // +kubebuilder:validation:Enum=auto;always;never // +optional PullThroughOverride string `json:"pullThroughOverride,omitempty"` // 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. // +listType=set // +optional PullSecrets []string `json:"pullSecrets"` // 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. // +optional DockerDaemonConfig string `json:"dockerDaemonConfig,omitempty"` // 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. // +optional DockerConfig string `json:"dockerConfig,omitempty"` }
ImagePull holds configurations relevant to how clabernetes launcher pods handle pulling images.
func (*ImagePull) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePull.
func (*ImagePull) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ImageRequest ¶
type ImageRequest struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ImageRequestSpec `json:"spec,omitempty"` Status ImageRequestStatus `json:"status,omitempty"` }
ImageRequest is an object that represents a request (from a launcher pod) to pull an image on a given kubernetes node such that the image can be "pulled through" into the launcher docker daemon. +k8s:openapi-gen=true
func (*ImageRequest) DeepCopy ¶
func (in *ImageRequest) DeepCopy() *ImageRequest
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageRequest.
func (*ImageRequest) DeepCopyInto ¶
func (in *ImageRequest) DeepCopyInto(out *ImageRequest)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ImageRequest) DeepCopyObject ¶
func (in *ImageRequest) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ImageRequestList ¶
type ImageRequestList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ImageRequest `json:"items"` }
ImageRequestList is a list of ImageRequest objects.
func (*ImageRequestList) DeepCopy ¶
func (in *ImageRequestList) DeepCopy() *ImageRequestList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageRequestList.
func (*ImageRequestList) DeepCopyInto ¶
func (in *ImageRequestList) DeepCopyInto(out *ImageRequestList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ImageRequestList) DeepCopyObject ¶
func (in *ImageRequestList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ImageRequestSpec ¶
type ImageRequestSpec struct { // TopologyName is the name of the topology requesting the image. TopologyName string `json:"topologyName"` // TopologyNodeName is the name of the node in the topology (i.e. the router name in a // containerlab topology) that the image is being requested for. TopologyNodeName string `json:"topologyNodeName"` // KubernetesNode is the node where the launcher pod is running and where the image should be // pulled too. KubernetesNode string `json:"kubernetesNode"` // RequestedImage is the image that the launcher pod wants the controller to get pulled onto // the specified node. RequestedImage string `json:"requestedImage"` // RequestedImagePullSecrets is a list of configured pull secrets to set in the pull pod spec. // +listType=set // +optional RequestedImagePullSecrets []string `json:"requestedImagePullSecrets"` }
ImageRequestSpec is the spec for a Config resource.
func (*ImageRequestSpec) DeepCopy ¶
func (in *ImageRequestSpec) DeepCopy() *ImageRequestSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageRequestSpec.
func (*ImageRequestSpec) DeepCopyInto ¶
func (in *ImageRequestSpec) DeepCopyInto(out *ImageRequestSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ImageRequestStatus ¶
type ImageRequestStatus struct { // Accepted indicates that the ImageRequest controller has seen this image request and is going // to process it. This can be useful to let the requesting pod know that "yep, this is in the // works, and i can go watch the cri images on this node now". Accepted bool `json:"accepted"` // Complete indicates that the ImageRequest controller has seen that the puller pod has done its // job and that the image has been pulled onto the requested node. Complete bool `json:"complete"` }
ImageRequestStatus is the status for a ImageRequest resource.
func (*ImageRequestStatus) DeepCopy ¶
func (in *ImageRequestStatus) DeepCopy() *ImageRequestStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageRequestStatus.
func (*ImageRequestStatus) DeepCopyInto ¶
func (in *ImageRequestStatus) DeepCopyInto(out *ImageRequestStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InsecureRegistries ¶
type InsecureRegistries []string
InsecureRegistries is a slice of strings of insecure registries to configure in the launcher pods.
func (InsecureRegistries) DeepCopy ¶
func (in InsecureRegistries) DeepCopy() InsecureRegistries
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InsecureRegistries.
func (InsecureRegistries) DeepCopyInto ¶
func (in InsecureRegistries) DeepCopyInto(out *InsecureRegistries)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LinkEndpoint ¶
type LinkEndpoint struct { // NodeName is the name of the node this link resides on. NodeName string `json:"nodeName"` // InterfaceName is the name of the interface on the node this link is on. InterfaceName string `json:"interfaceName"` }
LinkEndpoint is a simple struct to hold node/interface name info for a given link.
func (*LinkEndpoint) DeepCopy ¶
func (in *LinkEndpoint) DeepCopy() *LinkEndpoint
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LinkEndpoint.
func (*LinkEndpoint) DeepCopyInto ¶
func (in *LinkEndpoint) DeepCopyInto(out *LinkEndpoint)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Persistence ¶
type Persistence struct { // Enabled indicates if persistence of hte containerlab lab/working directory will be placed in // a mounted PVC. Enabled bool `json:"enabled"` // 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. // +optional ClaimSize string `json:"claimSize,omitempty"` // 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. // +optional StorageClassName string `json:"storageClassName,omitempty"` }
Persistence holds information about how to persist the containlerab lab directory for each node in a topology.
func (*Persistence) DeepCopy ¶
func (in *Persistence) DeepCopy() *Persistence
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Persistence.
func (*Persistence) DeepCopyInto ¶
func (in *Persistence) DeepCopyInto(out *Persistence)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PointToPointTunnel ¶ added in v0.0.21
type PointToPointTunnel struct { // TunnelID is the id number of the tunnel (vnid or segment id). TunnelID int `json:"tunnelID"` // Destination is the destination service to connect to (qualified k8s service name). Destination string `json:"destination"` // LocalNodeName is the name (in the clabernetes topology) of the local node for this side of // the tunnel. LocalNode string `json:"localNode"` // LocalInterface is the local termination of this tunnel. LocalInterface string `json:"localInterface"` // RemoteNode is the name (in the clabernetes topology) of the remote node for this side of the // tunnel. RemoteNode string `json:"remoteNode"` // RemoteInterface is the remote termination interface of this tunnel -- necessary to store so // can properly align tunnels (and ids!) between nodes; basically to know which tunnels are // "paired up". RemoteInterface string `json:"remoteInterface"` }
PointToPointTunnel holds information necessary for creating a tunnel between two interfaces on different nodes of a clabernetes Topology. This connection can be established by using clab tools (vxlan) or the experimental slurpeeth (tcp tunnel magic).
func (*PointToPointTunnel) DeepCopy ¶ added in v0.0.21
func (in *PointToPointTunnel) DeepCopy() *PointToPointTunnel
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PointToPointTunnel.
func (*PointToPointTunnel) DeepCopyInto ¶ added in v0.0.21
func (in *PointToPointTunnel) DeepCopyInto(out *PointToPointTunnel)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReconcileHashes ¶
type ReconcileHashes struct { // Config is the last stored hash of the rendered config(s) -- that is, the map of "sub // topologies" representing the overall Topology.Spec.Definition. Config string `json:"config"` // ExposedPorts is the last stored hash of the exposed ports mapping for this Topology. Note // that while we obviously care about the exposed ports on a *per node basis*, we don't need to // track that here -- this is here strictly to track differences in the load balancer service -- // the actual sub-topologies (or sub-configs) effectively track the expose port status per node. ExposedPorts string `json:"exposedPorts"` // FilesFromURL is the hash of the last stored mapping of files from URL (to node mapping). Note // that this is tracked on a *per node basis* because the URL of a file could be updated without // any change to the actual config/topology (or sub-config/sub-topology); as such we need to // explicitly track this per node to know when a node needs to be restarted such that the new // URL is "picked up" by the node/launcher. FilesFromURL map[string]string `json:"filesFromURL"` // ImagePullSecrets is the hash of hte last stored image pull secrets for this Topology. ImagePullSecrets string `json:"imagePullSecrets"` }
ReconcileHashes holds hashes of the last recorded reconciliation -- these are used to know if things have changed between the last and current reconciliation.
func (*ReconcileHashes) DeepCopy ¶
func (in *ReconcileHashes) DeepCopy() *ReconcileHashes
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReconcileHashes.
func (*ReconcileHashes) DeepCopyInto ¶
func (in *ReconcileHashes) DeepCopyInto(out *ReconcileHashes)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Scheduling ¶ added in v0.0.20
type Scheduling struct { // NodeSelector sets the node selector that will be configured on all launcher pods for this // Topology. // +optional NodeSelector map[string]string `json:"nodeSelector,omitempty"` // Tolerations is a list of Tolerations that will be set on the launcher pod spec. // +listType=atomic // +optional Tolerations []k8scorev1.Toleration `json:"tolerations"` }
Scheduling holds information about how the launcher pod(s) should be configured with respect to "scheduling" things (affinity/node selector/tolerations).
func (*Scheduling) DeepCopy ¶ added in v0.0.20
func (in *Scheduling) DeepCopy() *Scheduling
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Scheduling.
func (*Scheduling) DeepCopyInto ¶ added in v0.0.20
func (in *Scheduling) DeepCopyInto(out *Scheduling)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Topology ¶
type Topology struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec TopologySpec `json:"spec,omitempty"` Status TopologyStatus `json:"status,omitempty"` }
Topology is an object that holds information about a clabernetes Topology -- that is, a valid topology file (ex: containerlab topology), and any associated configurations. +k8s:openapi-gen=true +kubebuilder:resource:path="topologies" +kubebuilder:printcolumn:JSONPath=".status.kind",name=Kind,type=string +kubebuilder:printcolumn:JSONPath=".metadata.creationTimestamp",name=Age,type=date
func (*Topology) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Topology.
func (*Topology) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Topology) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TopologyList ¶
type TopologyList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Topology `json:"items"` }
TopologyList is a list of Topology objects.
func (*TopologyList) DeepCopy ¶
func (in *TopologyList) DeepCopy() *TopologyList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TopologyList.
func (*TopologyList) DeepCopyInto ¶
func (in *TopologyList) DeepCopyInto(out *TopologyList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TopologyList) DeepCopyObject ¶
func (in *TopologyList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TopologySpec ¶
type TopologySpec struct { // Definition defines the actual set of nodes (network ones, not k8s ones!) that this Topology // CR represents. Historically, and probably most often, this means Topology holds a "normal" // containerlab topology file that will be "clabernetsified", however this could also be a "kne" // config, or perhaps others in the future. Definition Definition `json:"definition"` // Expose holds configurations relevant to how clabernetes exposes a topology. // +optional Expose Expose `json:"expose"` // Deployment holds configurations relevant to how clabernetes configures deployments that make // up a given topology. // +optional Deployment Deployment `json:"deployment"` // ImagePull holds configurations relevant to how clabernetes launcher pods handle pulling // images. // +optional ImagePull ImagePull `json:"imagePull"` // 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. // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="naming field is immutable, to change this value delete and re-create the Topology" // +kubebuilder:validation:Enum=prefixed;non-prefixed;global // +kubebuilder:default=global Naming string `json:"naming"` // 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. // +kubebuilder:validation:Enum=vxlan;slurpeeth // +kubebuilder:default=vxlan Connectivity string `json:"connectivity"` }
TopologySpec is the spec for a Topology resource. +kubebuilder:validation:XValidation:rule="!has(oldSelf.naming) || has(self.naming)", message="naming is required once set"
func (*TopologySpec) DeepCopy ¶
func (in *TopologySpec) DeepCopy() *TopologySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TopologySpec.
func (*TopologySpec) DeepCopyInto ¶
func (in *TopologySpec) DeepCopyInto(out *TopologySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TopologyStatus ¶
type TopologyStatus struct { // Kind is the topology kind this CR represents -- for example "containerlab". // +kubebuilder:validation:Enum=containerlab;kne Kind string `json:"kind"` // RemoveTopologyPrefix holds the "resolved" value of the RemoveTopologyPrefix field -- that is // if it is unset (nil) when a Topology is created, the controller will use the default global // config value (false); if the field is non-nil, this status field will hold the non-nil value. RemoveTopologyPrefix *bool `json:"removeTopologyPrefix"` // ReconcileHashes holds the hashes form the last reconciliation run. ReconcileHashes ReconcileHashes `json:"reconcileHashes"` // Configs is a map of node name -> containerlab config -- in other words, this is the original // Topology.Spec.Definition converted to containerlab "sub-topologies" The actual // "sub-topologies"/"sub-configs" are stored as a string -- this is the actual containerlab // topology that gets mounted in the launcher pod. Configs map[string]string `json:"configs"` // ExposedPorts holds a map of (containerlab not k8s!) nodes and their exposed ports // (via load balancer). ExposedPorts map[string]*ExposedPorts `json:"exposedPorts"` }
TopologyStatus is the status for a Topology resource.
func (*TopologyStatus) DeepCopy ¶
func (in *TopologyStatus) DeepCopy() *TopologyStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TopologyStatus.
func (*TopologyStatus) DeepCopyInto ¶
func (in *TopologyStatus) DeepCopyInto(out *TopologyStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.