@cyc-seattle/platform 1.18.0 → 1.19.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 CHANGED
@@ -36,9 +36,9 @@ app owns. The apps that run on it live in their own repos, such as
36
36
  - `ScheduledJob` runs a CronJob on `schedule`, in `America/Los_Angeles` unless `timeZone` says
37
37
  otherwise. A run never overlaps the one before it, gets an hour, and doesn't retry, by default.
38
38
  - All three run non-root with a read-only root filesystem, no capabilities, and no service account
39
- token, on Spot pods in dev only. Their limits equal their requests. Their pods get no IAM; grant
40
- roles to `member`, a Workload Identity principal, or set `serviceAccountAnnotations` to run as a
41
- Google service account.
39
+ token, on Spot pods in dev only. Their limits equal their requests, unless `limits` raises one,
40
+ such as CPU to burst. Their pods get no IAM; grant roles to `member`, a Workload Identity
41
+ principal, or set `serviceAccountAnnotations` to run as a Google service account.
42
42
  - `enableService` enables a Google Cloud API.
43
43
 
44
44
  `mise run build` builds it into `dist/`, which is all it publishes. `.github/workflows/release.yml`
@@ -27,11 +27,19 @@ export interface PodArgs {
27
27
  image: pulumi.Input<string>;
28
28
  command?: string[];
29
29
  args?: string[];
30
- /** The container's requests, which are also its limits. */
30
+ /** The container's requests. Autopilot bills a pod by them. */
31
31
  requests: {
32
32
  cpu: pulumi.Input<string>;
33
33
  memory: pulumi.Input<string>;
34
34
  };
35
+ /**
36
+ * The container's limits, each defaulting to its request. A CPU limit above the request lets the
37
+ * pod burst into a node's spare CPU. A memory limit above it risks an OOM kill when the node is full.
38
+ */
39
+ limits?: {
40
+ cpu?: pulumi.Input<string>;
41
+ memory?: pulumi.Input<string>;
42
+ };
35
43
  env?: pulumi.Input<EnvVar>[];
36
44
  envFrom?: pulumi.Input<EnvFromSource>[];
37
45
  volumes?: WorkloadVolume[];
package/dist/workload.js CHANGED
@@ -53,7 +53,13 @@ export function podSpec(name, args, serviceAccountName, container = {}) {
53
53
  ...(args.args && { args: args.args }),
54
54
  ...container,
55
55
  // A LimitRange's default limit could otherwise sit below the request, which the API refuses.
56
- resources: { requests: args.requests, limits: args.requests },
56
+ resources: {
57
+ requests: args.requests,
58
+ limits: {
59
+ cpu: args.limits?.cpu ?? args.requests.cpu,
60
+ memory: args.limits?.memory ?? args.requests.memory,
61
+ },
62
+ },
57
63
  ...(args.env && { env: args.env }),
58
64
  ...(args.envFrom && { envFrom: args.envFrom }),
59
65
  ...(volumes.length > 0 && {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyc-seattle/platform",
3
- "version": "1.18.0",
3
+ "version": "1.19.0",
4
4
  "description": "Pulumi components for CYC's shared Google Cloud platform: WebService, the platform outputs reader, and the stacks that build the platform",
5
5
  "author": "CYC Community Sailing Center",
6
6
  "license": "Apache-2.0",
@@ -64,6 +64,10 @@
64
64
  },
65
65
  "devDependencies": {
66
66
  "@amiceli/vitest-cucumber": "7.0.0",
67
+ "@commander-js/extra-typings": "^13.1.0",
68
+ "@cyc-seattle/clubspot-sdk": "^0.3.0",
69
+ "@cyc-seattle/commodore": "^0.1.0",
70
+ "@cyc-seattle/gsuite-sdk": "^0.3.0",
67
71
  "@cyc-seattle/ts-config": "^0.1.2",
68
72
  "@electric-sql/pglite": "0.5.13",
69
73
  "@pulumi/command": "1.2.1",
@@ -75,11 +79,15 @@
75
79
  "@pulumi/random": "4.21.4",
76
80
  "@types/js-yaml": "4.0.9",
77
81
  "@types/node": "^22.19.1",
82
+ "@types/parse": "^3.0.9",
83
+ "esbuild": "0.28.2",
78
84
  "eslint": "^9.39.5",
79
85
  "google-auth-library": "^11.3.0",
86
+ "googleapis": "^144.0.0",
80
87
  "js-yaml": "^5.4.3",
81
88
  "prettier": "^3.9.10",
82
89
  "typescript": "~5.9.3",
83
- "vitest": "^5.0.0"
90
+ "vitest": "^5.0.0",
91
+ "winston": "^3.18.3"
84
92
  }
85
93
  }