Documentation
¶
Overview ¶
Package gatewayspec checks what a Lab declares as gateways (spec.gateways). The agent runs it when a lab is created and the operator runs it again, so a Lab made by hand or by an older agent is stopped too.
Index ¶
Constants ¶
const DefaultMax = 10
DefaultMax is the most gateways one lab may have when nothing else is configured (the chart's operator.maxLabGateways).
Variables ¶
This section is empty.
Functions ¶
func Validate ¶
func Validate(spec *laboratoryv1alpha1.LabSpec, limit int) error
Validate says whether the gateways of the spec are acceptable: at most limit of them (VPN and Internet together; limit <= 0 means DefaultMax), each with a valid name that is not the name of a device and not used twice, and a known kind; reverseConnections only on a VPN gateway. The errors start with a code word, as the operator's other validation errors do.
Types ¶
This section is empty.