@mark1russell7/kind 0.6.0 → 0.8.1
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/README.md +30 -1
- package/build/index.d.ts +112 -9
- package/build/index.js +453 -33
- package/build/index.js.map +1 -1
- package/build/{judge-DNCI5vvt.js → judge-Cgvkh4JX.js} +111 -10
- package/build/judge-Cgvkh4JX.js.map +1 -0
- package/build/{judge-B9kVpFE-.d.ts → judge-gpC49mVw.d.ts} +106 -6
- package/build/judge.d.ts +2 -2
- package/build/judge.js +1 -1
- package/image/client-grpc.mjs +17 -5
- package/package.json +2 -2
- package/src/client-lines.ts +37 -6
- package/build/judge-DNCI5vvt.js.map +0 -1
package/README.md
CHANGED
|
@@ -137,6 +137,13 @@ From 0.5.0, the lab installs the flavor `ambient` too:
|
|
|
137
137
|
- **The kernel.** istio-cni writes iptables rules in each pod and on each node. Thus `kind.yml` loads their modules first, and an ambient cell waits when one does not load.
|
|
138
138
|
- **The log of ztunnel.** For a cell in the ambient mode, the watcher follows each ztunnel pod in istio-system (`followsZtunnel`). Each line of its log becomes a `ztunnel` line, stamped at its arrival, and each ztunnel pod is a `ztunnel-pod` line. No band reads them.
|
|
139
139
|
|
|
140
|
+
From 0.7.0, a cell can restart ztunnel, and it can set the environment of ztunnel:
|
|
141
|
+
|
|
142
|
+
- **The watcher.** It follows the ztunnel pods for each cell in the flavor `ambient`, also for a cell of sidecar pods there. The lines of the ztunnel pods are the evidence of a restart that no pod of the cell sees.
|
|
143
|
+
- **The environment.** `mesh.ztunnel` gives variables of the DaemonSet of ztunnel for one cell, for example `CONNECTION_TERMINATION_DEADLINE`. Before the cell, `setZtunnelEnv` sets them with `kubectl set env` (`ztunnelEnvArgs`). Then it waits for the rollout, and until no old ztunnel pod is left. After the cell, it removes them in the same way.
|
|
144
|
+
- **The reference `restart`.** It is the first deletion timestamp of a ztunnel pod in the run, as the watcher receives it (`restartOf`). A run of the trigger `ztunnel-restart` ends when each deleted ztunnel pod is gone, and each node has a ready new one (`ztunnelReplaced`).
|
|
145
|
+
- **The DaemonSet.** The chart of ztunnel sets `maxSurge` 1. Then the controller of the DaemonSet of Kubernetes v1.37.0 skips a pod with a deletion timestamp. It makes a new pod on that node at once (`daemon_controller.go`, lines 863–924). Thus the new ztunnel runs beside the old one while the old one drains.
|
|
146
|
+
|
|
140
147
|
A new member of the union `Template` breaks a reader that switches on it. That is a breaking change before 1.0.0, thus the version is 0.3.0. The record format stays `/2`, with the optional field `mesh`. A judge before 0.3.0 cannot read a record of T15.
|
|
141
148
|
|
|
142
149
|
## The image
|
|
@@ -154,6 +161,7 @@ The lab image (`image/`) holds the service of a cell on `@mark1russell7/service`
|
|
|
154
161
|
- **The gRPC clients** (`client-grpc.mjs`) hold one channel of grpc-js 1.14.6 to the ClusterIP, and send a call of `grpc.health.v1.Health/Check` each interval on it. Each call gives the line of a request of `client.mjs`, with the pod that answered (the header `x-pod`). A call that fails at once names the errno of the last connect: refused, reset or unreachable. A call of grpc-js has no deadline at its defaults. Thus a call with no answer in the timeout is a timeout, and the client cancels it.
|
|
155
162
|
- From 0.6.0, each socket of the channel also gives a `sock` line at its connect and at its close (`client-lines.ts`). Each line gives the local port of the socket (`lp`). The close line keeps the port of the connect, and it gives the code of the error of the socket (`err`), or null.
|
|
156
163
|
- From 0.6.0, SIGUSR1 stops the calls of the client, and SIGUSR2 starts them again. Each signal gives a `gap` line. The channel and its socket stay open in the gap. A listener of SIGUSR1 replaces the start of the inspector of Node at that signal.
|
|
164
|
+
- From 0.8.0, SIGHUP stops the calls and closes the channel. Then the next SIGUSR2 opens a new channel before it starts the calls, and its `gap` line has `open: true`. The connect line of a socket also gives its local address (`la`): the address of the pod.
|
|
157
165
|
|
|
158
166
|
## The triggers
|
|
159
167
|
|
|
@@ -174,10 +182,18 @@ The lab image (`image/`) holds the service of a cell on `@mark1russell7/service`
|
|
|
174
182
|
| `rollout` | no Redis pod, then a rolling update |
|
|
175
183
|
| `cpu-throttle` | `cpu.max` in the cgroup of the container of the first replica |
|
|
176
184
|
| `authorization-policy` | `kubectl apply` of a DENY AuthorizationPolicy on the server pods for the principal of an account (`account`, the account `default` of the clients when not given), then `kubectl delete` after the hold |
|
|
177
|
-
| `idle` | SIGUSR1 to the gRPC client of each client pod, and SIGUSR2 after the hold: a gap of the calls (the target `clients`). The restore sends SIGUSR2 again |
|
|
185
|
+
| `idle` | SIGUSR1 to the gRPC client of each client pod, and SIGUSR2 after the hold: a gap of the calls (the target `clients`). The restore sends SIGUSR2 again. With `middlebox`, a stateful middlebox in each replica from before the gap to the restore. With `close`, a new channel at the fault for 5 s: SIGHUP before the fault, then SIGUSR2, a wait and SIGHUP |
|
|
186
|
+
| `ztunnel-restart` | `kubectl delete pod` of the ztunnel pod of each node, with its grace (`ZTUNNEL_PODS`). The flow of each client crosses the ztunnel of its own node. The restore waits for the rollout of the DaemonSet |
|
|
178
187
|
|
|
179
188
|
A cgroup path that is not the scope of one container is refused. A write to the root of the node throttles or freezes each pod of the node.
|
|
180
189
|
|
|
190
|
+
From 0.8.0, a plan can have steps before the fault (`prepare`). No reference comes from them, and a failed one makes the run void after the restore. The steps of the borders of T15:
|
|
191
|
+
|
|
192
|
+
- **A sysctl of a namespace** (`sysctl`): the injector of the harness enters the network namespace of each client pod or each replica. There it sets one sysctl (`sysctlCommand`). Only a sysctl of the namespace (`net.`) and a whole number reach it. A black hole of T15 with `retries` sets `net.ipv4.tcp_retries2` of each client pod. The restore sets the default of a new namespace, 15 (`NETNS_DEFAULTS`).
|
|
193
|
+
- **A stateful middlebox** (`middlebox`): two chains of its own (`MIDDLEBOX`) in each replica take the segments of each client pod on the HBONE port. A table of the match recent keeps the time of the last segment of each client pod. After the idle timeout with no segment, the chains drop each later segment of the flow: the silent-drop form (`middleboxCommands`). A SYN is a new flow. Conntrack stays as it is: istio-cni sends each answer of the app back to ztunnel through the connmark of its conntrack entry. The lab reads the filter table after the set and before the removal.
|
|
194
|
+
- **A quiet black hole** (`quiet`): SIGUSR1 to each client 1 s before the fault, and SIGUSR2 after the clear. Thus the PING of ztunnel is the only data that gets no answer.
|
|
195
|
+
- `KindLab` has the method `netns`: the commands of the injector in the namespace of a PID, in sequence, each word plain. Each one gives an `act` line with its output.
|
|
196
|
+
|
|
181
197
|
The plan's `event:clock-jump` has no trigger. A step of CLOCK_REALTIME in the VM steps the clock of each container: the kubelet, the API server and the cells of other agents. A time namespace offsets only the monotonic clocks, and the runtime of the service reads only the monotonic clock.
|
|
182
198
|
|
|
183
199
|
## The predictions
|
|
@@ -229,6 +245,19 @@ From 0.6.0, the prediction `ends` is the end of the socket of each client, from
|
|
|
229
245
|
- With a window (`window`), the failed requests must also agree with that window. The observation lasts until each socket can end, and until each request of the window ended.
|
|
230
246
|
- The facts of a run give the first close of each client after the reference (`closes`).
|
|
231
247
|
|
|
248
|
+
From 0.8.0, a prediction `ends` can be the end of the tunnel of each client (`of: "tunnel"`). The tunnel is the HBONE connection of its ztunnel to the replica of its last answer before the heal.
|
|
249
|
+
|
|
250
|
+
- The prober gives each change of the state of a socket of the HBONE port, 15008. The lab keeps these records (`keptKernel`) as `kernel.state` lines (`tunnelsOf`). It drops the other changes of state, as before.
|
|
251
|
+
- The tunnel of a client goes from the address of its pod (`la` of a `sock` line) to that replica at port 15008. Its first change out of ESTABLISHED after the reference must be in the band ± δ. It must be to FIN_WAIT1: the side of the client closes it, and the peer does not close first.
|
|
252
|
+
- The first request of each client after the heal must be `ok`, on a new tunnel. The main value is the middle of the ends, in `s`.
|
|
253
|
+
- From 0.8.1, `ends` has the optional band `answer`. A change to CLOSE_WAIT in that band ± δ also agrees: the peer answers the close of the client, and its FIN comes first. Before the band, the peer closed first.
|
|
254
|
+
|
|
255
|
+
In 0.8.1, the middlebox uses the match recent, not the sysctls of conntrack, and `ends` has the optional field `answer`. `SYSCTL` and `NETNS_DEFAULTS` keep only `tcp_retries2`. These fields came in 0.8.0, which was not published. The fix and the optional field are a patch, thus the version is 0.8.1.
|
|
256
|
+
|
|
257
|
+
New members of the union `Step` (`sysctl` and `middlebox`) and of the signals of a step (`SIGHUP`) break a reader that switches on them. `KindLab` also has a new method, `netns`. Each is a breaking change before 1.0.0, thus the version is 0.8.0. The record format stays `/2`. A trigger has the optional fields `middlebox`, `retries`, `quiet` and `close`, and `ends` has the optional field `of`. The lines `kernel.state` are new lines of a run.
|
|
258
|
+
|
|
259
|
+
A new member of the union `TriggerKind`, `ztunnel-restart`, and a new member of the union `Reference`, `restart`, break a reader that switches on them. Each is a breaking change before 1.0.0, thus the version is 0.7.0. The record format stays `/2`, with the optional field `mesh.ztunnel`.
|
|
260
|
+
|
|
232
261
|
A new member of the union `Prediction`, `ends`, and a new member of the union `TriggerKind`, `idle`, break a reader that switches on them. The union `Target` has the new member `clients` too. Each is a breaking change before 1.0.0, thus the version is 0.6.0. The record format stays `/2`, with the optional field `closes`: the lines `sock` and `gap` are new lines of a run.
|
|
233
262
|
|
|
234
263
|
A new member of the union `Target`, `servers`, breaks a reader that switches on it. `KindLab` also has a new method, `tables`, which each implementation must have. Each is a breaking change before 1.0.0, thus the version is 0.5.0. The record format stays `/2`: the lines `tables`, `ztunnel` and `ztunnel-pod` are new lines of a run.
|
package/build/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as updatesOf, $t as
|
|
1
|
+
import { $ as updatesOf, $t as Declaration, A as TriggerV1, An as scenario, At as rulesOf, B as RunCheck, Bt as ztunnelPodsOf, C as KindCellResult, Cn as NodeImage, Ct as outcomesOf, D as PredictionV1, Dn as kindConfig, Dt as requestsOf, E as LoadSample, En as goDuration, Et as recordsOf, F as KIND_NOISE, Ft as slicesOf, G as judgeKind, Gt as PORT, H as checkRun, Ht as CLIENT, I as KindDecision, It as socketsOf, J as propagationOf, Jt as bandOf, K as observationAfter, Kt as REDIS, L as KindVerdict, Lt as stoppingOf, M as upgrade, Mt as signalsOf, N as upgradeCell, Nt as sliceDropOf, O as RunCheckV1, On as kubeProxyPatch, Ot as restartOf, P as Deleted, Pt as sliceEmptyOf, Q as unitOf, Qt as Band, R as LAST_SLACK, Rt as transitionOf, S as KindCellRecordV1, Sn as NODE_IMAGES, St as kernelCounts, T as KindVerdictV1, Tn as cidrRange, Tt as podsOf, U as deletionsOf, Ut as HEALTH_PORT, V as RunFacts, Vt as ztunnelReplaced, W as factsOf, Wt as LOG_LABEL, X as referenceOf, Xt as secondsOf, Y as propagationSource, Yt as seconds, Z as reusesReset, Zt as showBand, _ as ClusterManifest, _n as Workload, _t as dropOf, a as STAGES, an as MeshMode, at as RecordLine, b as FORMAT_V1, bn as KindScenario, bt as intakeOf, c as readRecord, cn as RedisDeclaration, ct as SliceLine, d as calibrationOf, dn as ResetReuse, dt as TunnelLine, en as KindCell, et as Endpoint, f as cellsTable, fn as Stack, ft as ZtunnelPodLine, g as BandV1, gn as WindowPrediction, gt as deletionOf, h as timeSpread, hn as TriggerKind, ht as byNode, i as quantileOf, in as MeshFlavor, it as PropagationSource, j as judge, jn as scenarioProblems, jt as signalOf, k as RunFactsV1, kn as nodeNames, kt as restartsAt, l as Judged, ln as Reference, lt as SocketLine, m as predictionText, mn as Trigger, mt as byClients, n as medianInterval, nn as KubeletProbe, nt as Line, o as kindCellRecordSchema, on as PodSettings, ot as Request, p as medianText, pn as Template, pt as backendsAt, q as observationEnd, qt as SERVER, r as middle, rn as Mesh, rt as PodLine, s as kindCellRecordV1Schema, sn as Prediction, st as RulesLine, t as RELATIVE, tn as KindRun, tt as HBONE_PORT, u as TimeSpread, un as Replica, ut as TCP_STATE, v as EnvironmentManifest, vn as KUBE_PROXY_MODES, vt as emptyOf, w as KindCellV1, wn as cidrOverlap, wt as podsAt, x as KindCellRecord, xn as KubeProxyMode, xt as isTunnelState, y as FORMAT, yn as KindConfig, yt as failuresOf, z as Propagated, zt as tunnelsOf } from "./judge-gpC49mVw.js";
|
|
2
2
|
import { Quantity } from "@mark1russell7/quantity";
|
|
3
3
|
import { CheckFn, Finding, HealthServer, Poll, Rule, Scenario, ServiceBuilder, ServiceDescription, Stage, Timing, TransportImpl, Verdict } from "@mark1russell7/service";
|
|
4
4
|
import { RedisClient } from "@mark1russell7/service/redis";
|
|
@@ -111,10 +111,12 @@ export declare const hostsOf: (text: string, cluster: string) => ClusterHosts;
|
|
|
111
111
|
* - `server` is the first replica of the service, in the sequence of its name.
|
|
112
112
|
* - `redis` is the Redis pod.
|
|
113
113
|
* - `kube-proxy` is kube-proxy on the first worker.
|
|
114
|
-
* - `servers` is each replica of the service. Only the injector
|
|
115
|
-
* namespace of each replica, with each client pod as a peer. A REJECT
|
|
116
|
-
* the segment that it matches, thus the rule goes where the segments of
|
|
117
|
-
*
|
|
114
|
+
* - `servers` is each replica of the service. Only the injector, a middlebox and a sysctl take it.
|
|
115
|
+
* Each one acts in the network namespace of each replica, with each client pod as a peer. A REJECT
|
|
116
|
+
* resets only the sender of the segment that it matches, thus the rule goes where the segments of
|
|
117
|
+
* the clients arrive.
|
|
118
|
+
* - `clients` is the process of each client pod. Only a signal and a sysctl take it: the gap of the
|
|
119
|
+
* trigger `idle`, and a sysctl of the namespace of each client pod.
|
|
118
120
|
*/
|
|
119
121
|
type Target = "server" | "redis" | "kube-proxy" | "servers" | "clients";
|
|
120
122
|
/** A step is one act of a fault, in the sequence of the plan. */
|
|
@@ -125,7 +127,7 @@ type Step = {
|
|
|
125
127
|
} | {
|
|
126
128
|
readonly do: "signal";
|
|
127
129
|
readonly target: Target;
|
|
128
|
-
readonly signal: "SIGKILL" | "SIGSTOP" | "SIGCONT" | "SIGUSR1" | "SIGUSR2";
|
|
130
|
+
readonly signal: "SIGKILL" | "SIGSTOP" | "SIGCONT" | "SIGUSR1" | "SIGUSR2" | "SIGHUP";
|
|
129
131
|
} | {
|
|
130
132
|
readonly do: "pause";
|
|
131
133
|
readonly target: Target;
|
|
@@ -152,14 +154,27 @@ type Step = {
|
|
|
152
154
|
} | {
|
|
153
155
|
readonly do: "apply";
|
|
154
156
|
readonly object: Readonly<Record<string, unknown>>;
|
|
157
|
+
} | {
|
|
158
|
+
readonly do: "sysctl";
|
|
159
|
+
readonly target: Target;
|
|
160
|
+
readonly key: string;
|
|
161
|
+
readonly value: string;
|
|
162
|
+
} | {
|
|
163
|
+
readonly do: "middlebox";
|
|
164
|
+
readonly target: Target;
|
|
165
|
+
readonly idle: Quantity | null;
|
|
166
|
+
readonly port: number;
|
|
155
167
|
};
|
|
156
168
|
/**
|
|
157
169
|
* A fault plan is the steps of a run:
|
|
170
|
+
* - `prepare` comes before the fault, and no reference comes from it: a sysctl, a middlebox, or a
|
|
171
|
+
* stop of the calls. A plan without it has no such steps.
|
|
158
172
|
* - `inject` starts the trigger. The stamp of its first act is the `fault` reference.
|
|
159
173
|
* - `heal` ends the fault, `hold` after the fault. A trigger that ends by itself has no heal.
|
|
160
174
|
* - `restore` brings the cell back to its steady state after the run.
|
|
161
175
|
*/
|
|
162
176
|
interface FaultPlan {
|
|
177
|
+
readonly prepare?: readonly Step[] | undefined;
|
|
163
178
|
readonly inject: readonly Step[];
|
|
164
179
|
readonly hold: Quantity | null;
|
|
165
180
|
readonly heal: readonly Step[];
|
|
@@ -169,6 +184,8 @@ interface FaultPlan {
|
|
|
169
184
|
export declare const POLICY = "lab-deny";
|
|
170
185
|
/** This service account is the account of the clients: their pods name no other account. */
|
|
171
186
|
export declare const CLIENT_ACCOUNT = "default";
|
|
187
|
+
/** This selector gives the ztunnel pods in istio-system: the label `app` of the chart of ztunnel. */
|
|
188
|
+
export declare const ZTUNNEL_PODS = "app=ztunnel";
|
|
172
189
|
/**
|
|
173
190
|
* This function gives the AuthorizationPolicy of the trigger `authorization-policy`. It denies each
|
|
174
191
|
* request to the server pods from the principal of the service account `account`. Istio gives a
|
|
@@ -176,6 +193,64 @@ export declare const CLIENT_ACCOUNT = "default";
|
|
|
176
193
|
* RBAC filter of the server sidecar reads the principal of the peer from its mTLS certificate.
|
|
177
194
|
*/
|
|
178
195
|
export declare const policyObject: (account: string) => Readonly<Record<string, unknown>>;
|
|
196
|
+
/** These are the names of the sysctls that the steps of a plan set. Each one is a sysctl of a network namespace. */
|
|
197
|
+
export declare const SYSCTL: {
|
|
198
|
+
readonly retries: "net.ipv4.tcp_retries2";
|
|
199
|
+
};
|
|
200
|
+
/**
|
|
201
|
+
* These are the values of those sysctls in a new network namespace of Linux v6.17. A restore puts
|
|
202
|
+
* them back. `tcp_retries2` is TCP_RETR2 (include/net/tcp.h, line 105, and net/ipv4/tcp_ipv4.c,
|
|
203
|
+
* line 3604).
|
|
204
|
+
*/
|
|
205
|
+
export declare const NETNS_DEFAULTS: {
|
|
206
|
+
readonly retries: "15";
|
|
207
|
+
};
|
|
208
|
+
/**
|
|
209
|
+
* These are the names of the middlebox in the filter table of a replica. One chain takes the
|
|
210
|
+
* segments from the peers, and one chain takes the segments to them. The table of xt_recent holds
|
|
211
|
+
* the time of the last segment of each peer.
|
|
212
|
+
*/
|
|
213
|
+
export declare const MIDDLEBOX: {
|
|
214
|
+
readonly input: "LAB-MBX-IN";
|
|
215
|
+
readonly output: "LAB-MBX-OUT";
|
|
216
|
+
readonly table: "LAB-MBX";
|
|
217
|
+
};
|
|
218
|
+
/** This time is between the stop of the calls and the fault of a quiet black hole. The last answers and their ACKs, at most 200 ms late, come in it. */
|
|
219
|
+
export declare const QUIET_LEAD: Quantity;
|
|
220
|
+
/** This time is between the close of the old channel of each client and the fault of a gap with `close`. The stream of the old channel ends in it. */
|
|
221
|
+
export declare const CLOSE_LEAD: Quantity;
|
|
222
|
+
/** This time is how long each client calls on its new channel at the fault of a gap with `close`, before it closes it. */
|
|
223
|
+
export declare const CHANNEL_USE: Quantity;
|
|
224
|
+
/**
|
|
225
|
+
* This function gives the command of the injector that sets one sysctl of its network namespace.
|
|
226
|
+
* Only a sysctl of the namespace (`net.`) and a whole number reach it.
|
|
227
|
+
*/
|
|
228
|
+
export declare const sysctlCommand: (key: string, value: string) => string[];
|
|
229
|
+
/**
|
|
230
|
+
* This function gives the commands of the injector that put a stateful middlebox in its network
|
|
231
|
+
* namespace, with each peer, on the local port `port`. With `idle` null, they remove it.
|
|
232
|
+
*
|
|
233
|
+
* The middlebox forgets a flow of the port after `idle` with no segment. Then it drops each later
|
|
234
|
+
* segment of it: the silent-drop form of the router of the harness. Conntrack stays as it is. The
|
|
235
|
+
* local leg from ztunnel to the app has no PING, and istio-cni needs its conntrack entry. The
|
|
236
|
+
* connmark of that entry sends each answer of the app back to ztunnel (cni/pkg/iptables/iptables.go
|
|
237
|
+
* of Istio 1.31.3, lines 172–178, 278–284 and 336–347).
|
|
238
|
+
*
|
|
239
|
+
* The match recent keeps a table in each network namespace (xt_recent.c of Linux v6.17). Its key is
|
|
240
|
+
* the address of the peer: the source of a segment from it, or the destination of a segment to it
|
|
241
|
+
* (lines 251–257). The chain of each direction has these rules, in sequence:
|
|
242
|
+
* - In the input chain only, a SYN sets the time of its peer and passes: a new flow.
|
|
243
|
+
* - A segment of a peer with a time in the last `idle` seconds passes, and it sets the time again
|
|
244
|
+
* (lines 298–321).
|
|
245
|
+
* - A segment of a peer with an older time is dropped, and the time stays old. Thus the flow stays forgotten.
|
|
246
|
+
* - A segment of a peer that the table does not hold sets its time and passes (lines 283–290). That
|
|
247
|
+
* is the flow that was open before the set.
|
|
248
|
+
*
|
|
249
|
+
* Each rule that passes a segment goes back to INPUT or OUTPUT (RETURN), thus the other rules of the
|
|
250
|
+
* namespace still act on it. The key is an address, not a flow. Thus a new SYN of a peer also refreshes an
|
|
251
|
+
* old flow of the peer. A cell of the middlebox opens no new flow in its gap.
|
|
252
|
+
*/
|
|
253
|
+
export declare const middleboxCommands: (peers: readonly string[], idle: Quantity | null, port: number) => string[][];
|
|
179
254
|
/** This function gives the fault plan of a cell. */
|
|
180
255
|
export declare const planOf: (cell: KindCell) => FaultPlan;
|
|
181
256
|
/** This function tells if a trigger stops a pod of the service with its grace: a deletion, an eviction, a scale-in or a rollout. */
|
|
@@ -268,8 +343,23 @@ export declare const serverCluster: (namespace: string) => string;
|
|
|
268
343
|
export declare const EDS_EVERY: Quantity;
|
|
269
344
|
/** This time is the interval of the LDS poll of each server sidecar, the same as the poll of EDS. */
|
|
270
345
|
export declare const LDS_EVERY: Quantity;
|
|
271
|
-
/**
|
|
346
|
+
/**
|
|
347
|
+
* This function tells if the watcher follows each ztunnel pod and its log for a cell: a cell in the
|
|
348
|
+
* flavor `ambient`. A cell of sidecar pods in that flavor needs the lines of the ztunnel pods too.
|
|
349
|
+
* They show the restart of ztunnel, which its pods do not see.
|
|
350
|
+
*/
|
|
272
351
|
export declare const followsZtunnel: (cell: Pick<KindCell, "mesh">) => boolean;
|
|
352
|
+
/**
|
|
353
|
+
* This function gives the arguments of kubectl that set the environment of ztunnel for a cell, or
|
|
354
|
+
* remove it (`undo`). The variables go in the sequence of their names.
|
|
355
|
+
*/
|
|
356
|
+
export declare const ztunnelEnvArgs: (env: Readonly<Record<string, string>>, undo: boolean) => string[];
|
|
357
|
+
/**
|
|
358
|
+
* This function sets the environment of ztunnel for a cell, or removes it (`undo`). Then it waits for
|
|
359
|
+
* the rollout of the DaemonSet, and until no old ztunnel pod is left. An old pod drains for its
|
|
360
|
+
* deadline after the rollout replaces it. Thus no run starts beside a ztunnel pod that is going.
|
|
361
|
+
*/
|
|
362
|
+
export declare const setZtunnelEnv: (cluster: Cluster, env: Readonly<Record<string, string>>, undo: boolean) => Promise<void>;
|
|
273
363
|
/** This function tells if the lab polls the LDS updates of the server sidecars of a cell: a policy in a sidecar mesh. */
|
|
274
364
|
export declare const pollsListeners: (cell: Pick<KindCell, "mesh" | "trigger">) => boolean;
|
|
275
365
|
//#endregion
|
|
@@ -279,8 +369,14 @@ interface Stamp {
|
|
|
279
369
|
readonly t0: number;
|
|
280
370
|
readonly t1: number;
|
|
281
371
|
}
|
|
282
|
-
/**
|
|
372
|
+
/**
|
|
373
|
+
* These kinds of kernel record stay in the raw record of a run. The lab also keeps each change of the
|
|
374
|
+
* state of a socket of the HBONE port (`isTunnelState`): the tunnels of ztunnel. It counts the other
|
|
375
|
+
* records and drops them.
|
|
376
|
+
*/
|
|
283
377
|
export declare const KEPT_KERNEL: ReadonlySet<string>;
|
|
378
|
+
/** This function tells if the lab keeps a kernel record of the prober. */
|
|
379
|
+
export declare const keptKernel: (record: Readonly<Record<string, unknown>>) => boolean;
|
|
284
380
|
/** An EDS spec is the cluster that the EDS pollers read, their interval, and each client pod with its node and a PID in it. */
|
|
285
381
|
interface EdsSpec {
|
|
286
382
|
readonly cluster: string;
|
|
@@ -347,6 +443,13 @@ interface KindLab {
|
|
|
347
443
|
* lines as a line `tables`: evidence of which rules matched.
|
|
348
444
|
*/
|
|
349
445
|
tables(node: string, pid: number, table: string): Promise<string>;
|
|
446
|
+
/**
|
|
447
|
+
* This method runs commands of the injector of the harness in the network namespace of a PID. Each
|
|
448
|
+
* command is a sysctl or a rule of iptables, in sequence. It stops at the first command that fails. Each word of
|
|
449
|
+
* a command is plain: letters, digits and `_ . , : = / + -`. The method adds the commands and their
|
|
450
|
+
* output to the lines as a line `act`, and gives the output.
|
|
451
|
+
*/
|
|
452
|
+
netns(node: string, pid: number, commands: ReadonlyArray<readonly string[]>): Promise<string>;
|
|
350
453
|
now(): Promise<number>;
|
|
351
454
|
pidOf(node: string, namespace: string, pod: string, container: string): Promise<number>;
|
|
352
455
|
netnsOf(node: string, pid: number): Promise<number>;
|
|
@@ -629,5 +732,5 @@ export declare const toolPath: (tool: Tool, key?: string, cache?: string) => str
|
|
|
629
732
|
*/
|
|
630
733
|
export declare const ensureTool: (tool: Tool, key?: string, cache?: string) => Promise<string>;
|
|
631
734
|
//#endregion
|
|
632
|
-
export { type Band, type BandV1, CLIENT, type Cluster, type ClusterHosts, type ClusterManifest, type Credentials, type Declaration, type Deleted, type DeletionWindow, type EdsSpec, Endpoint, type EnvironmentManifest, FORMAT, FORMAT_V1, type FaultPlan, 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 KubeletProbe, LAST_SLACK, LOG_LABEL, type LdsSpec, Line, type ListenerCounts, type LoadSample, type Mesh, type MeshFlavor, type MeshImages, type MeshMode, NODE_IMAGES, type NodeImage, PORT, type Parts, 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, SliceLine, SocketLine, type Stack, type Stamp, type Step, type Target, type Template, type TimeSpread, type Tool, type Trigger, type TriggerKind, type TriggerV1, type Verdicts, type WindowPrediction, type Workload, backendsAt, bandOf, byClients, byNode, calibrationOf, cellsTable, checkRun, cidrOverlap, cidrRange, deletionOf, deletionsOf, dropOf, emptyOf, factsOf, failuresOf, goDuration, intakeOf, judge, judgeKind, kernelCounts, kindCellRecordSchema, kindCellRecordV1Schema, kindConfig, kubeProxyPatch, medianInterval, medianText, middle, nodeNames, observationAfter, observationEnd, outcomesOf, podsAt, podsOf, predictionText, propagationOf, propagationSource, quantileOf, readRecord, recordsOf, referenceOf, requestsOf, restartsAt, reusesReset, rulesOf, scenario, scenarioProblems, seconds, secondsOf, showBand, signalOf, signalsOf, sliceDropOf, sliceEmptyOf, slicesOf, socketsOf, stoppingOf, timeSpread, transitionOf, unitOf, updatesOf, upgrade, upgradeCell };
|
|
735
|
+
export { type Band, type BandV1, CLIENT, type Cluster, type ClusterHosts, type ClusterManifest, type Credentials, type Declaration, type Deleted, type DeletionWindow, type EdsSpec, Endpoint, type EnvironmentManifest, FORMAT, FORMAT_V1, type FaultPlan, 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 KubeletProbe, LAST_SLACK, LOG_LABEL, type LdsSpec, Line, type ListenerCounts, type LoadSample, type Mesh, type MeshFlavor, type MeshImages, type MeshMode, NODE_IMAGES, type NodeImage, PORT, type Parts, 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, 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, type Verdicts, type WindowPrediction, type Workload, ZtunnelPodLine, backendsAt, bandOf, byClients, byNode, calibrationOf, cellsTable, checkRun, cidrOverlap, cidrRange, deletionOf, deletionsOf, dropOf, emptyOf, factsOf, failuresOf, goDuration, intakeOf, isTunnelState, judge, judgeKind, kernelCounts, kindCellRecordSchema, kindCellRecordV1Schema, kindConfig, kubeProxyPatch, medianInterval, medianText, middle, nodeNames, observationAfter, observationEnd, outcomesOf, podsAt, podsOf, predictionText, propagationOf, propagationSource, quantileOf, readRecord, recordsOf, referenceOf, requestsOf, restartOf, restartsAt, reusesReset, rulesOf, scenario, scenarioProblems, seconds, secondsOf, showBand, signalOf, signalsOf, sliceDropOf, sliceEmptyOf, slicesOf, socketsOf, stoppingOf, timeSpread, transitionOf, tunnelsOf, unitOf, updatesOf, upgrade, upgradeCell, ztunnelPodsOf, ztunnelReplaced };
|
|
633
736
|
//# sourceMappingURL=index.d.ts.map
|