@pattform/api-kit 3.4.0 → 3.5.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.
@@ -22,6 +22,8 @@ export interface ContainerComponentArgs {
22
22
  concurrency?: number;
23
23
  readinessPath?: pulumi.Input<string>;
24
24
  livenessPath?: pulumi.Input<string>;
25
+ startupCpuBoost?: pulumi.Input<boolean>;
26
+ startupFailureThreshold?: pulumi.Input<number>;
25
27
  probePort?: pulumi.Input<number>;
26
28
  gcpProject?: pulumi.Input<string>;
27
29
  gcpRegion?: pulumi.Input<string>;
@@ -9,7 +9,7 @@ const gcp = require("@pulumi/gcp");
9
9
  */
10
10
  class ContainerComponent extends pulumi.ComponentResource {
11
11
  constructor(name, args, opts) {
12
- var _a, _b, _c, _d, _e, _f, _g;
12
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
13
13
  super("custom:pattform:ContainerComponent", name, args, opts);
14
14
  // Project, region and image digest come from args when given (a
15
15
  // capability has no stack config of its own), else from config as
@@ -80,6 +80,10 @@ class ContainerComponent extends pulumi.ComponentResource {
80
80
  memory: args.memory,
81
81
  cpu: args.cpu.toString(),
82
82
  },
83
+ // Extra CPU only while an instance starts: a JVM
84
+ // Spring Boot app otherwise takes 12-16s on 1 vCPU.
85
+ // Billed for the boosted seconds only, no idle cost.
86
+ startupCpuBoost: (_h = args.startupCpuBoost) !== null && _h !== void 0 ? _h : true,
83
87
  },
84
88
  envs: [
85
89
  ...(args.envVars ? Object.entries(args.envVars).map(([key, value]) => ({
@@ -108,7 +112,9 @@ class ContainerComponent extends pulumi.ComponentResource {
108
112
  initialDelaySeconds: 2,
109
113
  periodSeconds: 5,
110
114
  timeoutSeconds: 1,
111
- failureThreshold: 3,
115
+ // A ceiling, not a delay: up to ~62s for a JVM cold
116
+ // start. A native image still passes on the first try.
117
+ failureThreshold: (_j = args.startupFailureThreshold) !== null && _j !== void 0 ? _j : 12,
112
118
  }
113
119
  }
114
120
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pattform/api-kit",
3
- "version": "3.4.0",
3
+ "version": "3.5.0",
4
4
  "description": "Pulumi infra library for building and deploying an API",
5
5
  "author": "Pattform <contact@pattform.io>",
6
6
  "license": "SEE LICENSE IN LICENSE",