fakeworker

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package fakeworker holds what the two programs of the benchmark fake data plane share: how a fake Worker's stand-in pod is named and placed, and how each checks the other's identity on the capacity relay between them.

Index

Constants

View Source
const DefaultMaxActors = 1000

DefaultMaxActors is how many actors a fake Worker holds, the default of ateom's --max-actors, which no WorkerPool field sets for a real worker.

View Source
const DefaultRelayPort = 8086

DefaultRelayPort is the default of --relay-port on both fake-atelet, which serves capacity reports on it, and fake-workersync, which sends them there.

View Source
const MaxActorsAnnotation = "ate.dev/fake-max-actors"

MaxActorsAnnotation, on a WorkerPool, overrides DefaultMaxActors for that pool's fake Workers.

View Source
const MaxRunLength = 8

MaxRunLength bounds the run prefix so every generated name stays well inside the 63-character limit on pod names.

View Source
const WorkerPoolLabel = "ate.dev/worker-pool"

WorkerPoolLabel is the label key the WorkerPool controller selects a pool's worker pods by; a fake pool's status.selector names it the same way.

Variables

This section is empty.

Functions

func IP

func IP(index int) string

IP returns the address recorded for the index-th fake Worker of a pool: a documentation-range address that nothing answers on. Addresses repeat past 254 Workers, which ate-api-server allows.

func Index

func Index(run, namespace, pool, name string) (int, bool)

Index returns the index of the fake Worker whose pod is named name in a WorkerPool, and false when the name is not one of that pool's fake pods.

func Name

func Name(run, namespace, pool string, index int) string

Name returns the pod name of the index-th fake Worker of a WorkerPool, the same for every Worker that fills that index. The pool enters as a hash because its namespace and name together can exceed the 63-character limit on pod names.

func Node

func Node(index int, nodes []string) string

Node returns the node the index-th fake Worker of a pool is placed on: round robin over nodes, which the caller keeps sorted.

func Prefix

func Prefix(run string) string

Prefix is the pod name prefix every fake Worker of run shares.

func ValidateRun

func ValidateRun(run string) error

ValidateRun reports whether run is usable as a run prefix.

func VerifyPeerID added in v0.5.0

func VerifyPeerID(cs tls.ConnectionState, want string) error

VerifyPeerID checks that the peer's leaf certificate carries the SPIFFE ID want. It complements the chain verification done against the pod-identity trust bundle: the chain proves the signer, this proves which workload.

Types

This section is empty.

Directories

Path Synopsis
Package fakeworkertest issues pod-identity-shaped certificates for tests of the fake data plane's capacity relay: a throwaway CA, and leaf certificates that carry a SPIFFE ID as their only SAN, as the pod-identity signer's do.
Package fakeworkertest issues pod-identity-shaped certificates for tests of the fake data plane's capacity relay: a throwaway CA, and leaf certificates that carry a SPIFFE ID as their only SAN, as the pod-identity signer's do.

Jump to

Keyboard shortcuts

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