[H1][PULUMI-K8S-VALIDATOR]
Dictum: Validation is read-only analysis -- never modify files.
Analyze infrastructure code, propose improvements. Does NOT modify files.
Provider: current stable @pulumi/kubernetes | K8s: 1.32-1.35 | Canonical: infrastructure/src/deploy.ts (207 LOC)
| Use this skill |
Use OTHER skill |
| Validate/audit Pulumi K8s code |
pulumi-k8s-generator: Create new resources |
| Type-check resource definitions |
k8s-debug: Debug deployed resources |
| Security + production readiness review |
dockerfile-validator: Container image builds |
Tasks:
- Run TypeScript type check:
pnpm exec nx run infrastructure:typecheck
- Run
pulumi preview --diff (flags: --expect-no-changes, --target <urn>, --refresh, --stack <name>)
- Read infrastructure source; check security posture against
references/validation_checklist.md
- Read infrastructure source; check production readiness against
references/validation_checklist.md
- Generate report per format below
[1][STAGE_DETAILS]
Dictum: Each stage catches a distinct class of defect.
Guidance:
TypeScript - Record each error with file, line, and category. Common: wrong field name, missing required field, type mismatch, missing module.
Preview - Interpret diff symbols (+ create, - delete, ~ update, +- replace, -+ replace with downtime). Skip on connection/stack errors; continue to Stage 3.
Security - deploy.ts findings: _Ops.secret() wraps all sensitive values (PASS), no pod security context on compute (WARN), no NetworkPolicy (WARN).
Readiness - deploy.ts findings: all probes configured (PASS), resource limits set (PASS), no PDB (WARN), no anti-affinity (WARN), :latest on observe images (WARN), no topology spread (INFO).
Best-Practices:
- Stages 1 + 3 run in parallel (compiler + source analysis). Stage 2 after Stage 1 passes. Stage 5 after all.
- Never modify files, offer to apply fixes, or prompt user for changes.
- Always load both
references/ files when issues are found.
[2][REPORT_FORMAT]
Dictum: Structured output enables actionable triage.
Summary table:
| Stage |
Status |
Issues |
| 1. TypeScript |
[PASS] |
0 errors |
| 2. Preview |
[PASS] |
3 resources planned |
| 3. Security |
[WARN] |
Missing securityContext on 2 containers |
| 4. Readiness |
[WARN] |
Missing probes on 1 deployment |
Severity classification:
| Severity |
Checks |
[ERROR] |
TS errors, preview failures, running as root, privileged, host namespace, missing requests, missing probes, secrets in config |
[WARN] |
Missing security context, no limits, no PDB, no NetworkPolicy, :latest image, no anti-affinity, no ServiceAccount |
[INFO] |
Missing startup probe, topology spread, HPA tuning, Gateway API migration, ValidatingAdmissionPolicy |
Per-issue detail: file:line, before/after TypeScript, reason, complexity [Simple]/[Medium]/[Complex].
Final summary: project, stack, status, error/warn/info counts, proposed change count, next steps.
1---2name: pulumi-k8s-validator3description: Validates Pulumi Kubernetes TypeScript infrastructure via type checks, preview diffs, security audits, and production readiness. Use when auditing existing .ts files with @pulumi/kubernetes resources. Does NOT generate new resources.4---5
6# [H1][PULUMI-K8S-VALIDATOR]
7>**Dictum:** *Validation is read-only analysis -- never modify files.*
8
9<br>
10
11Analyze infrastructure code, propose improvements. Does NOT modify files.
12
13**Provider:** current stable `@pulumi/kubernetes` | **K8s:** 1.32-1.35 | **Canonical:** `infrastructure/src/deploy.ts` (207 LOC)
14
15| Use this skill | Use OTHER skill |
16| -------------------------------------- | ---------------------------------------------- |
17| Validate/audit Pulumi K8s code | `pulumi-k8s-generator`: Create new resources |
18| Type-check resource definitions | `k8s-debug`: Debug deployed resources |
19| Security + production readiness review | `dockerfile-validator`: Container image builds |
20
21**Tasks:**
221. Run TypeScript type check: `pnpm exec nx run infrastructure:typecheck`
232. Run `pulumi preview --diff` (flags: `--expect-no-changes`, `--target <urn>`, `--refresh`, `--stack <name>`)
243. Read infrastructure source; check security posture against `references/validation_checklist.md`
254. Read infrastructure source; check production readiness against `references/validation_checklist.md`
265. Generate report per format below
27
28---
29## [1][STAGE_DETAILS]
30>**Dictum:** *Each stage catches a distinct class of defect.*
31
32<br>
33
34**Guidance:**
35- `TypeScript` - Record each error with file, line, and category. Common: wrong field name, missing required field, type mismatch, missing module.
36- `Preview` - Interpret diff symbols (`+` create, `-` delete, `~` update, `+-` replace, `-+` replace with downtime). Skip on connection/stack errors; continue to Stage 3.
37- `Security` - deploy.ts findings: `_Ops.secret()` wraps all sensitive values (PASS), no pod security context on compute (WARN), no NetworkPolicy (WARN).
38- `Readiness` - deploy.ts findings: all probes configured (PASS), resource limits set (PASS), no PDB (WARN), no anti-affinity (WARN), `:latest` on observe images (WARN), no topology spread (INFO).
39
40**Best-Practices:**
41- Stages 1 + 3 run in parallel (compiler + source analysis). Stage 2 after Stage 1 passes. Stage 5 after all.
42- Never modify files, offer to apply fixes, or prompt user for changes.
43- Always load both `references/` files when issues are found.
44
45---
46## [2][REPORT_FORMAT]
47>**Dictum:** *Structured output enables actionable triage.*
48
49<br>
50
51**Summary table:**
52
53| Stage | Status | Issues |
54| ------------- | ------ | --------------------------------------- |
55| 1. TypeScript | [PASS] | 0 errors |
56| 2. Preview | [PASS] | 3 resources planned |
57| 3. Security | [WARN] | Missing securityContext on 2 containers |
58| 4. Readiness | [WARN] | Missing probes on 1 deployment |
59
60**Severity classification:**
61
62| Severity | Checks |
63| --------- | ----------------------------------------------------------------------------------------------------------------------------- |
64| `[ERROR]` | TS errors, preview failures, running as root, privileged, host namespace, missing requests, missing probes, secrets in config |
65| `[WARN]` | Missing security context, no limits, no PDB, no NetworkPolicy, `:latest` image, no anti-affinity, no ServiceAccount |
66| `[INFO]` | Missing startup probe, topology spread, HPA tuning, Gateway API migration, ValidatingAdmissionPolicy |
67
68**Per-issue detail:** file:line, before/after TypeScript, reason, complexity `[Simple]`/`[Medium]`/`[Complex]`.
69
70**Final summary:** project, stack, status, error/warn/info counts, proposed change count, next steps.