Documentation
¶
Overview ¶
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. See package internal/deviceaccess.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Listen string `env:"LISTEN" envDefault:":8080"`
MetricsListen string `env:"METRICS_LISTEN" envDefault:":9102"`
// ContainerdSock and ContainerdNamespace: the runtime socket (mounted at the same path as on the host) and the namespace of the
// kubelet's CRI. FifoDir is the host directory for the FIFOs of the execs, mounted at the same path as on the host.
ContainerdSock string `env:"CONTAINERD_SOCK" envDefault:"/run/k0s/containerd.sock"`
ContainerdNamespace string `env:"CONTAINERD_NAMESPACE" envDefault:"k8s.io"`
FifoDir string `env:"FIFO_DIR" envDefault:"/run/containerd/fifo"`
// KeyDir is the directory of the tenants' access public keys, one PEM file <tenant>.<key id> each: the ConfigMap the operator mirrors from
// the access key Secrets, mounted as files (public data). A console grant is verified with them; the service holds no key of its own.
// KeyReload is how often the directory is read again; GrantMaxTTL is the longest exp - iat of a grant the service accepts.
KeyDir string `env:"KEY_DIR" envDefault:"/etc/device-access/access-keys"`
KeyReload time.Duration `env:"KEY_RELOAD" envDefault:"15s"`
GrantMaxTTL time.Duration `env:"GRANT_MAX_TTL" envDefault:"8h"`
// The checker socket (empty path: none). The lab checker of the node asks the service over it to run the probe in a device; its
// protection is the file permissions (group CheckerGID) and the peer credentials (user CheckerUID, group CheckerGID).
CheckerSocket string `env:"CHECKER_SOCKET"`
CheckerGID int `env:"CHECKER_GID" envDefault:"65532"`
CheckerUID int `env:"CHECKER_UID" envDefault:"65532"`
CheckerMaxSeconds int `env:"CHECKER_MAX_SECONDS" envDefault:"120"`
CheckerMaxConcurrent int `env:"CHECKER_MAX_CONCURRENT" envDefault:"8"`
PerClient int `env:"LIMIT_PER_CLIENT" envDefault:"3"`
PerLab int `env:"LIMIT_PER_LAB" envDefault:"10"`
PerNode int `env:"LIMIT_PER_NODE" envDefault:"200"`
Idle time.Duration `env:"IDLE_TIMEOUT" envDefault:"30m"`
Lifetime time.Duration `env:"MAX_LIFETIME" envDefault:"8h"`
}
Config comes from the environment the chart sets.
Click to show internal directories.
Click to hide internal directories.