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.
Files changed (40) hide show
  1. package/dist/cli.d.ts +3 -0
  2. package/dist/cli.js +1 -1
  3. package/dist/controller.js +1 -1
  4. package/dist/lib/assets/deploy.d.ts +3 -0
  5. package/dist/lib/assets/destroy.d.ts +2 -0
  6. package/dist/lib/assets/helm.d.ts +5 -0
  7. package/dist/lib/assets/index.d.ts +25 -0
  8. package/dist/lib/assets/loader.d.ts +8 -0
  9. package/dist/lib/assets/networking.d.ts +7 -0
  10. package/dist/lib/assets/pods.d.ts +126 -0
  11. package/dist/lib/assets/rbac.d.ts +14 -0
  12. package/dist/lib/assets/store.d.ts +7 -0
  13. package/dist/lib/assets/webhooks.d.ts +6 -0
  14. package/dist/lib/assets/yaml.d.ts +6 -0
  15. package/dist/lib/capability.d.ts +66 -0
  16. package/dist/lib/controller/index.d.ts +10 -0
  17. package/dist/lib/controller/store.d.ts +7 -0
  18. package/dist/lib/errors.d.ts +12 -0
  19. package/dist/lib/filter.d.ts +11 -0
  20. package/dist/lib/helpers.d.ts +34 -0
  21. package/dist/lib/included-files.d.ts +2 -0
  22. package/dist/lib/k8s.d.ts +132 -0
  23. package/dist/lib/logger.d.ts +3 -0
  24. package/dist/lib/metrics.d.ts +39 -0
  25. package/dist/lib/module.d.ts +62 -0
  26. package/dist/lib/mutate-processor.d.ts +5 -0
  27. package/dist/lib/mutate-request.d.ts +79 -0
  28. package/dist/lib/queue.d.ts +19 -0
  29. package/dist/lib/schedule.d.ts +76 -0
  30. package/dist/lib/storage.d.ts +83 -0
  31. package/dist/lib/tls.d.ts +18 -0
  32. package/dist/lib/types.d.ts +192 -0
  33. package/dist/lib/utils.d.ts +23 -0
  34. package/dist/lib/validate-processor.d.ts +4 -0
  35. package/dist/lib/validate-request.d.ts +55 -0
  36. package/dist/lib/watch-processor.d.ts +10 -0
  37. package/dist/lib.d.ts +11 -0
  38. package/dist/runtime/controller.d.ts +3 -0
  39. package/dist/sdk/sdk.d.ts +38 -0
  40. 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,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=controller.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.0",
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.0",
40
+ "pino-pretty": "11.2.1",
41
41
  "prom-client": "15.1.2",
42
42
  "ramda": "0.30.1"
43
43
  },