laboratory

module
v1.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2026 License: Apache-2.0

README

Laboratory

Laboratory runs isolated training networks on a Kubernetes cluster. It builds the machines and networks of a task, keeps every team apart from every other team, and gives people controlled ways in: a WireGuard VPN, a browser, and a filtered path to the internet.

It is the lab layer of the Cyber ICE Box platform, and it also works on its own. Laboratory is a constructor: it offers generic parts (devices, switches, gateways, cables, access rules, checks). It knows nothing about events, courses, rankings or scores. A platform backend drives it through one gRPC API and keeps all of that for itself.

Contents

What it does

Area What you get
Topology Labs made of containers or micro-VMs, switches, hubs and cables, with static or DHCP addressing
Isolation One namespace, one address space and one set of keys per team; layer-2 segments that reach nobody by default
VPN access A WireGuard server per team behind one shared UDP port; access rules per client and per network segment
Browser access A device's web page or its console in a browser, through an HTTPS proxy, without entering the lab network
Internet Outbound web access through a filtering gateway; nothing inbound, nothing but web
Checks Automatic checks of what is inside a device: files, processes, ports, commands
Scheduling Labs start through a window, in a declared order, only where there is room
Capacity Current and maximum capacity, per-tenant quotas, reservations ahead of time, maintenance windows
State Optional snapshots of a device's writable layer that survive a crash or the loss of a node
Images Optional pull-through image cache with pinned digests and prewarming
Multi-tenancy Several backends on one cluster; none can see another's objects
Monitoring One resumable stream that carries every state change

How it is built

                       platform backend
                             | gRPC + mutual TLS
                             v
                      +-------------+  objects  +-----------------+
                      |    agent    |---------->|    operator     |
                      +-------------+           |  (controllers)  |
                                                +--------+--------+
                                                         | creates and reconciles
        participants                                     v
   +----------------------+        +----------------------------------------+
   | WireGuard client     |  UDP   |  namespace of one team (lab group)     |
   |                      |------->|  +-------------+   +-----------------+ |
   +----------------------+   |    |  | VPN server  |   | internet gateway| |
   | browser              |   |    |  +------+------+   +--------+--------+ |
   +-----------+----------+   |    |         |   lab networks    |          |
               | TCP 443      |    |     +---+-------------------+---+      |
               v              |    |     |  device pods (attacker,   |      |
   +-----------------------+  |    |     |  targets, switches ...)   |      |
   | proxy                 |  |    |     +---------------------------+      |
   |  - HTTPS front        |--+--->+----------------------------------------+
   |  - WireGuard demux    |            ^
   +-----------------------+            | Open vSwitch segments, Geneve between nodes
                                +-------+--------+
                                |   node-agent   |  one per node
                                +----------------+
Component Runs as Role
Operator one Deployment Turns lab objects into namespaces, pods, services and network policies; schedules the start of pods
Management agent one Deployment The gRPC API for platform backends; each caller sees only its own objects
Node-agent DaemonSet on lab nodes Programs Open vSwitch on its node and plugs every device into its segments, across nodes when needed
VPN server one pod per team WireGuard server of the team: peers, access rules, traffic accounting
Internet gateway one pod per team Outbound web access for the team's labs, DHCP for lab segments
Proxy one Deployment The HTTPS front for device web pages and consoles, and the WireGuard demultiplexer that shares one UDP port between all teams
Checker DaemonSet, optional Runs the checks of the labs of its node and writes the results into the lab status
Device access service DaemonSet, optional Serves the browser console of devices
Node-state DaemonSet on lab nodes Takes device snapshots and watches CPU throttling
Registry one pod, optional Stores device snapshots and works as a pull-through image cache

The VPN pod and the gateway pod of a team exist only while the team needs them: each has a switch on the lab group.

Objects

Everything is a Kubernetes custom resource in the API group laboratory.cybericebox.com.

Object Meaning
Tenant One platform backend. Carries its quota and its device-state policy
LabGroup One unit of isolation, usually a team or a single user. Gets its own namespace, VPN server, internet gateway and address space
Lab One task instance: its devices, connections, gateways and checks
Device A machine, a switch or a hub of a lab
Connection A cable between two ports
LabGroupClient One WireGuard peer of a person in a group. The operator generates its keys and a ready client config
LabGroupAccessPolicy Who in the group may reach what
Reservation Room held ahead of time for labs that will start later
MaintenanceWindow A period the cluster administrator announces for maintenance
Pool Allocates network identifiers, addresses and lab subnets

A few more kinds are internal: the operator creates and removes them itself.

Building a lab

Part What it is
Device container (the default; runs as a container or as a micro-VM), unmanaged-switch or hub
Gateway vpn or internet, up to 10 per lab. Each is attached to a network by an ordinary connection and gets its own /24
Connection A cable between two ports. Switches and hubs join ports into one broadcast domain
Addressing An interface is static or dhcp. A static address may be a reference such as "host 10 of the network of gateway attack", so the author never needs to know the subnet
DHCP A server per gateway, with ranges inside its /24. An internet gateway also advertises DNS
Routes A device may route by gateway references as well

Rules the operator enforces:

  • At most one gateway per broadcast domain; a gateway has one port.
  • A lab with no gateway is valid.
  • Names are DNS labels. vpn, gateway and internet are reserved.

Devices. A device runs a container image. It has a security preset: standard (no extra capabilities) or extended (adds NET_ADMIN for networking tools). A device may carry a bootstrap, which is a set of files and a script that runs once, and may ask for state persistence.

Internet per device. A device marked internet: deny cannot share a broadcast domain with an internet gateway; a lab that wires it there is refused. The guarantee covers the broadcast domain only: another device that forwards with NAT can still route out.

Ways in

There are three. Everything else is denied.

Way Real-world picture Reaches Direction
VPN A cable into one network segment The addresses of that segment, any port Participant to lab; the lab only answers
Browser You stand at the device: its screen and keyboard One device, without entering its network Browser to device, through the proxy
Internet gateway An uplink to the public internet The open web, through a filtering proxy Lab to outside only
VPN
  • A VPN gateway of a lab gives access to its own /24 and nothing behind it. A switch does not extend it and a router inside the lab is not a route for the client. Deeper networks are reached by pivoting from a device on the segment, as in a real engagement.
  • A client may hold any number of segments at once. The subnets are unique inside a group, so they never overlap.
  • Access is per client and per gateway, never per whole lab. A rule may narrow access to part of the segment, down to one address. Several rules add up. Deny wins.
  • The client config lists exactly what the rules allow, and the VPN server enforces the same rules whatever the client routes.
  • By default the lab can only answer: it cannot open a new connection to a participant's machine. A gateway may allow it (reverseConnections: true) for tasks that need a callback.
  • All teams share one public UDP port. A demultiplexer routes each packet to the right team by its public key and never decrypts VPN traffic.
Browser

A device may publish a web port, a console, or both. Each published thing has its own host name, <device>-<code><kind>.<base domain>, and nothing about the device appears in a path or a query.

Kind Status Notes
Web Works The device's web port behind the proxy
Console Works, optional (terminal.enabled) A shell in the browser. Text only, no file transfer. Limits per user, lab and node; idle and total time limits
Remote desktop (VNC, RDP) Not served yet The lab description accepts it; nothing serves it

How a session is opened:

  • The backend signs a short access link with its own key. The link is valid for 60 seconds and is bound to one host name. The proxy checks the signature, the group and the access policy.
  • A web session is a cookie for that one host only. It opens that device and no other, and the device cannot set or clear it.
  • A console session uses no cookie, so the console can be shown in a frame of another site. Which sites may frame it is a setting (terminal.embedding.allow); the default is none.
  • A live session is cut within seconds when the policy denies the client or the lab stops.
Internet

A lab with an internet gateway goes out through the gateway pod of its team:

  1. The forward policy is drop. A lab can send out nothing that is not listed here.
  2. TCP 80 and 443 go to a transparent web proxy. It reads the host name (the Host header or the TLS server name, without decrypting TLS), resolves that name itself and opens a new connection to the address it found. The address the lab chose is never used, so a hosts file, the lab's own DNS server or a bare address change nothing.
  3. It refuses a request with no name, a bare address, Encrypted ClientHello, a name with no public address, and a short list of tunnel services. A connection lives at most 10 minutes.
  4. DNS on any port 53 ends in the gateway's own resolver: public IPv4 records only.
  5. Ping passes at a low rate. Every other protocol is dropped.
  6. Nothing comes in from the outside. Private, link-local, cloud metadata and cluster address ranges are never reachable. This is a constant of the code with no exception.
  7. Each lab has download and upload caps, and there is a cluster-wide upload total.

Isolation

Between How
Teams A namespace per team, default-deny network policies, their own VPN and gateway pods, separate WireGuard keys
Labs Each lab has its own network identifier on the Open vSwitch bridge. The bridge runs in secure mode: a port with no flow reaches nobody
Labs and the cluster A gateway reaches the public internet only. Node, pod, service and metadata ranges are denied in the firewall, in the proxy and in the cluster network policy
Tenants One identity per tenant. Another tenant's object looks like "not found"
Devices and participants A published device accepts only the proxy on its published port. A participant may be root inside a device and still cannot reach the pods of Laboratory
Device and node Device pods run in a user namespace; a micro-VM profile adds a hardware boundary

A lab pod is placed only on a node whose node-agent is ready, so a device can never start with plain cluster networking and no layer-2 wiring.

Checks and readiness

Readiness. A device with a published web port is Ready when that port answers. An author may also ask for a ready file inside the device. A lab is Ready when all its devices are; until then the proxy shows a "starting" page. A device that does not become Ready within the start timeout (5 minutes by default) is declared failed, with a reason.

Checks (optional, checks.enabled). The checker watches the labs of its node and looks inside devices through a small probe. The expected values stay in the checker; the probe only reports facts.

Check Looks at
file A file's presence or content
directory A directory
process A running process
port A listening port
kernel_param A kernel parameter
permission Ownership and mode
request The answer to a request
custom The result of a command
Mode Meaning Typical use
once Passes once and stays passed Something was achieved: a file was planted, a service was reached
continuous The current state matters A hardening task; a service that must keep running

A result is passed, not_passed, error or unknown. error means the check could not be decided: the previous state is kept and it never counts as passed. Results go to the lab status and to the monitoring stream. A backend can ask for a run at once; such requests have a cooldown.

Starting labs: scheduler, capacity, reservations

Scheduler. A burst of new labs does not start all at once. Pods start through a window (scheduler.maxPods, 20 by default), one object after another.

  • Objects of one deploy group start together, and a group may name other groups that must finish first.
  • Before a group starts, its images are pulled onto the nodes.
  • A pod waits while no node has room for it, and while its tenant is at its quota.
  • A pod that is not Ready in time fails with a reason (ImagePull, CrashLoop, Unschedulable, StartupTimeout, PodNotCreated, DoesNotFit) and frees its slot.
  • The place in the queue and the reason are visible in the object status and through the API.

Capacity. Laboratory reports two numbers for the lab nodes: what fits now, and the maximum the cluster may grow to when it has autoscaled nodes. It knows nothing about the autoscaler itself; the maximum comes from a configured budget. Each tenant may have a CPU and memory quota, absolute or as a share of the cluster.

Reservations. A backend can reserve room for a period ahead of time. Labs that belong to a reservation are admitted as a group, so a team's labs either all get in or wait together.

Maintenance windows. The cluster administrator announces when maintenance may happen. Laboratory refuses and delays nothing during a window; backends read the windows through the API and plan around them.

Team overhead. Every team with a VPN or a gateway costs a fixed amount of CPU and memory. The API reports that amount so a backend can size a reservation.

Stopping, starting and retiring

  • Stop and start a lab. A stopped lab keeps its definition and frees its resources. With state persistence its devices come back as they were.
  • Stop and start a team. Stopping a team requires all its labs to be stopped first; it then removes the team's VPN and gateway pods. Starting a team brings back those services only. Labs stay stopped until each is started.
  • Retire. Retiring a stopped lab or team removes its definitions, secrets and snapshots for good and leaves a small record of what existed. A retired object cannot be started again.
  • Every such request names the exact object and carries an operation id and a revision, so a repeated or late request cannot undo a newer one.
  • A stop is reported as complete only after the node confirms that the processes, their resources and their network attachments are gone. The absence of a pod in the API is not taken as proof.

Which of these a cluster offers is advertised through the API and is off by default; an administrator turns each capability on in the chart.

Device state and images

State persistence (optional, devices.statePersistence.enabled). The writable layer of a device is saved as snapshots, so the device survives a crash or the loss of its node. Each device opts in. The cluster and the tenant bound it: a write quota, a maximum file size, excluded paths. Snapshots are stored in the built-in registry, and a backend can download the latest state of a device as one archive.

Reset and rescue. For a device with saved state, a backend can discard the state and restart the device from its image, or start it from its latest state with a shell in place of its normal start command, to repair a configuration that makes the service crash.

Image cache (optional, registry.cache.enabled). The built-in registry works as a pull-through cache.

  • The operator pins the digest of every image when a lab is created, so a moving tag cannot change an image in the middle of an event.
  • A backend can prewarm the cache before an event, so a burst of labs starts without pulling.
  • Every pull through the cache is checked with the credentials of that pull, so a tenant cannot start another tenant's private image that happens to be on the node already.

Bandwidth protection

On by default (bandwidth.enabled). No participant, lab or team can saturate a node or the cluster network. The usable bandwidth of a node is divided between three classes: the entry (VPN and browser traffic), the internet gateways, and traffic between nodes. Inside a class everyone gets a fair share and never more than a cap.

Tenants and enrollment

One cluster serves several backends that must not see each other.

  • A tenant is declared in the chart's tenants: values. The tenant default always exists.
  • The identity of a tenant is the name in its client certificate. The cluster never hands out a private key. The operator creates a one-time enrollment token per tenant; the cluster administrator passes it to the backend.
  • The backend calls Enroll with the token, a certificate request and the public half of its own Ed25519 access key. The agent signs a client certificate and burns the token. From then on the backend renews its certificate and rotates its access key itself.
  • Access links for the browser are signed by the tenant with that access key. The proxy holds the public keys of all tenants and also checks that the team belongs to the tenant that signed. No key is shared between tenants.
  • Every object the agent creates is stamped with its tenant, so every call sees only the caller's objects.

Management agent API

With agent.enabled the chart deploys a gRPC server with mutual TLS. The service is LabManager, defined in pkg/agent/protobuf/agent.proto. A Go client is in pkg/agent/client.

Laboratory never calls a backend and sends nothing anywhere by itself. The API is the only link.

Group Calls
Lab groups CreateLabGroups, ListLabGroups, UpdateLabGroups, DeleteLabGroups
VPN clients CreateLabGroupClients, ListLabGroupClients, UpdateLabGroupClients, DeleteLabGroupClients
Access SetLabGroupAccess
Labs CreateLabs, ListLabs, UpdateLabs, DeleteLabs
Lifecycle StopLabs, StartLabs, StopLabGroups, StartLabGroups, RetireLabs, RetireLabGroups
Reservations CreateReservations, ListReservations, UpdateReservations, DeleteReservations
Devices ResetDevices, RescueDevices, RunChecks, ExportDeviceSnapshot
Cluster Ping, GetFeatures, GetCapacity, ListMaintenanceWindows, PrewarmImages
Events Monitoring (a stream), GetLabGroupActivity
Enrollment Enroll, RenewCertificate, RotateAccessKey, RemoveAccessKey

Rules of the API:

  • Calls are plural: a list goes in and a result per item comes out. One object is a list of one.
  • Calls that select many objects are guarded by an expected count, so a wrong selector changes nothing.
  • Objects carry labels, and lists and the stream can be filtered by them.
  • The Monitoring stream carries every state change and can be resumed from where a client stopped.
  • The contract has a version, major.minor. A caller built against 2.N works with an agent of major 2 and a minor not lower than N.

Activity reports

Off by default (activityReports.enabled). This is not telemetry: the data goes only to your own backend, and only when it asks. Laboratory aggregates nothing and keeps a short ring only, at most 1000 events and one hour.

Fact What is kept
Internet use Per lab and minute: source address, destination address and port, bytes, connections
Console sessions When a client opened and closed the console of a device
Devices touched Per client, lab address and minute: bytes both ways

A source address names an address, not a device: an author may set any addresses inside a lab. Attribution is best effort; only the fact of internet use per lab is reliable.

Feature switches

What a cluster serves is set in the chart, once for the whole cluster. A lab that needs something that is off is refused with a stable reason. The refusal comes from the Kubernetes API server itself, so it also holds for objects created with kubectl.

Chart value Default When off Reason
vpn.enabled on No WireGuard at all; labs with a VPN gateway and VPN clients are refused VPN_UNAVAILABLE
inetGateway.enabled on No internet gateways; labs with one are refused INTERNET_UNAVAILABLE
proxy.enabled, proxy.l7.enabled on No browser access of any kind ACCESS_UNAVAILABLE
terminal.enabled off No browser console ACCESS_UNAVAILABLE
checks.enabled off No checks; labs that declare checks are refused CHECKS_UNAVAILABLE
scheduler.enabled on Every pod starts as soon as it exists -

A backend reads the current state with GetFeatures before it offers a feature to its users.

Requirements

  • Kubernetes 1.35 or newer, containerd 2.x, and Cilium as the cluster network. Nodes are split into two pools by the label node-restriction.kubernetes.io/cib-pool (lab for the nodes that run labs, lab-control for the control of the laboratory), set before the install. The chart refuses an older cluster.
  • Linux nodes with kernel 6.3 or newer, cgroup v2, and these modules available: openvswitch, geneve, wireguard, br_netfilter, nf_conntrack, nf_conntrack_netlink. Nothing else is installed on the host: Open vSwitch runs inside the node-agent, which also loads the modules and sets the kernel parameters it needs.
  • cert-manager, for the wildcard certificate of the proxy and the server certificate of the agent. With a public certificate authority the wildcard certificate needs a DNS challenge; a self-signed issuer is enough for development.
  • DNS: a wildcard record for the lab domain, a name for the VPN endpoint and a name for the agent.
  • Load balancers made by the infrastructure: the proxy (TCP 443), the agent, the VPN (UDP 51820) and the registry gate (internal, for the lab nodes) target NodePort Services with externalTrafficPolicy: Local, so the client address reaches the pod.
  • kubectl 1.35 or newer and helm 3.12 or newer.

Laboratory targets plain Linux machines and is developed against k0s. A kind cluster works for local development.

Name Example Points to
*.<operator.baseDomain> *.labs.example.com The proxy
operator.publicVPNEndpoint vpn.example.com The WireGuard demultiplexer, UDP 51820 by default
agent.domain ctl.labs.example.com (the default) The management agent

Install

The chart is in charts/laboratory. It must be installed into the namespace laboratory-system; it fails early when a required value is missing.

  1. Label the nodes into their pools (kubectl label node <node> node-restriction.kubernetes.io/cib-pool=lab or =lab-control). The proxy holds no secret of its own: a web session is a grant signed by the tenant, which the proxy verifies with the tenant's public key.

  2. Write a values file. These are the only values an installation has to give:

    # my-values.yaml
    operator:
      baseDomain: labs.example.com        # base domain of the lab hosts
      publicVPNEndpoint: vpn.example.com  # the address WireGuard clients connect to
      supportEmail: support@example.com
    registry:
      gate:
        address: registry.lab.internal:5443   # the internal load balancer the lab nodes dial to reach the registry gate
    proxy:
      l7:
        platformOrigins: [https://app.example.com]   # the origins of the platform pages that post a grant
    agent:
      enabled: true
    tenants:
      platform: { }                       # one entry per backend; the name is its identity
    

    Every other option has a default and is described in charts/laboratory/values.yaml.

  3. Install:

    helm install laboratory oci://registry-1.docker.io/cybericebox/laboratory --version X.Y.Z \
      --namespace laboratory-system --create-namespace -f my-values.yaml
    
  4. Give the backend its enrollment token:

    kubectl -n laboratory-tenants get secret tenant-platform-enrollment -o jsonpath='{.data.token}' | base64 -d
    

Notes:

  • Images in a private registry need pull secrets, listed under imagePullSecrets. The operator copies them into the namespace laboratory-upstream, where only the registry gate reads them; no pod of a lab and no lab node holds a registry credential.
  • helm upgrade does not update custom resource definitions. Apply the definitions from charts/laboratory/crds with kubectl before an upgrade.
  • helm uninstall does not remove the definitions or the labs. Delete the labs first, then the definitions.
  • Laboratory can be used without a backend: create LabGroup, LabGroupClient and Lab objects with kubectl.

Every setting, upgrade rule and operating procedure is described in DEPLOY.md.

Images

Images are published for linux/amd64 and linux/arm64. One Dockerfile builds all of them.

Image Contents
cybericebox/laboratory-controller The operator
cybericebox/laboratory-agent The management agent
cybericebox/laboratory-proxy The HTTPS front and the WireGuard demultiplexer
cybericebox/laboratory-node The node-agent, the checker, the device access service, Open vSwitch and the network plugins
cybericebox/laboratory-lab The VPN server and the internet gateway

The chart uses the image tag of its own version. It refuses the tag latest. The release cycle is described in CONTRIBUTING.md.

Development

To build from source you need mise, and Docker. mise install puts the pinned tools in place (Go, kind, kubectl, helm, kustomize, protoc, golangci-lint, zot); mise tasks lists the commands. The Go tools of the module (controller-gen, setup-envtest, bpf2go) are tool directives of go.mod, run as go tool <name>. Every command is a mise task (mise.toml, and executable files under mise-tasks/), so it sees the pinned tools. How to change things and what to run before a pull request: CONTRIBUTING.md.

mise run generate        # regenerate everything generated: CRDs, access rules, deepcopy, API clients, gRPC code
mise run generate-check  # regenerate and fail when that changes the tree
mise run proto           # regenerate only the Go code of the gRPC contracts
mise run lint            # run the linter (for Linux, as CI does)
mise run build           # build the operator binary into ./bin/manager
mise run test            # unit tests and tests against a real API server
mise run test-netns      # the iptables tests in network namespaces (Docker)
mise run test-bpf        # the eBPF tests of the WireGuard demultiplexer (Docker)
mise run cluster-up      # the kind cluster of the end-to-end tests
mise run e2e             # end-to-end tests on that cluster
mise run cluster-down   # delete that cluster
mise run image:build     # build all five images (or name some: mise run image:build proxy node)
mise run run             # run the operator from this machine against the current kubectl context
mise tasks               # every task, with its description and the environment variables it reads
Path Contents
api/ Types of the custom resources
cmd/ Entry points of the binaries
internal/ Controllers, the agent, the node-agent, the proxy, the VPN server, the gateway, the checker
pkg/agent/ The API definition and the Go client
clientset/ Generated typed client for the custom resources
charts/laboratory/ The Helm chart
kernel/ Kernel configuration of the micro-VM profile
config/ The generated CRDs (config/crd/bases) and RBAC, and the kustomize manifests of the operator alone that the manager e2e suite deploys
hack/, scripts/ Development and check scripts
test/ Chart rendering tests and end-to-end tests

mise run test downloads an API server and etcd by itself, so controller tests need no cluster.

What it does not do

Not done What to do instead
Layer 2 from outside (ARP spoofing from your own machine) The VPN is layer 3. Put a device on the segment and work from it
Routing over the VPN to networks behind a lab router A VPN gateway is one flat /24. Reach deeper networks by pivoting
Remote desktop (VNC, RDP) Not served yet
Names for lab hosts There is no built-in DNS for labs. Addresses are fixed; run a DNS server inside the lab if you want names
Scores, statistics, history Laboratory hands over raw facts when asked. The backend aggregates
Phoning home No telemetry, no update check, no report. The only traffic out of the cluster is image pulls and what lab devices send through an internet gateway
Unrestricted internet for a lab Only the web path described above. Nothing inbound, no other protocol

License

Apache License, Version 2.0. See LICENSE.

Directories

Path Synopsis
api
allocation/v1alpha1
Package v1alpha1 contains API Schema definitions for the allocation v1alpha1 API group.
Package v1alpha1 contains API Schema definitions for the allocation v1alpha1 API group.
laboratory/v1alpha1
Package v1alpha1 contains API Schema definitions for the laboratory v1alpha1 API group.
Package v1alpha1 contains API Schema definitions for the laboratory v1alpha1 API group.
clientset
client/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
client/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
client/versioned/typed/allocation/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/versioned/typed/allocation/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
client/versioned/typed/laboratory/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/versioned/typed/laboratory/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
cmd
agent command
agent is the gRPC management API image's binary.
agent is the gRPC management API image's binary.
lab command
lab is the per-lab-group image's binary: the VPN server and the internet gateway.
lab is the per-lab-group image's binary: the VPN server and the internet gateway.
manager command
manager is the operator image's binary.
manager is the operator image's binary.
node command
node is the per-node image's binary: node-agent, node-state, registry-gate, install-cni, netconfig, cni-gate, the lab checker (checker, checker-health) and the device access service (device-access, device-access-health).
node is the per-node image's binary: node-agent, node-state, registry-gate, install-cni, netconfig, cni-gate, the lab checker (checker, checker-health) and the device access service (device-access, device-access-health).
ovs-diag command
ovs-diag checks each step of moving an OVS internal port into a pod netns, comparing the library approach (vishvananda/netlink+netns) with the CLI (ip / nsenter).
ovs-diag checks each step of moving an OVS internal port into a pod netns, comparing the library approach (vishvananda/netlink+netns) with the CLI (ip / nsenter).
probe command
probe is the readiness probe of a device pod (see package internal/probe).
probe is the readiness probe of a device pod (see package internal/probe).
proxy command
proxy is the internet-facing image's binary: `proxy proxy-l7` and `proxy proxy-wg`.
proxy is the internet-facing image's binary: `proxy proxy-l7` and `proxy proxy-wg`.
hack
kind-demux/headprog command
Command headprog is a helper of the demux e2e (hack/kind-demux/e2e.sh): it puts a program that only hands packets on (TCX_NEXT) at the head of a device's tcx ingress and egress, in front of the demux's programs, and takes it away again.
Command headprog is a helper of the demux e2e (hack/kind-demux/e2e.sh): it puts a program that only hands packets on (TCX_NEXT) at the head of a device's tcx ingress and egress, in front of the demux's programs, and takes it away again.
internal
activity
Package activity keeps the raw activity facts one process of the laboratory hands, through the agent API, to the platform that runs it (the daemon): internet egress, console sessions, devices touched over the VPN.
Package activity keeps the raw activity facts one process of the laboratory hands, through the agent API, to the platform that runs it (the daemon): internet egress, console sessions, devices touched over the VPN.
admissioncheck
Package admissioncheck lets the operator verify, before it works, that the chart's admission policies are really enforced on its ServiceAccount.
Package admissioncheck lets the operator verify, before it works, that the chart's admission policies are really enforced on its ServiceAccount.
bandwidth
Package bandwidth is the bandwidth protection of the laboratory: how much a node can carry, how that is divided between the entry (demux and L7 proxy), the internet (the gateways) and the Geneve fabric, and the token buckets the pods use to keep to it.
Package bandwidth is the bandwidth protection of the laboratory: how much a node can carry, how that is divided between the entry (demux and L7 proxy), the internet (the gateways) and the Geneve fabric, and the token buckets the pods use to keep to it.
cmds/checkerd
Package checkerd is the lab checker: a DaemonSet of its own (apart from the node-agent) that runs the checks of the labs whose device pods are on its node and writes the results into the Lab status.
Package checkerd is the lab checker: a DaemonSet of its own (apart from the node-agent) that runs the checks of the labs whose device pods are on its node and writes the results into the Lab status.
cmds/deviceaccessd
Package deviceaccessd is the device access service as a command of the node image (`/node device-access`): a DaemonSet on the lab nodes, the only component that holds the container runtime socket.
Package deviceaccessd is the device access service as a command of the node image (`/node device-access`): a DaemonSet on the lab nodes, the only component that holds the container runtime socket.
cmds/netconfig
netconfig is the device init-container helper.
netconfig is the device init-container helper.
cmds/nodestated
Package nodestated is the node-state DaemonSet: the part of the node's work that needs the container runtime's files and the host's cgroups and is not pod networking.
Package nodestated is the node-state DaemonSet: the part of the node's work that needs the container runtime's files and the host's cgroups and is not pod networking.
cmds/registrygated
Package registrygated is the registry gate: a container of the registry pod, in front of zot.
Package registrygated is the registry gate: a container of the registry pod, in front of zot.
cputhrottle
Package cputhrottle measures how much the CPU limit of a container holds it back: the share of the CFS periods in which the container was throttled, over a sliding window of a few minutes, from the cpu.stat of its cgroup (v2).
Package cputhrottle measures how much the CPU limit of a container holds it back: the share of the CFS periods in which the container was throttled, over a sliding window of a few minutes, from the cpu.stat of its cgroup (v2).
crdcheck
Package crdcheck lets the agent and the operator refuse to start against CRDs that are older than they are.
Package crdcheck lets the agent and the operator refuse to start against CRDs that are older than they are.
deviceaccess
Package deviceaccess is the device access service: the one component on a lab node that holds the container runtime socket and opens a shell (a console) or moves a file in a lab device on behalf of the L7 proxy.
Package deviceaccess is the device access service: the one component on a lab node that holds the container runtime socket and opens a shell (a console) or moves a file in a lab device on behalf of the L7 proxy.
deviceaccess/wire
Package wire is the framing of a console stream.
Package wire is the framing of a console stream.
deviceplugin
Package deviceplugin is the kubelet device plugin of the node-agent.
Package deviceplugin is the kubelet device plugin of the node-agent.
devices
Package devices names and finds the Device objects of a lab.
Package devices names and finds the Device objects of a lab.
devicestate
Package devicestate is the node-agent side of device state persistence: it follows the snapshot-backed device containers of a node, detects changes of their writable layer, and turns them into snapshot images in the platform registry.
Package devicestate is the node-agent side of device state persistence: it follows the snapshot-backed device containers of a node, detects changes of their writable layer, and turns them into snapshot images in the platform registry.
edaroute
Package edaroute keeps the EDA interface of a web-exposed device pod out of the pod's main routing table.
Package edaroute keeps the EDA interface of a web-exposed device pod out of the pod's main routing table.
egress
Package egress holds what a lab can never reach through its internet gateway.
Package egress holds what a lab can never reach through its internet gateway.
errorlog
Package errorlog is the laboratory's own error journal: every component (operator, node-agent, L7 proxy, wg-demux, VPN and gateway pods, the agent) counts its errors by a normalized fingerprint, keeps a few recent messages and publishes the aggregate as a Kubernetes Event that the management agent reads and forwards in MonitoringUpdate.errors.
Package errorlog is the laboratory's own error journal: every component (operator, node-agent, L7 proxy, wg-demux, VPN and gateway pods, the agent) counts its errors by a normalized fingerprint, keeps a few recent messages and publishes the aggregate as a Kubernetes Event that the management agent reads and forwards in MonitoringUpdate.errors.
gatewayspec
Package gatewayspec checks what a Lab declares as gateways (spec.gateways).
Package gatewayspec checks what a Lab declares as gateways (spec.gateways).
grant
Package grant is the access grant: one compact JWS the platform of a tenant signs for one device host, and the only credential a browser holds for a web or console session.
Package grant is the access grant: one compact JWS the platform of a tenant signs for one device host, and the only credential a browser holds for a web or console session.
grant/granttest
Package granttest signs grants for tests.
Package granttest signs grants for tests.
grouppods
Package grouppods holds the resources of the pods a LabGroup runs itself, the VPN and the internet gateway.
Package grouppods holds the resources of the pods a LabGroup runs itself, the VPN and the internet gateway.
health
Package health holds the readiness checks the platform's processes share: "ready" means the process really serves (its listener is up and its informer caches have synced), not merely that it started.
Package health holds the readiness checks the platform's processes share: "ready" means the process really serves (its listener is up and its informer caches have synced), not merely that it started.
imagecache
Package imagecache rewrites image references so the nodes pull them through the platform's in-cluster image cache (the registry gate in front of zot).
Package imagecache rewrites image references so the nodes pull them through the platform's in-cluster image cache (the registry gate in front of zot).
imagepolicy
Package imagepolicy decides whether a tenant may use an image: a per-tenant allow list and a platform deny list of "registry/repository-prefix" entries, and the refusal of references that already point at the platform's image cache.
Package imagepolicy decides whether a tenant may use an image: a per-tenant allow list and a platform deny list of "registry/repository-prefix" entries, and the refusal of references that already point at the platform's image cache.
imagepull
Package imagepull pulls images onto a node through the container runtime's image service (CRI), for the node-agent.
Package imagepull pulls images onto a node through the container runtime's image service (CRI), for the node-agent.
keylock
Package keylock is a set of mutexes addressed by a string key.
Package keylock is a set of mutexes addressed by a string key.
labchecks
Package labchecks is the contract of device bootstrap and lab checks: the secret documents the management agent writes (Secret <device>-bootstrap, key bootstrap.json; Secret <lab>-checks, key checks.json), the limits on them and the validation the agent applies before anything is written.
Package labchecks is the contract of device bootstrap and lab checks: the secret documents the management agent writes (Secret <device>-bootstrap, key bootstrap.json; Secret <lab>-checks, key checks.json), the limits on them and the validation the agent applies before anything is written.
launcher
Package launcher is the first process of a device container that has a bootstrap list or a service command of its own.
Package launcher is the first process of a device container that has a bootstrap list or a service command of its own.
limits
Package limits holds the caps the cluster owns on devices, labs and tenants.
Package limits holds the caps the cluster owns on devices, labs and tenants.
multicall
Package multicall routes one binary to several components of the same domain: the first argument selects the component, or the name the binary is invoked as (for example the cni-gate copy that the node-agent installs on the host).
Package multicall routes one binary to several components of the same domain: the first argument selects the component, or the name the binary is invoked as (for example the cni-gate copy that the node-agent installs on the host).
netattach
Package netattach holds the rules of the device network interfaces and the encoding of the network.cybericebox.com/networks pod annotation shared by the operator (writer), the management agent (validation) and the node-agent (reader).
Package netattach holds the rules of the device network interfaces and the encoding of the network.cybericebox.com/networks pod annotation shared by the operator (writer), the management agent (validation) and the node-agent (reader).
netguard
Package netguard keeps a client from being led to an internal address by a redirect: the check of a redirect target, the dialer that refuses internal addresses when it connects (after the name is resolved, so DNS rebinding cannot pass), and a RoundTripper for clients that follow redirects themselves.
Package netguard keeps a client from being led to an internal address by a redirect: the check of a redirect target, the dialer that refuses internal addresses when it connects (after the name is resolved, so DNS rebinding cannot pass), and a RoundTripper for clients that follow redirects themselves.
netguard/netguardtest
Package netguardtest is for tests: a resolver that names a loopback address for any host name.
Package netguardtest is for tests: a resolver that names a loopback address for any host name.
nodeagent/ofclient
Package ofclient implements a minimal OpenFlow 1.3 client over a Unix socket.
Package ofclient implements a minimal OpenFlow 1.3 client over a Unix socket.
nodecap
Package nodecap holds the node eligibility rule shared by the operator's scheduler and the management agent: which nodes lab pods can run on.
Package nodecap holds the node eligibility rule shared by the operator's scheduler and the management agent: which nodes lab pods can run on.
nstest
Package nstest builds small network topologies out of Linux network namespaces for tests of real iptables rules.
Package nstest builds small network topologies out of Linux network namespaces for tests of real iptables rules.
podinput
Package podinput is the INPUT policy of the VPN pod and the internet gateway pod.
Package podinput is the INPUT policy of the VPN pod and the internet gateway pod.
probe
Package probe is the readiness probe of a device pod.
Package probe is the readiness probe of a device pod.
profiles
Package profiles is the fixed catalog of device security profiles.
Package profiles is the fixed catalog of device security profiles.
proxy/demux/fastpath
Package fastpath is the in-kernel fast path of the WireGuard demux (modes tc and xdp): the eBPF programs of wg_fastpath.bpf.c, which forward transport packets of known sessions, and the pinned maps the demux keeps them in.
Package fastpath is the in-kernel fast path of the WireGuard demux (modes tc and xdp): the eBPF programs of wg_fastpath.bpf.c, which forward transport packets of known sessions, and the pinned maps the demux keeps them in.
reconcileutil
Package reconcileutil holds what every controller of the operator and the node-agent shares.
Package reconcileutil holds what every controller of the operator and the node-agent shares.
registrygate
Package registrygate is the gate in front of the platform registry (zot): the one component every request to the registry passes.
Package registrygate is the gate in front of the platform registry (zot): the one component every request to the registry passes.
snapshot
Package snapshot holds the platform-independent logic of device state persistence: which paths are kept, the size quota, the layer chain rules and the tar plumbing that filters and squashes snapshot layers.
Package snapshot holds the platform-independent logic of device state persistence: which paths are kept, the size quota, the layer chain rules and the tar plumbing that filters and squashes snapshot layers.
status
Package status provides shared helpers for setting Kubernetes-style status Conditions and emitting Events, so reconciler wait/failure states are visible via `kubectl describe` instead of being silent forever-requeues.
Package status provides shared helpers for setting Kubernetes-style status Conditions and emitting Events, so reconciler wait/failure states are visible via `kubectl describe` instead of being silent forever-requeues.
switches
Package switches holds the feature switches of the laboratory (the chart's vpn.enabled, inetGateway.enabled, proxy.enabled with its rdp, vnc and terminal accesses, checks.enabled) and the one rule that says what a Lab may ask for under them.
Package switches holds the feature switches of the laboratory (the chart's vpn.enabled, inetGateway.enabled, proxy.enabled with its rdp, vnc and terminal accesses, checks.enabled) and the one rule that says what a Lab may ask for under them.
tenant
Package tenant holds the pure rules of the Tenant resource shared by the management agent and the operator: the quota (absolute or percent) and the persistence limits.
Package tenant holds the pure rules of the Tenant resource shared by the management agent and the operator: the quota (absolute or percent) and the persistence limits.
vniledger
Package vniledger is the record, per node, of the VNIs the node has flows for.
Package vniledger is the record, per node, of the VNIs the node has flows for.
vpn
vpn/flowacct
Package flowacct counts, and never inspects, the connections that VPN clients open to the lab networks of one group.
Package flowacct counts, and never inspects, the connections that VPN clients open to the lab networks of one group.
pkg
agent/client
Package client is a thin, ready-to-use gRPC client for the LabManager agent.
Package client is a thin, ready-to-use gRPC client for the LabManager agent.
names
Package names holds the names of the laboratory that callers outside it (the daemon) need.
Package names holds the names of the laboratory that callers outside it (the daemon) need.
runtime
Package runtime configures Go runtime parameters for containerised deployments.
Package runtime configures Go runtime parameters for containerised deployments.
statuspage
Package statuspage is the one look of the small static pages the laboratory serves to a browser: the VPN check page inside the tunnel and the proxy's error cards.
Package statuspage is the one look of the small static pages the laboratory serves to a browser: the VPN check page inside the tunnel and the proxy's error cards.
tlsreload
Package tlsreload serves certificates that cert-manager renews in place: the key pair and the CA bundle are re-read from the mounted files when they change, so a renewal never needs a pod restart.
Package tlsreload serves certificates that cert-manager renews in place: the key pair and the CA bundle are re-read from the mounted files when they change, so a renewal never needs a pod restart.
vpnprobe
Package vpnprobe defines the address of the tunnel-only connection check.
Package vpnprobe defines the address of the tunnel-only connection check.
test

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL