@mark1russell7/kind 0.13.3 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as unitOf, $n as cidrRange, $t as OUTSIDE, A as TriggerV1, An as Reference, At as recordsOf, B as RunCheck, Bn as Workload, Bt as sliceReadyAt, C as KindCellResult, Cn as MeshFlavor, Ct as intakeOf, D as PredictionV1, Dn as PodSettings, Dt as periodOf, E as LoadSample, En as PermittedWindow, Et as outcomesOf, F as KIND_NOISE, Fn as Trigger, Ft as sessionsAt, G as factsOf, Gn as KindScenario, Gt as transitionOf, H as checkRun, Hn as Dataplane, Ht as slicesOf, I as KindDecision, In as TriggerKind, It as signalOf, J as observationEnd, Jn as NodeImage, Jt as ztunnelReplaced, K as judgeKind, Kn as KubeProxyMode, Kt as tunnelsOf, L as KindVerdict, Ln as VipAnnouncerName, Lt as signalsOf, M as upgrade, Mn as ResetReuse, Mt as restartOf, N as upgradeCell, Nn as Stack, Nt as restartsAt, O as RunCheckV1, On as Prediction, Ot as podsAt, P as Deleted, Pn as Template, Pt as rulesOf, Q as reusesReset, Qn as cidrOverlap, Qt as LOG_LABEL, R as LAST_SLACK, Rn as VipSettings, Rt as sliceDropOf, S as KindCellRecordV1, Sn as Mesh, St as failuresOf, T as KindVerdictV1, Tn as NonePrediction, Tt as kernelCounts, U as cyclesOf, Un as KUBE_PROXY_MODES, Ut as socketsOf, V as RunFacts, Vn as DATAPLANES, Vt as sliceReadyOf, W as deletionsOf, Wn as KindConfig, Wt as stoppingOf, X as propagationSource, Xn as ZONE_LABEL, Xt as HEALTH_PORT, Y as propagationOf, Yn as ZONE_KEPT, Yt as CLIENT, Z as referenceOf, Zn as ZONE_LOST, Zt as LB_CLASS, _ as ClusterManifest, _n as EdgeProtocol, _t as byClients, a as STAGES, an as backlogEnd, ar as scenario, at as PodLine, b as FORMAT_V1, bn as KindRun, bt as dropOf, c as readRecord, cn as overshootBand, ct as Request, d as calibrationOf, dn as secondsOf, dt as SliceLine, en as PORT, er as goDuration, et as updatesOf, f as cellsTable, fn as showBand, ft as SocketLine, g as BandV1, gn as Declaration, gt as backendsAt, h as timeSpread, hn as Cycle, ht as ZtunnelPodLine, i as quantileOf, in as CountBand, ir as nodeNames, it as Period, j as judge, jn as Replica, jt as requestsOf, k as RunFactsV1, kn as RedisDeclaration, kt as podsOf, l as Judged, ln as requestBand, lt as RulesLine, m as predictionText, mn as Band, mt as TunnelLine, n as medianInterval, nn as SERVER, nr as kindConfig, nt as HBONE_PORT, o as kindCellRecordSchema, on as bandOf, or as scenarioProblems, ot as PropagationSource, p as medianText, pn as BacklogTerm, pt as TCP_STATE, q as observationAfter, qn as NODE_IMAGES, qt as ztunnelPodsOf, r as middle, rn as VIP_ANNOTATION, rr as kubeProxyPatch, rt as Line, s as kindCellRecordV1Schema, sn as drainBand, sr as zoneOf, st as RecordLine, t as RELATIVE, tn as REDIS, tr as isKubeProxyMode, tt as Endpoint, u as TimeSpread, un as seconds, ut as Sessions, v as EnvironmentManifest, vn as Flap, vt as byNode, w as KindCellV1, wn as MeshMode, wt as isTunnelState, x as KindCellRecord, xn as KubeletProbe, xt as emptyOf, y as FORMAT, yn as KindCell, yt as deletionOf, z as Propagated, zn as WindowPrediction, zt as sliceEmptyOf } from "./judge-DhLShDUj.js";
1
+ import { $ as factsOf, $n as DATAPLANES, $t as transitionOf, A as KindCellResult, An as KubeletProbe, At as failuresOf, B as upgradeCell, Bn as ReconnectsPrediction, Bt as restartOf, C as BandV1, Cn as Band, Ct as ZtunnelPodLine, D as FORMAT_V1, Dn as Flap, Dt as deletionOf, E as FORMAT, En as EdgeProtocol, Et as byNode, F as RunCheckV1, Fn as NonePrediction, Ft as periodOf, G as LAST_SLACK, Gn as Stack, Gt as signalsOf, H as KIND_NOISE, Hn as Reference, Ht as rulesOf, I as RunFactsV1, In as PermittedWindow, It as podsAt, J as RunCheck, Jn as TriggerKind, Jt as sliceReadyAt, K as Propagated, Kn as Template, Kt as sliceDropOf, L as TriggerV1, Ln as PodSettings, Lt as podsOf, M as KindVerdictV1, Mn as Mesh, Mt as isTunnelState, N as LoadSample, Nn as MeshFlavor, Nt as kernelCounts, O as KindCellRecord, On as KindCell, Ot as dropOf, P as PredictionV1, Pn as MeshMode, Pt as outcomesOf, Q as deletionsOf, Qn as Workload, Qt as stoppingOf, R as judge, Rn as Prediction, Rt as recordsOf, S as timeSpread, Sn as Backoff, St as TunnelLine, T as EnvironmentManifest, Tn as Declaration, Tt as byClients, U as KindDecision, Un as Replica, Ut as sessionsAt, V as Deleted, Vn as RedisDeclaration, Vt as restartsAt, W as KindVerdict, Wn as ResetReuse, Wt as signalOf, X as checkRun, Xn as VipSettings, Xt as slicesOf, Y as RunFacts, Yn as VipAnnouncerName, Yt as sliceReadyOf, Z as cyclesOf, Zn as WindowPrediction, Zt as socketsOf, _ as TimeSpread, _n as requestBand, _r as scenario, _t as RulesLine, a as judgeReconnects, an as LB_CLASS, ar as NODE_IMAGES, at as referenceOf, b as medianText, bn as showBand, bt as SocketLine, c as RELATIVE, cn as PORT, cr as ZONE_LABEL, ct as updatesOf, d as quantileOf, dn as VIP_ANNOTATION, dr as cidrRange, dt as Line, en as tunnelsOf, er as Dataplane, et as judgeKind, f as STAGES, fn as CountBand, fr as goDuration, ft as Period, g as Judged, gn as overshootBand, gr as nodeNames, gt as Request, h as readRecord, hn as drainBand, hr as kubeProxyPatch, ht as RecordLine, i as Try, in as HEALTH_PORT, ir as KubeProxyMode, it as propagationSource, j as KindCellV1, jn as MemberlistSettings, jt as intakeOf, k as KindCellRecordV1, kn as KindRun, kt as emptyOf, l as medianInterval, ln as REDIS, lr as ZONE_LOST, lt as Endpoint, m as kindCellRecordV1Schema, mn as bandOf, mr as kindConfig, mt as PropagationSource, n as Return, nn as ztunnelReplaced, nr as KindConfig, nt as observationEnd, o as latestReturn, on as LOG_LABEL, or as NodeImage, ot as reusesReset, p as kindCellRecordSchema, pn as backlogEnd, pr as isKubeProxyMode, pt as PodLine, q as ReconnectsFacts, qn as Trigger, qt as sliceEmptyOf, r as Schedule, rn as CLIENT, rr as KindScenario, rt as propagationOf, s as triesOf, sn as OUTSIDE, sr as ZONE_KEPT, st as unitOf, t as Reconnects, tn as ztunnelPodsOf, tr as KUBE_PROXY_MODES, tt as observationAfter, u as middle, un as SERVER, ur as cidrOverlap, ut as HBONE_PORT, v as calibrationOf, vn as seconds, vr as scenarioProblems, vt as Sessions, w as ClusterManifest, wn as Cycle, wt as backendsAt, x as predictionText, xn as BacklogTerm, xt as TCP_STATE, y as cellsTable, yn as secondsOf, yr as zoneOf, yt as SliceLine, z as upgrade, zn as PulsarSettings, zt as requestsOf } from "./judge-Cp3MzMk1.js";
2
2
  import { Quantity } from "@mark1russell7/quantity";
3
3
  import { CheckFn, Coupling, Finding, HealthServer, Poll, Scenario, ServiceBuilder, ServiceDescription, Stage, StopWay, Timing, TransportImpl, Verdict } from "@mark1russell7/service";
4
4
  import { BuildImage } from "@mark1russell7/harness";
@@ -228,6 +228,8 @@ export declare const hostsOf: (text: string, cluster: string) => ClusterHosts;
228
228
  * its network namespace only, with each client pod as a peer: the partition of one replica.
229
229
  * - `redis` is the Redis pod.
230
230
  * - `kube-proxy` is kube-proxy on the first worker.
231
+ * - `speaker` is the speaker of MetalLB on the owner of the VIP (SYS-57). Only a signal takes it.
232
+ * - `broker` is the JVM of the Pulsar broker that owns the topic of the cell (`KindCell.pulsar`).
231
233
  * - `servers` is each replica of the service. Only the injector, a middlebox and a sysctl take it.
232
234
  * Each one acts in the network namespace of each replica, with each client pod as a peer. A REJECT
233
235
  * resets only the sender of the segment that it matches, thus the rule goes where the segments of
@@ -235,7 +237,7 @@ export declare const hostsOf: (text: string, cluster: string) => ClusterHosts;
235
237
  * - `clients` is the process of each client pod. Only a signal, a sysctl and a drop of DNS take it.
236
238
  * They are the gap of `idle`, a sysctl of the namespace of each client pod, and `dns-blackhole`.
237
239
  */
238
- type Target = "server" | "redis" | "kube-proxy" | "servers" | "clients";
240
+ type Target = "server" | "redis" | "kube-proxy" | "broker" | "servers" | "clients" | "speaker";
239
241
  /** A step is one act of a fault, in the sequence of the plan. */
240
242
  type Step = {
241
243
  readonly do: "kubectl";
@@ -844,8 +846,8 @@ interface VipAnnouncer {
844
846
  readonly settle: Quantity;
845
847
  /** This function gives the VIP of a subnet, with `owner` its holder among `nodes`. */
846
848
  readonly vipOf: (subnet: string, owner: string, nodes: readonly string[]) => string;
847
- /** This function installs the announcer, with the local tags of its images, by the names of `images`. */
848
- readonly install: (cluster: Cluster, local: Readonly<Record<string, string>>, owner: string, nodes: readonly string[], vip: string) => Promise<void>;
849
+ /** This function installs the announcer, with the local tags of its images, by the names of `images`. MetalLB uses the settings of memberlist of `settings`. */
850
+ readonly install: (cluster: Cluster, local: Readonly<Record<string, string>>, owner: string, nodes: readonly string[], vip: string, settings?: VipSettings) => Promise<void>;
849
851
  /** This function makes `owner` the holder of the VIP before a run. It gives null, or why not. */
850
852
  readonly hold: (cluster: Cluster, owner: string, nodes: readonly string[], namespace: string, service: string) => Promise<string | null>;
851
853
  /** This function gives the state of the announcer after a run, for the line `vip`. */
@@ -875,8 +877,8 @@ export declare const macsAt: (found: ReadonlyArray<{
875
877
  * a usable speaker (speaker/layer2_controller.go, lines 83–129). A usable speaker is a member of
876
878
  * memberlist that is not dead (internal/speakerlist/speakerlist.go, lines 303–320).
877
879
  * - The speakers start memberlist from `DefaultLANConfig` (speakerlist.go, line 72). A file
878
- * /etc/metallb/memberlist/config.json replaces that config (lines 77–84). The install makes no
879
- * such file, thus each value is the default of hashicorp/memberlist v0.5.1.
880
+ * /etc/metallb/memberlist/config.json replaces that config (lines 77–84). Without settings of
881
+ * memberlist, the install makes no such file. Then each value is the default of memberlist v0.5.1.
880
882
  * - Each event of memberlist (a join, a leave or an update) calls `ForceSync` (speakerlist.go, lines
881
883
  * 339–349). `ForceSync` reconciles each Service at once, with no delay (internal/k8s/k8s.go, lines
882
884
  * 181–184, and internal/k8s/controllers/service_controller_reload.go, lines 62–118).
@@ -925,6 +927,18 @@ export declare const MEMBERLIST: {
925
927
  readonly pushPullInterval: Quantity;
926
928
  readonly gossipInterval: Quantity;
927
929
  };
930
+ /**
931
+ * These are the values of the config file of memberlist, as `DefaultLANConfig` of v0.5.1 gives them
932
+ * (config.go, lines 302–341). The speaker needs each field of the file, and it reads a time as a
933
+ * duration of Go (speakerlist.go, lines 355–432). The chart mounts the ConfigMap
934
+ * `metallb-memberlist-config` at /etc/metallb/memberlist, if the ConfigMap exists
935
+ * (charts/metallb/templates/speaker.yaml, lines 195–198 and 391–392). The key is `config.json`.
936
+ */
937
+ export declare const MEMBERLIST_FILE: Readonly<Record<string, string | number | boolean>>;
938
+ /** This function gives the config file of memberlist with `settings`. Each other value is the default of `MEMBERLIST_FILE`. */
939
+ export declare const memberlistFileOf: (settings: MemberlistSettings) => Record<string, string | number | boolean>;
940
+ /** This function gives the terms of memberlist with `settings`, or the defaults (`MEMBERLIST`) without them. */
941
+ export declare const memberlistTermsOf: (settings: MemberlistSettings | undefined) => typeof MEMBERLIST;
928
942
  /** These are the gratuitous ARPs of the owner at each reconcile: one at once, then one each `every` until `for` (announcer.go, lines 172–182). */
929
943
  export declare const METALLB_SPAM: {
930
944
  readonly every: Quantity;
@@ -980,14 +994,147 @@ export declare const holdMetallb: (cluster: Pick<Cluster, "kubectl">, owner: str
980
994
  * and a pool of the VIP. The webhook of the controller checks the pool, thus the function tries the
981
995
  * pool again until the webhook answers. A failed install gives the pods of MetalLB and the tail of
982
996
  * their logs.
997
+ *
998
+ * With `memberlist`, the ConfigMap of the config file comes before the speakers. Then the function
999
+ * checks that each speaker logged the load of the file (speakerlist.go, line 393). Without it, the
1000
+ * function checks that the ConfigMap does not exist.
983
1001
  */
984
- export declare const installMetallb: (cluster: Cluster, images: MetallbImages, nodes: readonly string[], vip: string) => Promise<void>;
1002
+ export declare const installMetallb: (cluster: Cluster, images: MetallbImages, nodes: readonly string[], vip: string, memberlist?: MemberlistSettings) => Promise<void>;
985
1003
  /**
986
1004
  * This function gives the record of MetalLB after a run: the nodes that announce the Service, and
987
1005
  * some lines of each speaker. The lines are about memberlist and the announces, with the times of the kubelet.
988
1006
  */
989
1007
  export declare const metallbRecord: (cluster: Pick<Cluster, "kubectl">, namespace: string, service: string) => Promise<Record<string, unknown>>;
990
1008
  //#endregion
1009
+ //#region src/pulsar.d.ts
1010
+ /**
1011
+ * This module installs Apache Pulsar 5.0.0 in a kind cluster (SYS-56): one ZooKeeper, one bookie and
1012
+ * two brokers, from the Helm chart 4.8.0. It also gives the producers of the cell: a Python script
1013
+ * in the image of Pulsar, with its client 3.13.0 over the C++ client 4.2.0. Each producer sends to
1014
+ * one topic, and a thread of it looks up the owner of that topic at each probe.
1015
+ *
1016
+ * The fault is a SIGKILL of the JVM of the broker that owns the topic. Each term of the return of a
1017
+ * producer comes from a pinned source:
1018
+ * - The owner of a bundle is an ephemeral znode of the session of its broker. A lookup gives the
1019
+ * owner from the cache of the ownership, with no check of its life (pulsar-broker
1020
+ * NamespaceService.java at v5.0.0, lines 489–508). Thus each lookup names the stopped broker
1021
+ * until its session expires.
1022
+ * - The session timeout is `metadataStoreSessionTimeoutMillis`, 30000 (conf/broker.conf at v5.0.0,
1023
+ * line 187, and the chart, values.yaml line 1474). ZKMetadataStore.java gives it to ZooKeeper (line 105).
1024
+ * - The client of ZooKeeper 3.9.6 pings after 9 s with no send (ClientCnxn.java, lines 422, 1184
1025
+ * and 1263–1268). That is half of the read timeout of 2/3 of the session, less 1 s.
1026
+ * The server rounds each expiry up to the next tick of 2000 ms (ExpiryQueue.java, lines 53–54
1027
+ * and 87, and conf/zookeeper.conf of Pulsar, line 21). Thus the session expires 21–32 s after the stop.
1028
+ * - The broker that stays then takes the bundle at the next lookup.
1029
+ * - The chart starts a broker again only after its old znode is gone (templates/broker-statefulset.yaml,
1030
+ * lines 296–302). Thus the stopped broker cannot take the bundle back first.
1031
+ */
1032
+ /** This version is the release of Pulsar of the lab. */
1033
+ export declare const PULSAR_VERSION = "5.0.0";
1034
+ /** This chart is the Helm chart 4.8.0 of Pulsar. The sha256 is of the file of the release. */
1035
+ export declare const PULSAR_CHART: PinnedChart;
1036
+ /**
1037
+ * This image is Pulsar 5.0.0 for linux/amd64, pinned by the digest of the manifest of the platform.
1038
+ * It has ZooKeeper 3.9.6, BookKeeper, the broker, Python 3 and the Python client 3.13.0. The lab
1039
+ * pulls it by its digest, tags it (`localPin`), and loads it into each node.
1040
+ */
1041
+ export declare const PULSAR_IMAGE = "apachepulsar/pulsar:5.0.0@sha256:11e9a885121e16be91da77fdd3cfc3d4cbbece4700271d75e949585dbd3a5a5b";
1042
+ /** This namespace holds Pulsar. The release of the chart is `pulsar` too. */
1043
+ export declare const PULSAR_NAMESPACE = "pulsar";
1044
+ /** This name is the app of the producers of a cell. */
1045
+ export declare const PRODUCER = "producer";
1046
+ /** This topic is the topic of the producers. */
1047
+ export declare const PULSAR_TOPIC = "persistent://public/default/lab";
1048
+ /** This URL is the Service of the brokers for the binary protocol. */
1049
+ export declare const PULSAR_SERVICE: string;
1050
+ /** This URL is the lookup of the owner of the topic, on the Service of the brokers. */
1051
+ export declare const PULSAR_LOOKUP: string;
1052
+ /** This time is the session timeout of each broker in ZooKeeper (`metadataStoreSessionTimeoutMillis`). */
1053
+ export declare const SESSION: Quantity;
1054
+ /** This time is the tick of ZooKeeper (`tickTime`). The server rounds each expiry up to a tick. */
1055
+ export declare const TICK: Quantity;
1056
+ /** This time is the longest idle time of the client of ZooKeeper before its ping: the half of 2/3 of the session, less 1 s. */
1057
+ export declare const PING: Quantity;
1058
+ /**
1059
+ * This backoff is the backoff of a producer of the C++ client 4.2.0, with the defaults of the Python
1060
+ * client 3.13.0:
1061
+ * - The initial delay is 100 ms and the most is 60 s (lib/ClientConfigurationImpl.h, lines 39–40).
1062
+ * - The mandatory stop is the send timeout less 100 ms, and at least 100 ms (lib/ProducerImpl.cc,
1063
+ * lines 55–57). The send timeout of `create_producer` is 30000 ms (pulsar/__init__.py, line 1015).
1064
+ * - The jitter takes 0–9 % of each delay (lib/Backoff.cc, line 54).
1065
+ * - A try that fails takes the lookup and the connect, which a reset ends at once. The lab gives it 100 ms.
1066
+ */
1067
+ export declare const PRODUCER_BACKOFF: Backoff;
1068
+ /**
1069
+ * This function gives the values of the chart: ZooKeeper, one bookie and two brokers, with no
1070
+ * proxy, no autorecovery, no toolset and no monitor. The bookie keeps one copy of each entry, and
1071
+ * the brokers do not move a bundle by load. Each image is the local image, with no pull.
1072
+ */
1073
+ export declare const pulsarValues: (image: string) => Record<string, unknown>;
1074
+ /**
1075
+ * This script is a producer of the cell. Each line that it writes is JSON, with the time of
1076
+ * CLOCK_MONOTONIC in milliseconds, the pod and the node:
1077
+ * - `send`: one send, at its start, with its time to the answer and its outcome. A send is `ok` within
1078
+ * the timeout, `late` after it, or the name of the result of the client (for example `timeout`).
1079
+ * - `lookup`: one lookup of the owner of the topic, with the host of the owner.
1080
+ * - `pulsar`: one line of the C++ client about the connection of the producer.
1081
+ */
1082
+ export declare const PRODUCER_SCRIPT = "import json, logging, os, sys, threading, time, urllib.request\nimport pulsar\n\nPOD = os.environ[\"POD_NAME\"]\nNODE = os.environ[\"NODE_NAME\"]\nEVERY = int(os.environ[\"EVERY_MS\"]) / 1000\nTIMEOUT = int(os.environ[\"TIMEOUT_MS\"])\nPROBE = int(os.environ[\"PROBE_MS\"]) / 1000\nLOCK = threading.Lock()\nKEPT = (\"Schedule reconnection\", \"Getting connection from pool\", \"Created producer\", \"Connection closed\", \"Disconnected\", \"Lookup response\", \"Failed to\", \"Finished connecting\")\n\n\ndef now():\n return time.monotonic() * 1000\n\n\ndef say(**line):\n text = json.dumps({**line, \"p\": POD, \"n\": NODE}, separators=(\",\", \":\"))\n with LOCK:\n sys.stdout.write(text + \"\\n\")\n sys.stdout.flush()\n\n\nclass Relay(logging.Handler):\n def emit(self, record):\n message = record.getMessage()\n if any(word in message for word in KEPT):\n say(ev=\"pulsar\", t=now(), m=message[:400])\n\n\ndef probe():\n while True:\n start = now()\n owner = None\n outcome = \"ok\"\n try:\n with urllib.request.urlopen(os.environ[\"LOOKUP\"], timeout=1) as answer:\n data = json.loads(answer.read())\n url = data.get(\"brokerUrl\") or \"\"\n owner = url.split(\"://\", 1)[-1].rsplit(\":\", 1)[0] or None\n except Exception as error:\n outcome = type(error).__name__.lower()\n say(ev=\"lookup\", t=start, d=round(now() - start, 3), o=outcome, owner=owner)\n time.sleep(max(0.0, PROBE - (now() - start) / 1000))\n\n\ndef answered(start):\n def done(result, message_id):\n took = now() - start\n if result == pulsar.Result.Ok:\n outcome = \"ok\" if took <= TIMEOUT else \"late\"\n else:\n outcome = getattr(result, \"name\", str(result).split(\".\")[-1]).lower()\n say(ev=\"send\", t=start, d=round(took, 3), o=outcome)\n return done\n\n\nlogger = logging.getLogger(\"lab\")\nlogger.setLevel(logging.INFO)\nlogger.propagate = False\nlogger.addHandler(Relay())\nthreading.Thread(target=probe, daemon=True).start()\nclient = pulsar.Client(os.environ[\"SERVICE\"], logger=logger)\nwhile True:\n try:\n producer = client.create_producer(os.environ[\"TOPIC\"])\n break\n except Exception as error:\n say(ev=\"text\", t=now(), text=\"create_producer: \" + str(error)[:200])\n time.sleep(2)\nat = time.monotonic()\nwhile True:\n start = now()\n try:\n producer.send_async(b\"lab\", answered(start))\n except Exception as error:\n say(ev=\"send\", t=start, d=0, o=\"refused-\" + type(error).__name__.lower())\n at += EVERY\n time.sleep(max(0.0, at - time.monotonic()))\n";
1083
+ /**
1084
+ * This function gives the producers of a cell in its namespace. They are the script in a ConfigMap,
1085
+ * and a Deployment of `clients` pods in the local image of Pulsar, one on each worker.
1086
+ */
1087
+ export declare const pulsarObjects: (cell: KindCell, namespace: string, image: string) => unknown[];
1088
+ /** A broker is a pod of a broker: its name, its node, its address, and if it is ready. */
1089
+ interface Broker {
1090
+ readonly pod: string;
1091
+ readonly node: string;
1092
+ readonly ip: string;
1093
+ readonly ready: boolean;
1094
+ }
1095
+ /** This function gives the pods of the brokers, in the sequence of their names. */
1096
+ export declare const brokersOf: (cluster: Pick<Cluster, "kubectl">) => Promise<Broker[]>;
1097
+ /** This function gives the broker that a host of a lookup names. Its pod is the first label of the host, or its address is the host. */
1098
+ export declare const brokerOfHost: (brokers: readonly Broker[], host: string) => Broker | undefined;
1099
+ /** This is the state of the producers that the hold reads. It has the last lookup and the last sends of each producer, and the last time of a line. */
1100
+ interface ProducerState {
1101
+ readonly owners: ReadonlyMap<string, {
1102
+ readonly t: number;
1103
+ readonly owner: string | null;
1104
+ }>;
1105
+ readonly sends: ReadonlyMap<string, {
1106
+ readonly ok: number;
1107
+ readonly failed: number;
1108
+ }>;
1109
+ readonly last: number;
1110
+ }
1111
+ /**
1112
+ * This function tells why the producers are not at rest, or gives the host of the owner of the
1113
+ * topic. At rest, each of `clients` producers had an answer in the last second and no failure in
1114
+ * the last 2 s. The last lookup of each one is in the last 2 s, and each names the same owner.
1115
+ */
1116
+ export declare const ownerAtRest: (state: ProducerState, clients: number) => {
1117
+ readonly owner: string;
1118
+ } | string;
1119
+ /**
1120
+ * This function waits until each broker is ready and the producers are at rest (`ownerAtRest`). It
1121
+ * gives the broker that owns the topic and the host that the lookups name, or why it could not in `within` ms.
1122
+ */
1123
+ export declare const holdPulsar: (cluster: Pick<Cluster, "kubectl">, state: () => ProducerState, clients: number, within?: number) => Promise<{
1124
+ readonly broker: Broker;
1125
+ readonly host: string;
1126
+ } | string>;
1127
+ /**
1128
+ * This function installs Pulsar in a cluster, with its image on each node. A failed install gives
1129
+ * the pods of Pulsar and the tail of their logs.
1130
+ */
1131
+ export declare const installPulsar: (cluster: Cluster, image: string) => Promise<void>;
1132
+ /**
1133
+ * This function gives the record of Pulsar after a run. It has the brokers, and the kept lines of
1134
+ * each broker and of its last container, with the times of the kubelet.
1135
+ */
1136
+ export declare const pulsarRecord: (cluster: Pick<Cluster, "kubectl">) => Promise<Record<string, unknown>>;
1137
+ //#endregion
991
1138
  //#region src/lds.d.ts
992
1139
  /**
993
1140
  * This filter of RE2 selects the two counters of the listener manager of Envoy that an update of LDS
@@ -1270,6 +1417,8 @@ interface RunOptions {
1270
1417
  */
1271
1418
  readonly work?: string;
1272
1419
  }
1420
+ /** This function gives the name of the cluster of a cell in an environment. Kind permits 32 characters at most: lowercase letters, digits and dashes. */
1421
+ export declare const clusterNameOf: (cell: KindCell, env: number) => string;
1273
1422
  /** This function writes the result of a cell: its raw record, and one line of its verdict in `summary.ndjson`. */
1274
1423
  export declare const writeResult: (out: string, result: KindCellResult) => void;
1275
1424
  /**
@@ -1351,5 +1500,5 @@ export declare const toolPath: (tool: Tool, key?: string, cache?: string) => str
1351
1500
  */
1352
1501
  export declare const ensureTool: (tool: Tool, key?: string, cache?: string) => Promise<string>;
1353
1502
  //#endregion
1354
- export { type Announcement, type BacklogTerm, type Band, type BandV1, CLIENT, type CiliumImages, type Cluster, type ClusterHosts, type ClusterManifest, type CountBand, type Credentials, type Cycle, DATAPLANES, DRAIN_RULES, type Dataplane, type Declaration, type Deleted, type DeletionWindow, type EdgeProtocol, type EdsSpec, Endpoint, type EnvironmentManifest, FORMAT, FORMAT_V1, type FaultPlan, type Flap, HBONE_PORT, HEALTH_PORT, type Judged, KIND_NOISE, KUBE_PROXY_MODES, type KindCell, type KindCellRecord, type KindCellRecordV1, type KindCellResult, type KindCellV1, type KindConfig, type KindDecision, type KindLab, type KindRun, type KindScenario, type KindVerdict, type KindVerdictV1, type KubeProxyMode, type KubeVipPod, type KubeletProbe, LAST_SLACK, LB_CLASS, LOG_LABEL, type LdsSpec, type LeafCertificate, type LearnWindow, Line, type ListenerCounts, type LoadSample, type Mesh, type MeshFlavor, type MeshImages, type MeshMode, type MetallbImages, NODE_IMAGES, type NodeImage, type NodeLifecycle, type NonePrediction, O04, O09, O10, O16, OUTSIDE, type OutsideSpec, PORT, type Parts, Period, type PermittedWindow, type PinnedChart, PodLine, type PodSettings, type Prediction, type PredictionV1, type Propagated, type Propagation, PropagationSource, REDIS, RELATIVE, RecordLine, type RedisDeclaration, type Reference, type Replica, Request, type ResetReuse, RulesLine, type RunCheck, type RunCheckV1, type RunFacts, type RunFactsV1, type RunOptions, SERVER, STAGES, type ServiceRule, Sessions, SliceLine, SocketLine, type Stack, type Stamp, type Step, TCP_STATE, type Target, type Template, type TimeSpread, type Tool, type Trigger, type TriggerKind, type TriggerV1, TunnelLine, VIP_ANNOTATION, type Verdicts, type VipAnnouncer, type VipAnnouncerName, type VipLease, type VipNetwork, type VipService, type VipSettings, type WindowPrediction, type Workload, ZONE_KEPT, ZONE_LABEL, ZONE_LOST, ZtunnelPodLine, backendsAt, backlogEnd, bandOf, byClients, byNode, calibrationOf, cellsTable, checkRun, cidrOverlap, cidrRange, cyclesOf, deletionOf, deletionsOf, drainBand, dropOf, emptyOf, factsOf, failuresOf, goDuration, intakeOf, isKubeProxyMode, isTunnelState, judge, judgeKind, kernelCounts, kindCellRecordSchema, kindCellRecordV1Schema, kindConfig, kubeProxyPatch, medianInterval, medianText, middle, nodeNames, observationAfter, observationEnd, outcomesOf, overshootBand, periodOf, podsAt, podsOf, predictionText, propagationOf, propagationSource, quantileOf, readRecord, recordsOf, referenceOf, requestBand, requestsOf, restartOf, restartsAt, reusesReset, rulesOf, scenario, scenarioProblems, seconds, secondsOf, sessionsAt, showBand, signalOf, signalsOf, sliceDropOf, sliceEmptyOf, sliceReadyAt, sliceReadyOf, slicesOf, socketsOf, stoppingOf, timeSpread, transitionOf, tunnelsOf, unitOf, updatesOf, upgrade, upgradeCell, zoneOf, ztunnelPodsOf, ztunnelReplaced };
1503
+ export { type Announcement, type BacklogTerm, type Backoff, type Band, type BandV1, type Broker, CLIENT, type CiliumImages, type Cluster, type ClusterHosts, type ClusterManifest, type CountBand, type Credentials, type Cycle, DATAPLANES, DRAIN_RULES, type Dataplane, type Declaration, type Deleted, type DeletionWindow, type EdgeProtocol, type EdsSpec, Endpoint, type EnvironmentManifest, FORMAT, FORMAT_V1, type FaultPlan, type Flap, HBONE_PORT, HEALTH_PORT, type Judged, KIND_NOISE, KUBE_PROXY_MODES, type KindCell, type KindCellRecord, type KindCellRecordV1, type KindCellResult, type KindCellV1, type KindConfig, type KindDecision, type KindLab, type KindRun, type KindScenario, type KindVerdict, type KindVerdictV1, type KubeProxyMode, type KubeVipPod, type KubeletProbe, LAST_SLACK, LB_CLASS, LOG_LABEL, type LdsSpec, type LeafCertificate, type LearnWindow, Line, type ListenerCounts, type LoadSample, type MemberlistSettings, type Mesh, type MeshFlavor, type MeshImages, type MeshMode, type MetallbImages, NODE_IMAGES, type NodeImage, type NodeLifecycle, type NonePrediction, O04, O09, O10, O16, OUTSIDE, type OutsideSpec, PORT, type Parts, Period, type PermittedWindow, type PinnedChart, PodLine, type PodSettings, type Prediction, type PredictionV1, type ProducerState, type Propagated, type Propagation, PropagationSource, type PulsarSettings, REDIS, RELATIVE, type Reconnects, type ReconnectsFacts, type ReconnectsPrediction, RecordLine, type RedisDeclaration, type Reference, type Replica, Request, type ResetReuse, type Return, RulesLine, type RunCheck, type RunCheckV1, type RunFacts, type RunFactsV1, type RunOptions, SERVER, STAGES, type Schedule, type ServiceRule, Sessions, SliceLine, SocketLine, type Stack, type Stamp, type Step, TCP_STATE, type Target, type Template, type TimeSpread, type Tool, type Trigger, type TriggerKind, type TriggerV1, type Try, TunnelLine, VIP_ANNOTATION, type Verdicts, type VipAnnouncer, type VipAnnouncerName, type VipLease, type VipNetwork, type VipService, type VipSettings, type WindowPrediction, type Workload, ZONE_KEPT, ZONE_LABEL, ZONE_LOST, ZtunnelPodLine, backendsAt, backlogEnd, bandOf, byClients, byNode, calibrationOf, cellsTable, checkRun, cidrOverlap, cidrRange, cyclesOf, deletionOf, deletionsOf, drainBand, dropOf, emptyOf, factsOf, failuresOf, goDuration, intakeOf, isKubeProxyMode, isTunnelState, judge, judgeKind, judgeReconnects, kernelCounts, kindCellRecordSchema, kindCellRecordV1Schema, kindConfig, kubeProxyPatch, latestReturn, medianInterval, medianText, middle, nodeNames, observationAfter, observationEnd, outcomesOf, overshootBand, periodOf, podsAt, podsOf, predictionText, propagationOf, propagationSource, quantileOf, readRecord, recordsOf, referenceOf, requestBand, requestsOf, restartOf, restartsAt, reusesReset, rulesOf, scenario, scenarioProblems, seconds, secondsOf, sessionsAt, showBand, signalOf, signalsOf, sliceDropOf, sliceEmptyOf, sliceReadyAt, sliceReadyOf, slicesOf, socketsOf, stoppingOf, timeSpread, transitionOf, triesOf, tunnelsOf, unitOf, updatesOf, upgrade, upgradeCell, zoneOf, ztunnelPodsOf, ztunnelReplaced };
1355
1504
  //# sourceMappingURL=index.d.ts.map