@dmgnr/kuber 1.0.0 → 1.1.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/README.md +67 -0
- package/dist/index.js +95 -95
- package/package.json +14 -11
- package/schema/docker.d.ts +2595 -0
- package/types.d.ts +72 -0
package/types.d.ts
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { ComposeSpecification } from "./schema/docker.js";
|
|
2
|
+
|
|
3
|
+
export type { ComposeSpecification } from "./schema/docker.js";
|
|
4
|
+
|
|
5
|
+
export type MaybePromise<T> = T | Promise<T>;
|
|
6
|
+
|
|
7
|
+
export interface KuberHookContext {
|
|
8
|
+
cwd: string;
|
|
9
|
+
project: string;
|
|
10
|
+
composeFile: string;
|
|
11
|
+
configFile?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface KuberBuildResult {
|
|
15
|
+
built: string[];
|
|
16
|
+
changed: string[];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface KuberResource {
|
|
20
|
+
apiVersion?: string;
|
|
21
|
+
kind?: string;
|
|
22
|
+
metadata?: {
|
|
23
|
+
name?: string;
|
|
24
|
+
namespace?: string;
|
|
25
|
+
labels?: Record<string, string>;
|
|
26
|
+
annotations?: Record<string, string>;
|
|
27
|
+
};
|
|
28
|
+
[key: string]: unknown;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface KuberBuildersConfig {
|
|
32
|
+
amd64?: string;
|
|
33
|
+
arm64?: string;
|
|
34
|
+
remoteRoot?: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface KuberConfig {
|
|
38
|
+
/** Kubernetes namespace/project name. Defaults to the working directory name. */
|
|
39
|
+
project?: string;
|
|
40
|
+
/** Compose file path, resolved relative to the working directory. */
|
|
41
|
+
composeFile?: string;
|
|
42
|
+
/** Container registry hostname or path, without a trailing slash. */
|
|
43
|
+
registry?: string;
|
|
44
|
+
builders?: KuberBuildersConfig;
|
|
45
|
+
/** Maximum time to wait for each deployment rollout. */
|
|
46
|
+
rolloutTimeoutMs?: number;
|
|
47
|
+
|
|
48
|
+
/** Runs once after the Compose file is parsed and validated. */
|
|
49
|
+
compose?(
|
|
50
|
+
compose: ComposeSpecification,
|
|
51
|
+
context: KuberHookContext,
|
|
52
|
+
): MaybePromise<void>;
|
|
53
|
+
/** Runs before build eligibility is evaluated when builds are enabled. */
|
|
54
|
+
preBuild?(
|
|
55
|
+
compose: ComposeSpecification,
|
|
56
|
+
context: KuberHookContext,
|
|
57
|
+
): MaybePromise<void>;
|
|
58
|
+
postBuild?(
|
|
59
|
+
result: KuberBuildResult,
|
|
60
|
+
context: KuberHookContext,
|
|
61
|
+
): MaybePromise<void>;
|
|
62
|
+
/** Runs after manifest rendering and before reconciliation planning. */
|
|
63
|
+
postRender?(
|
|
64
|
+
resources: KuberResource[],
|
|
65
|
+
context: KuberHookContext,
|
|
66
|
+
): MaybePromise<void>;
|
|
67
|
+
/** Runs after all desired resources have been applied. */
|
|
68
|
+
postApply?(
|
|
69
|
+
resources: KuberResource[],
|
|
70
|
+
context: KuberHookContext,
|
|
71
|
+
): MaybePromise<void>;
|
|
72
|
+
}
|