pepr 0.37.0 → 0.37.2
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/dist/cli/init/templates.d.ts +2 -3
- package/dist/cli/init/templates.d.ts.map +1 -1
- package/dist/cli/types.d.ts +3 -0
- package/dist/cli/types.d.ts.map +1 -0
- package/dist/cli.js +4 -3
- package/dist/controller.js +3 -2
- package/dist/lib/adjudicators.d.ts.map +1 -1
- package/dist/lib/filter.d.ts +1 -1
- package/dist/lib/filter.d.ts.map +1 -1
- package/dist/lib/mutate-processor.d.ts.map +1 -1
- package/dist/lib/types.d.ts +0 -2
- package/dist/lib/types.d.ts.map +1 -1
- package/dist/lib/validate-processor.d.ts.map +1 -1
- package/dist/lib.js +10 -4
- package/dist/lib.js.map +2 -2
- package/package.json +5 -6
- package/src/cli/init/index.ts +1 -1
- package/src/cli/init/templates.ts +1 -1
- package/src/cli/types.ts +3 -0
- package/src/fixtures/data/create-pod.json +2 -1
- package/src/fixtures/data/delete-pod.json +2 -1
- package/src/lib/adjudicators.test.ts +4 -0
- package/src/lib/adjudicators.ts +2 -0
- package/src/lib/filter.test.ts +82 -45
- package/src/lib/filter.ts +103 -18
- package/src/lib/mutate-processor.ts +3 -1
- package/src/lib/types.ts +0 -3
- package/src/lib/validate-processor.ts +3 -1
|
@@ -50,7 +50,9 @@ export async function mutateProcessor(
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
// Continue to the next action without doing anything if this one should be skipped
|
|
53
|
-
|
|
53
|
+
const shouldSkip = shouldSkipRequest(action, req, namespaces, config?.alwaysIgnore?.namespaces);
|
|
54
|
+
if (shouldSkip !== "") {
|
|
55
|
+
Log.debug(shouldSkip);
|
|
54
56
|
continue;
|
|
55
57
|
}
|
|
56
58
|
|
package/src/lib/types.ts
CHANGED
|
@@ -7,7 +7,6 @@ import { WatchPhase } from "kubernetes-fluent-client/dist/fluent/types";
|
|
|
7
7
|
|
|
8
8
|
import { PeprMutateRequest } from "./mutate-request";
|
|
9
9
|
import { PeprValidateRequest } from "./validate-request";
|
|
10
|
-
import { Answers } from "prompts";
|
|
11
10
|
|
|
12
11
|
import { Logger } from "pino";
|
|
13
12
|
|
|
@@ -285,8 +284,6 @@ export type FinalizeActionChain<T extends GenericClass> = {
|
|
|
285
284
|
Finalize: (action: FinalizeAction<T, InstanceType<T>>) => void;
|
|
286
285
|
};
|
|
287
286
|
|
|
288
|
-
export type InitOptions = Answers<"name" | "description" | "errorBehavior">;
|
|
289
|
-
|
|
290
287
|
/**
|
|
291
288
|
* A Kubernetes admission request to be processed by a capability.
|
|
292
289
|
*/
|
|
@@ -44,7 +44,9 @@ export async function validateProcessor(
|
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
// Continue to the next action without doing anything if this one should be skipped
|
|
47
|
-
|
|
47
|
+
const shouldSkip = shouldSkipRequest(action, req, namespaces, config?.alwaysIgnore?.namespaces);
|
|
48
|
+
if (shouldSkip !== "") {
|
|
49
|
+
Log.debug(shouldSkip);
|
|
48
50
|
continue;
|
|
49
51
|
}
|
|
50
52
|
|