pepr 0.32.0 → 0.32.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.d.ts +3 -0
- package/dist/cli.js +1 -1
- package/dist/controller.js +1 -1
- package/dist/lib/assets/deploy.d.ts +3 -0
- package/dist/lib/assets/destroy.d.ts +2 -0
- package/dist/lib/assets/helm.d.ts +5 -0
- package/dist/lib/assets/index.d.ts +25 -0
- package/dist/lib/assets/loader.d.ts +8 -0
- package/dist/lib/assets/networking.d.ts +7 -0
- package/dist/lib/assets/pods.d.ts +126 -0
- package/dist/lib/assets/rbac.d.ts +14 -0
- package/dist/lib/assets/store.d.ts +7 -0
- package/dist/lib/assets/webhooks.d.ts +6 -0
- package/dist/lib/assets/yaml.d.ts +6 -0
- package/dist/lib/capability.d.ts +66 -0
- package/dist/lib/controller/index.d.ts +10 -0
- package/dist/lib/controller/store.d.ts +7 -0
- package/dist/lib/errors.d.ts +12 -0
- package/dist/lib/filter.d.ts +11 -0
- package/dist/lib/helpers.d.ts +34 -0
- package/dist/lib/included-files.d.ts +2 -0
- package/dist/lib/k8s.d.ts +132 -0
- package/dist/lib/logger.d.ts +3 -0
- package/dist/lib/metrics.d.ts +39 -0
- package/dist/lib/module.d.ts +62 -0
- package/dist/lib/mutate-processor.d.ts +5 -0
- package/dist/lib/mutate-request.d.ts +79 -0
- package/dist/lib/queue.d.ts +19 -0
- package/dist/lib/schedule.d.ts +76 -0
- package/dist/lib/storage.d.ts +83 -0
- package/dist/lib/tls.d.ts +18 -0
- package/dist/lib/types.d.ts +192 -0
- package/dist/lib/utils.d.ts +23 -0
- package/dist/lib/validate-processor.d.ts +4 -0
- package/dist/lib/validate-request.d.ts +55 -0
- package/dist/lib/watch-processor.d.ts +10 -0
- package/dist/lib.d.ts +11 -0
- package/dist/runtime/controller.d.ts +3 -0
- package/dist/sdk/sdk.d.ts +38 -0
- package/package.json +2 -2
package/dist/lib.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { K8s, RegisterKind, kind as a, fetch, fetchStatus, kind } from "kubernetes-fluent-client";
|
|
2
|
+
import * as R from "ramda";
|
|
3
|
+
import { Capability } from "./lib/capability";
|
|
4
|
+
import Log from "./lib/logger";
|
|
5
|
+
import { PeprModule } from "./lib/module";
|
|
6
|
+
import { PeprMutateRequest } from "./lib/mutate-request";
|
|
7
|
+
import * as PeprUtils from "./lib/utils";
|
|
8
|
+
import { PeprValidateRequest } from "./lib/validate-request";
|
|
9
|
+
import * as sdk from "./sdk/sdk";
|
|
10
|
+
export { Capability, K8s, Log, PeprModule, PeprMutateRequest, PeprUtils, PeprValidateRequest, R, RegisterKind, a, fetch, fetchStatus, kind, sdk, };
|
|
11
|
+
//# sourceMappingURL=lib.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { PeprValidateRequest } from "../lib/validate-request";
|
|
2
|
+
import { PeprMutateRequest } from "../lib/mutate-request";
|
|
3
|
+
import { a } from "../lib";
|
|
4
|
+
import { V1OwnerReference } from "@kubernetes/client-node";
|
|
5
|
+
import { GenericKind } from "kubernetes-fluent-client";
|
|
6
|
+
import { kind } from "kubernetes-fluent-client";
|
|
7
|
+
/**
|
|
8
|
+
* Returns all containers in a pod
|
|
9
|
+
* @param request the request/pod to get the containers from
|
|
10
|
+
* @param containerType the type of container to get
|
|
11
|
+
* @returns the list of containers in the pod
|
|
12
|
+
*/
|
|
13
|
+
export declare function containers(request: PeprValidateRequest<a.Pod> | PeprMutateRequest<a.Pod>, containerType?: "containers" | "initContainers" | "ephemeralContainers"): import("@kubernetes/client-node").V1Container[];
|
|
14
|
+
/**
|
|
15
|
+
* Write a K8s event for a CRD
|
|
16
|
+
*
|
|
17
|
+
* @param cr The custom resource to write the event for
|
|
18
|
+
* @param event The event to write, should contain a human-readable message for the event
|
|
19
|
+
* @param eventType The type of event to write, for example "Warning"
|
|
20
|
+
* @param eventReason The reason for the event, for example "ReconciliationFailed"
|
|
21
|
+
* @param reportingComponent The component that is reporting the event, for example "uds.dev/operator"
|
|
22
|
+
* @param reportingInstance The instance of the component that is reporting the event, for example process.env.HOSTNAME
|
|
23
|
+
*/
|
|
24
|
+
export declare function writeEvent(cr: GenericKind, event: Partial<kind.CoreEvent>, eventType: string, eventReason: string, reportingComponent: string, reportingInstance: string): Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* Get the owner reference for a custom resource
|
|
27
|
+
* @param cr the custom resource to get the owner reference for
|
|
28
|
+
* @returns the owner reference for the custom resource
|
|
29
|
+
*/
|
|
30
|
+
export declare function getOwnerRefFrom(cr: GenericKind): V1OwnerReference[];
|
|
31
|
+
/**
|
|
32
|
+
* Sanitize a resource name to make it a valid Kubernetes resource name.
|
|
33
|
+
*
|
|
34
|
+
* @param name the name of the resource to sanitize
|
|
35
|
+
* @returns the sanitized resource name
|
|
36
|
+
*/
|
|
37
|
+
export declare function sanitizeResourceName(name: string): string;
|
|
38
|
+
//# sourceMappingURL=sdk.d.ts.map
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"engines": {
|
|
10
10
|
"node": ">=18.0.0"
|
|
11
11
|
},
|
|
12
|
-
"version": "0.32.
|
|
12
|
+
"version": "0.32.2",
|
|
13
13
|
"main": "dist/lib.js",
|
|
14
14
|
"types": "dist/lib.d.ts",
|
|
15
15
|
"scripts": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"fast-json-patch": "3.1.1",
|
|
38
38
|
"kubernetes-fluent-client": "2.6.1",
|
|
39
39
|
"pino": "9.2.0",
|
|
40
|
-
"pino-pretty": "11.2.
|
|
40
|
+
"pino-pretty": "11.2.1",
|
|
41
41
|
"prom-client": "15.1.2",
|
|
42
42
|
"ramda": "0.30.1"
|
|
43
43
|
},
|