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
- func IP(index int) string
- func Index(run, namespace, pool, name string) (int, bool)
- func Name(run, namespace, pool string, index int) string
- func Node(index int, nodes []string) string
- func Prefix(run string) string
- func ValidateRun(run string) error
- func VerifyPeerID(cs tls.ConnectionState, want string) error
Constants ¶
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.
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.
const MaxActorsAnnotation = "ate.dev/fake-max-actors"
MaxActorsAnnotation, on a WorkerPool, overrides DefaultMaxActors for that pool's fake Workers.
const MaxRunLength = 8
MaxRunLength bounds the run prefix so every generated name stays well inside the 63-character limit on pod names.
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 ¶
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 ¶
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 ¶
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 ¶
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 ValidateRun ¶
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. |