@catladder/pipeline 1.98.2 → 1.99.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.
@@ -0,0 +1,49 @@
1
+ import type { Config } from "../src";
2
+ import { createAllPipelines } from "./__utils__/helpers";
3
+ const config: Config = {
4
+ appName: "test-app",
5
+ customerName: "pan",
6
+ components: {
7
+ api: {
8
+ dir: "api",
9
+ build: {
10
+ type: "node",
11
+ },
12
+ deploy: {
13
+ type: "kubernetes",
14
+ cluster: {
15
+ name: "some-cluster-name",
16
+ region: "europe-west6",
17
+ projectId: "some-project-id",
18
+ type: "gcloud",
19
+ domainCanonical: "panter.cloud",
20
+ },
21
+
22
+ values: {
23
+ application: {
24
+ command: "node main.js",
25
+ },
26
+ mongodb: {
27
+ enabled: true,
28
+ architecture: "replicaset",
29
+ persistence: {
30
+ storageClass: "premium-rwo",
31
+ },
32
+ tolerations: [
33
+ {
34
+ key: "mongodb",
35
+ operator: "Equal",
36
+ value: "true",
37
+ effect: "NoSchedule",
38
+ },
39
+ ],
40
+ },
41
+ },
42
+ },
43
+ },
44
+ },
45
+ };
46
+
47
+ it("matches snapshot", async () => {
48
+ expect(await createAllPipelines(config)).toMatchSnapshot();
49
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@catladder/pipeline",
3
- "version": "1.98.2",
3
+ "version": "1.99.0",
4
4
  "scripts": {
5
5
  "build:tsc": "yarn tsc",
6
6
  "build": "yarn build:compile && yarn build:inline-variables && yarn build:bundle",
@@ -98,6 +98,19 @@ export type KubernetesWorkerDef = {
98
98
  };
99
99
  };
100
100
 
101
+ type KubernetesTolerationExists = {
102
+ operator: "Exists";
103
+ };
104
+
105
+ type KubernetesTolerationEqual = {
106
+ operator: "Equal";
107
+ value: string;
108
+ };
109
+
110
+ export type KubernetesToleration = {
111
+ key: string;
112
+ effect: "NoSchedule" | "PreferNoSchedule" | "NoExecute";
113
+ } & (KubernetesTolerationEqual | KubernetesTolerationExists);
101
114
  export type DeployConfigMongodbBase = {
102
115
  enabled?: boolean;
103
116
  dbName?: string;
@@ -113,6 +126,7 @@ export type DeployConfigMongodbBase = {
113
126
  size?: string;
114
127
  };
115
128
  resources?: KubernetesResourcesDef;
129
+ tolerations?: KubernetesToleration[];
116
130
  };
117
131
 
118
132
  export type DeployConfigMongodbStandalone = {