@synapta/skills 0.1.1 → 0.1.2
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/dist/index.js +11 -4
- package/package.json +2 -3
- package/skills/ATTRIBUTION.md +80 -0
- package/skills/accessibility-audit/SKILL.md +325 -0
- package/skills/accessibility-audit/reference/wcag-checklist.md +103 -0
- package/skills/apns-notifier/SKILL.md +86 -0
- package/skills/approval-policy-enforcer/SKILL.md +66 -0
- package/skills/apps-sdk-builder/LICENSE.txt +201 -0
- package/skills/apps-sdk-builder/SKILL.md +328 -0
- package/skills/apps-sdk-builder/agents/openai.yaml +13 -0
- package/skills/apps-sdk-builder/references/app-archetypes.md +132 -0
- package/skills/apps-sdk-builder/references/apps-sdk-docs-workflow.md +135 -0
- package/skills/apps-sdk-builder/references/interactive-state-sync-patterns.md +113 -0
- package/skills/apps-sdk-builder/references/repo-contract-and-validation.md +93 -0
- package/skills/apps-sdk-builder/references/search-fetch-standard.md +67 -0
- package/skills/apps-sdk-builder/references/upstream-example-workflow.md +79 -0
- package/skills/apps-sdk-builder/references/window-openai-patterns.md +79 -0
- package/skills/apps-sdk-builder/scripts/scaffold_node_ext_apps.mjs +606 -0
- package/skills/architecture-selector/SKILL.md +64 -0
- package/skills/backlog-planner/SKILL.md +68 -0
- package/skills/carplay-entitlement-checker/SKILL.md +82 -0
- package/skills/concept-discovery/SKILL.md +517 -0
- package/skills/concept-discovery/assets/sample-analysis.json +81 -0
- package/skills/concept-discovery/expected_outputs/sample-enum-dictionary.md +25 -0
- package/skills/concept-discovery/expected_outputs/sample-page-user-list.md +83 -0
- package/skills/concept-discovery/expected_outputs/sample-prd-readme.md +43 -0
- package/skills/concept-discovery/references/framework-patterns.md +228 -0
- package/skills/concept-discovery/references/prd-quality-checklist.md +65 -0
- package/skills/concept-discovery/scripts/codebase_analyzer.py +732 -0
- package/skills/concept-discovery/scripts/prd_scaffolder.py +435 -0
- package/skills/dast-zap/SKILL.md +453 -0
- package/skills/dast-zap/assets/.gitkeep +9 -0
- package/skills/dast-zap/assets/github_action.yml +207 -0
- package/skills/dast-zap/assets/gitlab_ci.yml +226 -0
- package/skills/dast-zap/assets/zap_automation.yaml +196 -0
- package/skills/dast-zap/assets/zap_context.xml +192 -0
- package/skills/dast-zap/references/EXAMPLE.md +40 -0
- package/skills/dast-zap/references/api_testing_guide.md +475 -0
- package/skills/dast-zap/references/authentication_guide.md +431 -0
- package/skills/dast-zap/references/false_positive_handling.md +427 -0
- package/skills/dast-zap/references/owasp_mapping.md +255 -0
- package/skills/dep-sbom-scan/SKILL.md +466 -0
- package/skills/deploy-cloudflare/SKILL.md +930 -0
- package/skills/deploy-docker/SKILL.md +55 -0
- package/skills/deploy-fly/SKILL.md +228 -0
- package/skills/deploy-k8s/SKILL.md +108 -0
- package/skills/deploy-k8s/assets/logo.png +0 -0
- package/skills/deploy-k8s/docs/README.md +29 -0
- package/skills/deploy-k8s/docs/SUMMARY.md +56 -0
- package/skills/deploy-k8s/docs/advanced/token-efficiency.md +61 -0
- package/skills/deploy-k8s/docs/architecture/multi-tenancy.md +96 -0
- package/skills/deploy-k8s/docs/architecture/storage-and-state.md +102 -0
- package/skills/deploy-k8s/docs/architecture/workload-patterns.md +87 -0
- package/skills/deploy-k8s/docs/book.json +16 -0
- package/skills/deploy-k8s/docs/community/changelog.md +34 -0
- package/skills/deploy-k8s/docs/community/contributing.md +67 -0
- package/skills/deploy-k8s/docs/core-concepts/failure-modes.md +153 -0
- package/skills/deploy-k8s/docs/core-concepts/philosophy.md +83 -0
- package/skills/deploy-k8s/docs/core-concepts/workflow.md +124 -0
- package/skills/deploy-k8s/docs/examples/bad-patterns.md +47 -0
- package/skills/deploy-k8s/docs/examples/do-dont-checklist.md +37 -0
- package/skills/deploy-k8s/docs/examples/good-patterns.md +49 -0
- package/skills/deploy-k8s/docs/failure-modes/api-drift.md +104 -0
- package/skills/deploy-k8s/docs/failure-modes/fragile-rollouts.md +99 -0
- package/skills/deploy-k8s/docs/failure-modes/insecure-workload-defaults.md +80 -0
- package/skills/deploy-k8s/docs/failure-modes/network-exposure.md +98 -0
- package/skills/deploy-k8s/docs/failure-modes/privilege-sprawl.md +91 -0
- package/skills/deploy-k8s/docs/failure-modes/resource-starvation.md +85 -0
- package/skills/deploy-k8s/docs/getting-started/installation.md +152 -0
- package/skills/deploy-k8s/docs/getting-started/quick-start.md +115 -0
- package/skills/deploy-k8s/docs/guides/helm-patterns.md +71 -0
- package/skills/deploy-k8s/docs/guides/kustomize-patterns.md +65 -0
- package/skills/deploy-k8s/docs/guides/observability.md +67 -0
- package/skills/deploy-k8s/docs/guides/security-hardening.md +59 -0
- package/skills/deploy-k8s/docs/guides/validation-and-policy.md +66 -0
- package/skills/deploy-k8s/docs/integrations/mcp-integration.md +52 -0
- package/skills/deploy-k8s/docs/package-lock.json +2892 -0
- package/skills/deploy-k8s/docs/package.json +13 -0
- package/skills/deploy-k8s/references/api-drift.md +298 -0
- package/skills/deploy-k8s/references/conditional/aks-patterns.md +70 -0
- package/skills/deploy-k8s/references/conditional/eks-patterns.md +79 -0
- package/skills/deploy-k8s/references/conditional/gitops-controllers.md +71 -0
- package/skills/deploy-k8s/references/conditional/gke-patterns.md +74 -0
- package/skills/deploy-k8s/references/conditional/observability-stacks.md +80 -0
- package/skills/deploy-k8s/references/conditional/openshift-patterns.md +67 -0
- package/skills/deploy-k8s/references/daemonset-operator-patterns.md +155 -0
- package/skills/deploy-k8s/references/deployment-patterns.md +146 -0
- package/skills/deploy-k8s/references/do-dont-patterns.md +87 -0
- package/skills/deploy-k8s/references/examples-bad.md +282 -0
- package/skills/deploy-k8s/references/examples-good.md +440 -0
- package/skills/deploy-k8s/references/fragile-rollouts.md +303 -0
- package/skills/deploy-k8s/references/helm-patterns.md +203 -0
- package/skills/deploy-k8s/references/insecure-workload-defaults.md +300 -0
- package/skills/deploy-k8s/references/job-patterns.md +120 -0
- package/skills/deploy-k8s/references/kustomize-patterns.md +239 -0
- package/skills/deploy-k8s/references/multi-tenancy.md +343 -0
- package/skills/deploy-k8s/references/network-exposure.md +481 -0
- package/skills/deploy-k8s/references/observability.md +302 -0
- package/skills/deploy-k8s/references/privilege-sprawl.md +273 -0
- package/skills/deploy-k8s/references/resource-starvation.md +374 -0
- package/skills/deploy-k8s/references/security-hardening.md +209 -0
- package/skills/deploy-k8s/references/stateful-patterns.md +130 -0
- package/skills/deploy-k8s/references/storage-and-state.md +330 -0
- package/skills/deploy-k8s/references/validation-and-policy.md +242 -0
- package/skills/deploy-railway/SKILL.md +235 -0
- package/skills/deploy-railway/references/analyze-db-mongo.md +84 -0
- package/skills/deploy-railway/references/analyze-db-mysql.md +254 -0
- package/skills/deploy-railway/references/analyze-db-postgres.md +479 -0
- package/skills/deploy-railway/references/analyze-db-redis.md +208 -0
- package/skills/deploy-railway/references/analyze-db.md +344 -0
- package/skills/deploy-railway/references/configure.md +309 -0
- package/skills/deploy-railway/references/deploy.md +195 -0
- package/skills/deploy-railway/references/operate.md +214 -0
- package/skills/deploy-railway/references/request.md +248 -0
- package/skills/deploy-railway/references/setup.md +312 -0
- package/skills/deploy-railway/scripts/analyze-mongo.py +1549 -0
- package/skills/deploy-railway/scripts/analyze-mysql.py +1195 -0
- package/skills/deploy-railway/scripts/analyze-postgres.py +3058 -0
- package/skills/deploy-railway/scripts/analyze-redis.py +1090 -0
- package/skills/deploy-railway/scripts/dal.py +671 -0
- package/skills/deploy-railway/scripts/enable-pg-stats.py +170 -0
- package/skills/deploy-railway/scripts/pg-extensions.py +370 -0
- package/skills/deploy-railway/scripts/railway-api.sh +52 -0
- package/skills/deploy-ssh/SKILL.md +91 -0
- package/skills/deploy-vercel/SKILL.md +304 -0
- package/skills/deploy-vercel/resources/deploy-codex.sh +301 -0
- package/skills/deploy-vercel/resources/deploy.sh +301 -0
- package/skills/docs-runbooks/SKILL.md +399 -0
- package/skills/drive-status-renderer/SKILL.md +62 -0
- package/skills/iac-scan/SKILL.md +680 -0
- package/skills/iac-scan/assets/.gitkeep +9 -0
- package/skills/iac-scan/assets/checkov_config.yaml +94 -0
- package/skills/iac-scan/assets/github_actions.yml +199 -0
- package/skills/iac-scan/assets/gitlab_ci.yml +218 -0
- package/skills/iac-scan/assets/pre_commit_config.yaml +92 -0
- package/skills/iac-scan/references/EXAMPLE.md +40 -0
- package/skills/iac-scan/references/compliance_mapping.md +237 -0
- package/skills/iac-scan/references/custom_policies.md +460 -0
- package/skills/iac-scan/references/suppression_guide.md +431 -0
- package/skills/incident-briefing/SKILL.md +66 -0
- package/skills/incident-triage/SKILL.md +481 -0
- package/{LICENSE → skills/mcp-builder/LICENSE.txt} +15 -14
- package/skills/mcp-builder/SKILL.md +244 -0
- package/skills/mcp-builder/reference/evaluation.md +602 -0
- package/skills/mcp-builder/reference/mcp_best_practices.md +249 -0
- package/skills/mcp-builder/reference/node_mcp_server.md +970 -0
- package/skills/mcp-builder/reference/python_mcp_server.md +719 -0
- package/skills/mcp-builder/scripts/connections.py +151 -0
- package/skills/mcp-builder/scripts/evaluation.py +373 -0
- package/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
- package/skills/mcp-builder/scripts/requirements.txt +2 -0
- package/skills/mobile-pairing/SKILL.md +52 -0
- package/skills/ops-sre/SKILL.md +297 -0
- package/skills/playwright-qa/LICENSE.txt +201 -0
- package/skills/playwright-qa/NOTICE.txt +14 -0
- package/skills/playwright-qa/SKILL.md +156 -0
- package/skills/playwright-qa/agents/openai.yaml +6 -0
- package/skills/playwright-qa/assets/playwright-small.svg +3 -0
- package/skills/playwright-qa/assets/playwright.png +0 -0
- package/skills/playwright-qa/references/cli.md +116 -0
- package/skills/playwright-qa/references/workflows.md +95 -0
- package/skills/playwright-qa/scripts/playwright_cli.sh +25 -0
- package/skills/release-publish/SKILL.md +85 -0
- package/skills/repo-bootstrap/SKILL.md +92 -0
- package/skills/repo-bootstrap/assets/example-workflows/validate-agents.yml +89 -0
- package/skills/repo-bootstrap/assets/root-thin.md +141 -0
- package/skills/repo-bootstrap/assets/root-verbose.md +149 -0
- package/skills/repo-bootstrap/assets/scoped/backend-go.md +107 -0
- package/skills/repo-bootstrap/assets/scoped/backend-php.md +94 -0
- package/skills/repo-bootstrap/assets/scoped/backend-python.md +84 -0
- package/skills/repo-bootstrap/assets/scoped/backend-typescript.md +89 -0
- package/skills/repo-bootstrap/assets/scoped/claude-code-skill.md +101 -0
- package/skills/repo-bootstrap/assets/scoped/cli.md +83 -0
- package/skills/repo-bootstrap/assets/scoped/concourse.md +196 -0
- package/skills/repo-bootstrap/assets/scoped/ddev.md +68 -0
- package/skills/repo-bootstrap/assets/scoped/docker.md +160 -0
- package/skills/repo-bootstrap/assets/scoped/documentation.md +98 -0
- package/skills/repo-bootstrap/assets/scoped/examples.md +96 -0
- package/skills/repo-bootstrap/assets/scoped/frontend-typescript.md +88 -0
- package/skills/repo-bootstrap/assets/scoped/github-actions.md +174 -0
- package/skills/repo-bootstrap/assets/scoped/gitlab-ci.md +174 -0
- package/skills/repo-bootstrap/assets/scoped/oro-bundle.md +209 -0
- package/skills/repo-bootstrap/assets/scoped/oro-project.md +170 -0
- package/skills/repo-bootstrap/assets/scoped/python-modern.md +170 -0
- package/skills/repo-bootstrap/assets/scoped/resources.md +96 -0
- package/skills/repo-bootstrap/assets/scoped/skill-repo.md +139 -0
- package/skills/repo-bootstrap/assets/scoped/symfony.md +168 -0
- package/skills/repo-bootstrap/assets/scoped/testing.md +87 -0
- package/skills/repo-bootstrap/assets/scoped/typo3-docs.md +103 -0
- package/skills/repo-bootstrap/assets/scoped/typo3-extension.md +133 -0
- package/skills/repo-bootstrap/assets/scoped/typo3-project.md +137 -0
- package/skills/repo-bootstrap/assets/scoped/typo3-testing.md +80 -0
- package/skills/repo-bootstrap/checkpoints.yaml +279 -0
- package/skills/repo-bootstrap/evals/evals.json +385 -0
- package/skills/repo-bootstrap/references/ai-contribution-guidelines.md +63 -0
- package/skills/repo-bootstrap/references/ai-tool-compatibility.md +223 -0
- package/skills/repo-bootstrap/references/directory-coverage.md +82 -0
- package/skills/repo-bootstrap/references/examples/coding-agent-cli/AGENTS.md +70 -0
- package/skills/repo-bootstrap/references/examples/coding-agent-cli/go.mod +3 -0
- package/skills/repo-bootstrap/references/examples/coding-agent-cli/scripts-AGENTS.md +389 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/.env.example +13 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/AGENTS.md +91 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/package.json +33 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/pnpm-lock.yaml +3 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/AGENTS.md +91 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/config.ts +28 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/controllers/userController.ts +74 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/index.ts +26 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/middleware/errorHandler.ts +45 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/middleware/requestLogger.ts +18 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/routes/health.ts +18 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/routes/users.ts +13 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/utils/errors.ts +40 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/utils/logger.ts +14 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/tsconfig.json +24 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/.env.example +19 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/AGENTS.md +92 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/pyproject.toml +88 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/AGENTS.md +85 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/__init__.py +3 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/config.py +49 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/main.py +66 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/models/__init__.py +13 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/models/item.py +43 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/models/user.py +40 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/routes/__init__.py +5 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/routes/health.py +20 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/routes/items.py +61 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/routes/users.py +55 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/services/__init__.py +6 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/services/item_service.py +77 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/services/user_service.py +69 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/uv.lock +4 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/.scopes +3 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/AGENTS.md +86 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/admin/package.json +20 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/admin/src/App.tsx +5 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/cmd/api/main.go +7 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/go.mod +2 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/main.go +7 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/.scopes +3 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/AGENTS.md +89 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/go.mod +2 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/AGENTS.md +90 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/package.json +17 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/App.tsx +1 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/Button.tsx +1 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/Footer.tsx +1 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/Header.tsx +1 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/Sidebar.tsx +1 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/main.go +7 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/package-lock.json +0 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/package.json +12 -0
- package/skills/repo-bootstrap/references/examples/ldap-selfservice/AGENTS.md +70 -0
- package/skills/repo-bootstrap/references/examples/ldap-selfservice/go.mod +3 -0
- package/skills/repo-bootstrap/references/examples/ldap-selfservice/internal-AGENTS.md +371 -0
- package/skills/repo-bootstrap/references/examples/ldap-selfservice/internal-web-AGENTS.md +448 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/.scopes +3 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/AGENTS.md +91 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/composer.json +8 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/package.json +15 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/pnpm-lock.yaml +0 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/src/Controller.php +3 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/AGENTS.md +92 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/package.json +26 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/App.tsx +3 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/Button.tsx +10 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/Footer.tsx +9 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/Header.tsx +9 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/main.tsx +3 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/tsconfig.json +13 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/AGENTS.md +75 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/package.json +7 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/packages/web/package.json +11 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/packages/web/src/index.ts +11 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/pnpm-lock.yaml +42 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/pnpm-workspace.yaml +2 -0
- package/skills/repo-bootstrap/references/examples/simple-ldap-go/AGENTS.md +70 -0
- package/skills/repo-bootstrap/references/examples/simple-ldap-go/examples-AGENTS.md +45 -0
- package/skills/repo-bootstrap/references/examples/simple-ldap-go/go.mod +3 -0
- package/skills/repo-bootstrap/references/examples/t3x-rte-ckeditor-image/AGENTS.md +70 -0
- package/skills/repo-bootstrap/references/examples/t3x-rte-ckeditor-image/Classes-AGENTS.md +392 -0
- package/skills/repo-bootstrap/references/examples/t3x-rte-ckeditor-image/composer.json +8 -0
- package/skills/repo-bootstrap/references/feedback-memory-schema.md +135 -0
- package/skills/repo-bootstrap/references/git-hooks-setup.md +79 -0
- package/skills/repo-bootstrap/references/output-structure.md +124 -0
- package/skills/repo-bootstrap/references/scripts-guide.md +175 -0
- package/skills/repo-bootstrap/references/verification-guide.md +137 -0
- package/skills/repo-bootstrap/scripts/analyze-git-history.sh +315 -0
- package/skills/repo-bootstrap/scripts/check-freshness.sh +230 -0
- package/skills/repo-bootstrap/scripts/detect-golden-samples.sh +161 -0
- package/skills/repo-bootstrap/scripts/detect-heuristics.sh +93 -0
- package/skills/repo-bootstrap/scripts/detect-project.sh +486 -0
- package/skills/repo-bootstrap/scripts/detect-scopes.sh +330 -0
- package/skills/repo-bootstrap/scripts/detect-utilities.sh +133 -0
- package/skills/repo-bootstrap/scripts/extract-adrs.sh +194 -0
- package/skills/repo-bootstrap/scripts/extract-agent-configs.sh +331 -0
- package/skills/repo-bootstrap/scripts/extract-architecture-rules.sh +522 -0
- package/skills/repo-bootstrap/scripts/extract-ci-commands.sh +385 -0
- package/skills/repo-bootstrap/scripts/extract-ci-rules.sh +384 -0
- package/skills/repo-bootstrap/scripts/extract-commands.sh +358 -0
- package/skills/repo-bootstrap/scripts/extract-documentation.sh +308 -0
- package/skills/repo-bootstrap/scripts/extract-github-rulesets.sh +96 -0
- package/skills/repo-bootstrap/scripts/extract-github-settings.sh +88 -0
- package/skills/repo-bootstrap/scripts/extract-ide-settings.sh +228 -0
- package/skills/repo-bootstrap/scripts/extract-platform-files.sh +290 -0
- package/skills/repo-bootstrap/scripts/extract-quality-configs.sh +442 -0
- package/skills/repo-bootstrap/scripts/generate-agents.sh +2424 -0
- package/skills/repo-bootstrap/scripts/generate-file-map.sh +153 -0
- package/skills/repo-bootstrap/scripts/lib/config-root.sh +211 -0
- package/skills/repo-bootstrap/scripts/lib/summary.sh +244 -0
- package/skills/repo-bootstrap/scripts/lib/template.sh +397 -0
- package/skills/repo-bootstrap/scripts/validate-structure.sh +324 -0
- package/skills/repo-bootstrap/scripts/verify-commands.sh +615 -0
- package/skills/repo-bootstrap/scripts/verify-content.sh +302 -0
- package/skills/schema-api-contracts/SKILL.md +56 -0
- package/skills/secret-hygiene/SKILL.md +511 -0
- package/skills/secret-hygiene/assets/.gitkeep +9 -0
- package/skills/secret-hygiene/assets/config-balanced.toml +81 -0
- package/skills/secret-hygiene/assets/config-custom.toml +178 -0
- package/skills/secret-hygiene/assets/config-strict.toml +48 -0
- package/skills/secret-hygiene/assets/github-action.yml +181 -0
- package/skills/secret-hygiene/assets/gitlab-ci.yml +257 -0
- package/skills/secret-hygiene/assets/precommit-config.yaml +70 -0
- package/skills/secret-hygiene/references/EXAMPLE.md +40 -0
- package/skills/secret-hygiene/references/compliance_mapping.md +538 -0
- package/skills/secret-hygiene/references/detection_rules.md +276 -0
- package/skills/secret-hygiene/references/false_positives.md +598 -0
- package/skills/secret-hygiene/references/remediation_guide.md +530 -0
- package/skills/stack-selector/SKILL.md +56 -0
- package/skills/telegram-control/SKILL.md +110 -0
- package/skills/telegram-control/references/architecture.md +184 -0
- package/skills/telegram-control/references/convex.md +173 -0
- package/skills/telegram-control/references/error_handling.md +212 -0
- package/skills/telegram-control/references/initial_setup.md +165 -0
- package/skills/telegram-control/references/telegram_api.md +156 -0
- package/skills/telegram-control/scripts/cancel_message.ts +53 -0
- package/skills/telegram-control/scripts/list_scheduled.ts +103 -0
- package/skills/telegram-control/scripts/logger.ts +121 -0
- package/skills/telegram-control/scripts/proxy-util.ts +11 -0
- package/skills/telegram-control/scripts/schedule_message.ts +216 -0
- package/skills/telegram-control/scripts/send_message.ts +115 -0
- package/skills/telegram-control/scripts/setup.ts +185 -0
- package/skills/telegram-control/scripts/types.ts +75 -0
- package/skills/telegram-control/scripts/view_history.ts +74 -0
- package/skills/test-strategy/SKILL.md +352 -0
- package/skills/threat-model/SKILL.md +303 -0
- package/skills/threat-model/examples/example-output.md +196 -0
- package/skills/threat-model/template.md +96 -0
- package/skills/ts-lint/SKILL.md +80 -0
- package/skills/ui-flow/SKILL.md +668 -0
- package/skills/voice-command-router/SKILL.md +51 -0
- package/skills/widget-live-activity-sync/SKILL.md +66 -0
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
# Fragile Rollouts
|
|
2
|
+
|
|
3
|
+
**Directive:** When generating Deployments, StatefulSets, or any workload with rolling updates, ALWAYS configure probes correctly, use immutable image tags, and design for graceful shutdown. A bad rollout is worse than no rollout. Default security posture is PSS "restricted" profile.
|
|
4
|
+
|
|
5
|
+
## When to use
|
|
6
|
+
|
|
7
|
+
Consult this reference whenever the task involves:
|
|
8
|
+
- Creating or modifying Deployments, StatefulSets, or DaemonSets
|
|
9
|
+
- Configuring liveness, readiness, or startup probes
|
|
10
|
+
- Setting image tags or pull policies
|
|
11
|
+
- Defining rolling update strategy parameters
|
|
12
|
+
- Implementing graceful shutdown or preStop hooks
|
|
13
|
+
- Adding init containers for dependency readiness
|
|
14
|
+
|
|
15
|
+
## Symptoms of fragile rollouts
|
|
16
|
+
|
|
17
|
+
| Symptom | Likely cause |
|
|
18
|
+
|---|---|
|
|
19
|
+
| Cascading restarts across all pods simultaneously | Liveness probe checks an external dependency (DB, cache) that went down |
|
|
20
|
+
| Dropped connections / 502s during deploy | No readiness probe, or readiness probe passes before app is truly ready |
|
|
21
|
+
| All replicas unavailable at the same time | `maxUnavailable` too high or `minReadySeconds` not set |
|
|
22
|
+
| Version drift -- some pods on old image, some on new | `:latest` tag with `imagePullPolicy: IfNotPresent` and cached layers |
|
|
23
|
+
| Pods killed before finishing in-flight requests | No preStop hook, `terminationGracePeriodSeconds` too short |
|
|
24
|
+
| Slow-starting apps killed in a restart loop | No startup probe, liveness probe fires before app initializes |
|
|
25
|
+
|
|
26
|
+
## Root causes
|
|
27
|
+
|
|
28
|
+
1. Misunderstanding the difference between liveness and readiness probes.
|
|
29
|
+
2. Checking external dependencies (databases, APIs) in liveness probes.
|
|
30
|
+
3. Using `:latest` tags, which are mutable and nondeterministic.
|
|
31
|
+
4. Not accounting for graceful shutdown and connection draining.
|
|
32
|
+
5. Setting probe timings without understanding the application startup profile.
|
|
33
|
+
|
|
34
|
+
## Prevention rules
|
|
35
|
+
|
|
36
|
+
### Probe types -- what each does
|
|
37
|
+
|
|
38
|
+
- **Liveness probe:** "Is the process alive and not deadlocked?" If it fails, kubelet kills and restarts the container. NEVER check external dependencies here. A simple `/healthz` that returns 200 if the event loop or main thread is responsive.
|
|
39
|
+
- **Readiness probe:** "Can the pod serve traffic right now?" If it fails, the pod is removed from Service endpoints. This IS the place to check dependencies -- if the database is down, the pod should stop receiving requests but should NOT be killed.
|
|
40
|
+
- **Startup probe:** "Has the application finished initializing?" Used for slow-starting apps (JVM warmup, Python loading ML models). While the startup probe is running, liveness and readiness probes are disabled. Once the startup probe succeeds, the other probes take over.
|
|
41
|
+
|
|
42
|
+
### Critical rule: NEVER check external dependencies in liveness probes
|
|
43
|
+
|
|
44
|
+
This is the single most common cause of cascading outages. When the database goes down:
|
|
45
|
+
- Liveness probe fails on all pods simultaneously
|
|
46
|
+
- Kubelet restarts all pods
|
|
47
|
+
- Pods come back, database is still down, liveness fails again
|
|
48
|
+
- Entire service enters a crash loop while the database recovers
|
|
49
|
+
- If the liveness probe only checked "is the process alive?", the pods would have stayed up and recovered when the database returned.
|
|
50
|
+
|
|
51
|
+
### Probe timing guidelines
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
startupProbe:
|
|
55
|
+
failureThreshold x periodSeconds >= maximum startup time
|
|
56
|
+
Example: JVM app that takes up to 120s to start
|
|
57
|
+
failureThreshold: 30, periodSeconds: 5 = 150s budget
|
|
58
|
+
|
|
59
|
+
livenessProbe:
|
|
60
|
+
initialDelaySeconds: only if NOT using a startup probe
|
|
61
|
+
periodSeconds: 10-30s (don't hammer the app)
|
|
62
|
+
timeoutSeconds: must be less than periodSeconds
|
|
63
|
+
failureThreshold: 3 (don't kill on a single blip)
|
|
64
|
+
|
|
65
|
+
readinessProbe:
|
|
66
|
+
periodSeconds: 5-10s (faster than liveness, controls traffic)
|
|
67
|
+
failureThreshold: 1-3 (remove from traffic quickly)
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Rolling update strategy
|
|
71
|
+
|
|
72
|
+
- `maxSurge`: how many extra pods above `replicas` during update. Higher = faster rollout, more resource usage.
|
|
73
|
+
- `maxUnavailable`: how many pods can be down during update. Set to 0 for zero-downtime deploys (requires `maxSurge >= 1`).
|
|
74
|
+
- `minReadySeconds`: how long a new pod must be Ready before it counts as Available. Catches pods that start and crash shortly after.
|
|
75
|
+
- For critical services: `maxSurge: 1, maxUnavailable: 0` ensures capacity never drops.
|
|
76
|
+
|
|
77
|
+
### Image tagging
|
|
78
|
+
|
|
79
|
+
- NEVER use `:latest`. It is mutable, nondeterministic, and makes rollbacks impossible.
|
|
80
|
+
- Use immutable tags: semantic versions (`v2.4.1`), git SHAs (`abc123def`), or digests (`@sha256:...`).
|
|
81
|
+
- `imagePullPolicy: IfNotPresent` is correct for immutable tags. Use `Always` only with mutable tags (which you should not be using).
|
|
82
|
+
- `imagePullPolicy: Never` only for local development with pre-loaded images.
|
|
83
|
+
|
|
84
|
+
### Graceful shutdown sequence
|
|
85
|
+
|
|
86
|
+
When Kubernetes terminates a pod, the following happens in parallel:
|
|
87
|
+
1. Pod is marked `Terminating` and removed from Service endpoints (async).
|
|
88
|
+
2. `preStop` hook runs (if defined).
|
|
89
|
+
3. `SIGTERM` is sent to PID 1 in the container.
|
|
90
|
+
4. Kubelet waits up to `terminationGracePeriodSeconds` (default 30s).
|
|
91
|
+
5. `SIGKILL` is sent if the process has not exited.
|
|
92
|
+
|
|
93
|
+
The problem: step 1 is async. The pod may still receive traffic for a few seconds after SIGTERM. The fix: add a `preStop` sleep to allow endpoint propagation before the app begins shutdown.
|
|
94
|
+
|
|
95
|
+
### Init containers for dependency waiting
|
|
96
|
+
|
|
97
|
+
Use init containers to wait for dependencies, NOT liveness probes. Init containers run before the main container starts and block until they succeed.
|
|
98
|
+
|
|
99
|
+
## Patterns and examples
|
|
100
|
+
|
|
101
|
+
### GOOD: Deployment with proper probes, rolling update, graceful shutdown
|
|
102
|
+
|
|
103
|
+
```yaml
|
|
104
|
+
apiVersion: apps/v1
|
|
105
|
+
kind: Deployment
|
|
106
|
+
metadata:
|
|
107
|
+
name: payment-api
|
|
108
|
+
namespace: payments
|
|
109
|
+
spec:
|
|
110
|
+
replicas: 4
|
|
111
|
+
revisionHistoryLimit: 5
|
|
112
|
+
strategy:
|
|
113
|
+
type: RollingUpdate
|
|
114
|
+
rollingUpdate:
|
|
115
|
+
maxSurge: 1
|
|
116
|
+
maxUnavailable: 0
|
|
117
|
+
minReadySeconds: 10
|
|
118
|
+
selector:
|
|
119
|
+
matchLabels:
|
|
120
|
+
app: payment-api
|
|
121
|
+
template:
|
|
122
|
+
metadata:
|
|
123
|
+
labels:
|
|
124
|
+
app: payment-api
|
|
125
|
+
version: v3.2.0
|
|
126
|
+
spec:
|
|
127
|
+
serviceAccountName: payment-api
|
|
128
|
+
automountServiceAccountToken: false
|
|
129
|
+
terminationGracePeriodSeconds: 60
|
|
130
|
+
securityContext:
|
|
131
|
+
runAsNonRoot: true
|
|
132
|
+
seccompProfile:
|
|
133
|
+
type: RuntimeDefault
|
|
134
|
+
initContainers:
|
|
135
|
+
- name: wait-for-db
|
|
136
|
+
image: registry.example.com/toolbox:v1.0.0
|
|
137
|
+
command: ["sh", "-c"]
|
|
138
|
+
args:
|
|
139
|
+
- |
|
|
140
|
+
until pg_isready -h postgres.payments.svc -p 5432; do
|
|
141
|
+
echo "Waiting for database..."
|
|
142
|
+
sleep 2
|
|
143
|
+
done
|
|
144
|
+
securityContext:
|
|
145
|
+
allowPrivilegeEscalation: false
|
|
146
|
+
capabilities:
|
|
147
|
+
drop: ["ALL"]
|
|
148
|
+
readOnlyRootFilesystem: true
|
|
149
|
+
containers:
|
|
150
|
+
- name: api
|
|
151
|
+
image: registry.example.com/payment-api:v3.2.0
|
|
152
|
+
ports:
|
|
153
|
+
- containerPort: 8080
|
|
154
|
+
protocol: TCP
|
|
155
|
+
securityContext:
|
|
156
|
+
allowPrivilegeEscalation: false
|
|
157
|
+
capabilities:
|
|
158
|
+
drop: ["ALL"]
|
|
159
|
+
readOnlyRootFilesystem: true
|
|
160
|
+
startupProbe:
|
|
161
|
+
httpGet:
|
|
162
|
+
path: /healthz
|
|
163
|
+
port: 8080
|
|
164
|
+
periodSeconds: 5
|
|
165
|
+
failureThreshold: 30 # 150s budget for JVM startup
|
|
166
|
+
livenessProbe:
|
|
167
|
+
httpGet:
|
|
168
|
+
path: /healthz # checks ONLY process health
|
|
169
|
+
port: 8080
|
|
170
|
+
periodSeconds: 15
|
|
171
|
+
timeoutSeconds: 5
|
|
172
|
+
failureThreshold: 3
|
|
173
|
+
readinessProbe:
|
|
174
|
+
httpGet:
|
|
175
|
+
path: /ready # checks process + downstream deps
|
|
176
|
+
port: 8080
|
|
177
|
+
periodSeconds: 5
|
|
178
|
+
timeoutSeconds: 3
|
|
179
|
+
failureThreshold: 2
|
|
180
|
+
lifecycle:
|
|
181
|
+
preStop:
|
|
182
|
+
exec:
|
|
183
|
+
command: ["sh", "-c", "sleep 5"] # allow endpoint de-registration
|
|
184
|
+
resources:
|
|
185
|
+
requests:
|
|
186
|
+
cpu: 250m
|
|
187
|
+
memory: 512Mi
|
|
188
|
+
limits:
|
|
189
|
+
memory: 512Mi
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### BAD: Liveness probe checking database, :latest tag, no graceful shutdown
|
|
193
|
+
|
|
194
|
+
```yaml
|
|
195
|
+
# DO NOT DO THIS
|
|
196
|
+
apiVersion: apps/v1
|
|
197
|
+
kind: Deployment
|
|
198
|
+
metadata:
|
|
199
|
+
name: payment-api
|
|
200
|
+
namespace: payments
|
|
201
|
+
spec:
|
|
202
|
+
replicas: 2
|
|
203
|
+
strategy:
|
|
204
|
+
type: RollingUpdate
|
|
205
|
+
rollingUpdate:
|
|
206
|
+
maxSurge: 0
|
|
207
|
+
maxUnavailable: 1 # with 2 replicas, this means 50% down during deploy
|
|
208
|
+
selector:
|
|
209
|
+
matchLabels:
|
|
210
|
+
app: payment-api
|
|
211
|
+
template:
|
|
212
|
+
metadata:
|
|
213
|
+
labels:
|
|
214
|
+
app: payment-api
|
|
215
|
+
spec:
|
|
216
|
+
# no terminationGracePeriodSeconds -- defaults to 30s, may not be enough
|
|
217
|
+
containers:
|
|
218
|
+
- name: api
|
|
219
|
+
image: registry.example.com/payment-api:latest # mutable tag
|
|
220
|
+
imagePullPolicy: IfNotPresent # may use stale cached layer
|
|
221
|
+
livenessProbe:
|
|
222
|
+
httpGet:
|
|
223
|
+
path: /health
|
|
224
|
+
port: 8080
|
|
225
|
+
initialDelaySeconds: 5
|
|
226
|
+
periodSeconds: 5
|
|
227
|
+
failureThreshold: 1 # killed on a single failure
|
|
228
|
+
# THIS ENDPOINT CHECKS DATABASE CONNECTIVITY
|
|
229
|
+
# When the DB goes down, ALL pods restart simultaneously
|
|
230
|
+
# no readiness probe -- traffic hits pods before they are ready
|
|
231
|
+
# no startup probe -- slow starts trigger liveness kills
|
|
232
|
+
# no preStop hook -- in-flight requests dropped on termination
|
|
233
|
+
# no resource requests/limits
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### Pod Disruption Budget for high-availability services
|
|
237
|
+
|
|
238
|
+
```yaml
|
|
239
|
+
apiVersion: policy/v1
|
|
240
|
+
kind: PodDisruptionBudget
|
|
241
|
+
metadata:
|
|
242
|
+
name: payment-api-pdb
|
|
243
|
+
namespace: payments
|
|
244
|
+
spec:
|
|
245
|
+
minAvailable: 2 # or use maxUnavailable: 1
|
|
246
|
+
selector:
|
|
247
|
+
matchLabels:
|
|
248
|
+
app: payment-api
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
## LLM mistake checklist
|
|
252
|
+
|
|
253
|
+
Before finalizing any Deployment or workload manifest, verify each item:
|
|
254
|
+
|
|
255
|
+
- [ ] Liveness probe does NOT check any external dependency (database, cache, queue, other service)
|
|
256
|
+
- [ ] Readiness probe is defined and separate from liveness probe
|
|
257
|
+
- [ ] Startup probe is defined for applications with initialization time > 10 seconds
|
|
258
|
+
- [ ] Image tag is immutable (semantic version, git SHA, or digest) -- not `:latest`
|
|
259
|
+
- [ ] `imagePullPolicy` is `IfNotPresent` for immutable tags, not `Always`
|
|
260
|
+
- [ ] `maxUnavailable: 0` is set if zero-downtime deployment is required
|
|
261
|
+
- [ ] `terminationGracePeriodSeconds` exceeds the time the application needs to drain connections
|
|
262
|
+
- [ ] `preStop` hook includes a short sleep (3-5s) to allow endpoint de-registration
|
|
263
|
+
- [ ] `failureThreshold` for liveness probe is at least 3, not 1
|
|
264
|
+
- [ ] Resource `requests` are set (required for scheduling); memory `limits` are set
|
|
265
|
+
- [ ] Init containers handle dependency waiting, not liveness probes
|
|
266
|
+
- [ ] `minReadySeconds` is set to catch crash-after-start scenarios
|
|
267
|
+
|
|
268
|
+
## Verification commands
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
# Check rollout status
|
|
272
|
+
kubectl rollout status deployment/payment-api -n payments
|
|
273
|
+
|
|
274
|
+
# Watch pods during a rollout
|
|
275
|
+
kubectl get pods -n payments -l app=payment-api -w
|
|
276
|
+
|
|
277
|
+
# Check rollout history and revision details
|
|
278
|
+
kubectl rollout history deployment/payment-api -n payments
|
|
279
|
+
kubectl rollout history deployment/payment-api -n payments --revision=3
|
|
280
|
+
|
|
281
|
+
# Rollback to previous revision
|
|
282
|
+
kubectl rollout undo deployment/payment-api -n payments
|
|
283
|
+
|
|
284
|
+
# Verify probe configuration on running pods
|
|
285
|
+
kubectl get pods -n payments -l app=payment-api -o jsonpath='{range .items[*]}{.metadata.name}{"\n"}{range .spec.containers[*]} liveness: {.livenessProbe.httpGet.path}{"\n"} readiness: {.readinessProbe.httpGet.path}{"\n"} startup: {.startupProbe.httpGet.path}{"\n"}{end}{end}'
|
|
286
|
+
|
|
287
|
+
# Check for deployments using :latest tag
|
|
288
|
+
kubectl get deployments -A -o json | \
|
|
289
|
+
jq -r '.items[] | .metadata.namespace + "/" + .metadata.name as $d | .spec.template.spec.containers[] | select(.image | endswith(":latest") or (contains(":") | not)) | $d + " -> " + .image'
|
|
290
|
+
|
|
291
|
+
# Check for pods without readiness probes
|
|
292
|
+
kubectl get pods -A -o json | \
|
|
293
|
+
jq -r '.items[] | .metadata.namespace + "/" + .metadata.name as $pod | .spec.containers[] | select(.readinessProbe == null) | $pod + " container:" + .name + " has no readiness probe"'
|
|
294
|
+
|
|
295
|
+
# Verify PodDisruptionBudget coverage
|
|
296
|
+
kubectl get pdb -n payments -o wide
|
|
297
|
+
|
|
298
|
+
# Check events for probe failures
|
|
299
|
+
kubectl get events -n payments --field-selector reason=Unhealthy --sort-by='.lastTimestamp'
|
|
300
|
+
|
|
301
|
+
# Inspect endpoint changes during rollout
|
|
302
|
+
kubectl get endpoints payment-api -n payments -w
|
|
303
|
+
```
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
# Helm Chart Patterns
|
|
2
|
+
|
|
3
|
+
> When creating or reviewing Helm charts, templating Kubernetes manifests, or
|
|
4
|
+
> managing chart dependencies, follow these patterns. Default security posture
|
|
5
|
+
> is PSS "restricted" profile.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Chart.yaml Required Fields
|
|
10
|
+
|
|
11
|
+
Every chart must include these top-level fields:
|
|
12
|
+
|
|
13
|
+
```yaml
|
|
14
|
+
apiVersion: v2
|
|
15
|
+
name: my-app
|
|
16
|
+
version: 0.1.0 # Chart version - bump on every change
|
|
17
|
+
appVersion: "1.0.0" # Application version being deployed
|
|
18
|
+
type: application # "application" or "library"
|
|
19
|
+
description: "Short description of what this chart deploys"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
- `apiVersion: v2` is mandatory for Helm 3.
|
|
23
|
+
- `version` follows SemVer and must change on every chart modification.
|
|
24
|
+
- `appVersion` tracks the application release independently of the chart.
|
|
25
|
+
|
|
26
|
+
## values.yaml Structure
|
|
27
|
+
|
|
28
|
+
Group by resource type, use clear defaults, document every section:
|
|
29
|
+
|
|
30
|
+
```yaml
|
|
31
|
+
# -- Number of replicas
|
|
32
|
+
replicaCount: 1
|
|
33
|
+
|
|
34
|
+
image:
|
|
35
|
+
# -- Container image repository
|
|
36
|
+
repository: ghcr.io/org/app
|
|
37
|
+
# -- Image tag (defaults to chart appVersion)
|
|
38
|
+
tag: ""
|
|
39
|
+
pullPolicy: IfNotPresent
|
|
40
|
+
|
|
41
|
+
securityContext:
|
|
42
|
+
runAsNonRoot: true
|
|
43
|
+
runAsUser: 65534
|
|
44
|
+
allowPrivilegeEscalation: false
|
|
45
|
+
readOnlyRootFilesystem: true
|
|
46
|
+
capabilities:
|
|
47
|
+
drop: ["ALL"]
|
|
48
|
+
|
|
49
|
+
resources:
|
|
50
|
+
requests:
|
|
51
|
+
cpu: 100m
|
|
52
|
+
memory: 128Mi
|
|
53
|
+
limits:
|
|
54
|
+
memory: 256Mi
|
|
55
|
+
|
|
56
|
+
probes:
|
|
57
|
+
liveness:
|
|
58
|
+
path: /healthz
|
|
59
|
+
port: http
|
|
60
|
+
initialDelaySeconds: 10
|
|
61
|
+
readiness:
|
|
62
|
+
path: /readyz
|
|
63
|
+
port: http
|
|
64
|
+
initialDelaySeconds: 5
|
|
65
|
+
|
|
66
|
+
ingress:
|
|
67
|
+
enabled: false
|
|
68
|
+
className: ""
|
|
69
|
+
hosts: []
|
|
70
|
+
tls: []
|
|
71
|
+
|
|
72
|
+
serviceAccount:
|
|
73
|
+
create: true
|
|
74
|
+
name: ""
|
|
75
|
+
annotations: {}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Template Best Practices
|
|
79
|
+
|
|
80
|
+
- Use `include` and `_helpers.tpl` for all reusable snippets.
|
|
81
|
+
- Never inline label sets; always call a named template.
|
|
82
|
+
- Use `{{- ... -}}` whitespace trimming to avoid blank lines in output.
|
|
83
|
+
- Always wrap string values with `{{ .Values.foo | quote }}`.
|
|
84
|
+
|
|
85
|
+
### Required Template Helpers (_helpers.tpl)
|
|
86
|
+
|
|
87
|
+
```yaml
|
|
88
|
+
{{- define "mychart.fullname" -}}
|
|
89
|
+
{{- if .Values.fullnameOverride }}
|
|
90
|
+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
|
91
|
+
{{- else }}
|
|
92
|
+
{{- $name := default .Chart.Name .Values.nameOverride }}
|
|
93
|
+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
|
94
|
+
{{- end }}
|
|
95
|
+
{{- end }}
|
|
96
|
+
|
|
97
|
+
{{- define "mychart.labels" -}}
|
|
98
|
+
helm.sh/chart: {{ include "mychart.chart" . }}
|
|
99
|
+
app.kubernetes.io/name: {{ include "mychart.name" . }}
|
|
100
|
+
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
101
|
+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
|
102
|
+
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
103
|
+
{{- end }}
|
|
104
|
+
|
|
105
|
+
{{- define "mychart.selectorLabels" -}}
|
|
106
|
+
app.kubernetes.io/name: {{ include "mychart.name" . }}
|
|
107
|
+
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
108
|
+
{{- end }}
|
|
109
|
+
|
|
110
|
+
{{- define "mychart.serviceAccountName" -}}
|
|
111
|
+
{{- if .Values.serviceAccount.create }}
|
|
112
|
+
{{- default (include "mychart.fullname" .) .Values.serviceAccount.name }}
|
|
113
|
+
{{- else }}
|
|
114
|
+
{{- default "default" .Values.serviceAccount.name }}
|
|
115
|
+
{{- end }}
|
|
116
|
+
{{- end }}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Conditional Resources
|
|
120
|
+
|
|
121
|
+
```yaml
|
|
122
|
+
{{- if .Values.ingress.enabled }}
|
|
123
|
+
apiVersion: networking.k8s.io/v1
|
|
124
|
+
kind: Ingress
|
|
125
|
+
metadata:
|
|
126
|
+
name: {{ include "mychart.fullname" . }}
|
|
127
|
+
labels:
|
|
128
|
+
{{- include "mychart.labels" . | nindent 4 }}
|
|
129
|
+
spec:
|
|
130
|
+
...
|
|
131
|
+
{{- end }}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Deployment Template Example
|
|
135
|
+
|
|
136
|
+
```yaml
|
|
137
|
+
apiVersion: apps/v1
|
|
138
|
+
kind: Deployment
|
|
139
|
+
metadata:
|
|
140
|
+
name: {{ include "mychart.fullname" . }}
|
|
141
|
+
labels:
|
|
142
|
+
{{- include "mychart.labels" . | nindent 4 }}
|
|
143
|
+
spec:
|
|
144
|
+
replicas: {{ .Values.replicaCount }}
|
|
145
|
+
selector:
|
|
146
|
+
matchLabels:
|
|
147
|
+
{{- include "mychart.selectorLabels" . | nindent 6 }}
|
|
148
|
+
template:
|
|
149
|
+
metadata:
|
|
150
|
+
labels:
|
|
151
|
+
{{- include "mychart.selectorLabels" . | nindent 8 }}
|
|
152
|
+
spec:
|
|
153
|
+
serviceAccountName: {{ include "mychart.serviceAccountName" . }}
|
|
154
|
+
securityContext:
|
|
155
|
+
{{- toYaml .Values.securityContext | nindent 8 }}
|
|
156
|
+
containers:
|
|
157
|
+
- name: {{ .Chart.Name }}
|
|
158
|
+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
|
159
|
+
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
160
|
+
ports:
|
|
161
|
+
- name: http
|
|
162
|
+
containerPort: 8080
|
|
163
|
+
protocol: TCP
|
|
164
|
+
livenessProbe:
|
|
165
|
+
httpGet:
|
|
166
|
+
path: {{ .Values.probes.liveness.path }}
|
|
167
|
+
port: {{ .Values.probes.liveness.port }}
|
|
168
|
+
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
|
|
169
|
+
readinessProbe:
|
|
170
|
+
httpGet:
|
|
171
|
+
path: {{ .Values.probes.readiness.path }}
|
|
172
|
+
port: {{ .Values.probes.readiness.port }}
|
|
173
|
+
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
|
|
174
|
+
resources:
|
|
175
|
+
{{- toYaml .Values.resources | nindent 12 }}
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
## Dependency Management
|
|
179
|
+
|
|
180
|
+
- Declare sub-charts in `Chart.yaml` under `dependencies`.
|
|
181
|
+
- Run `helm dependency update` to generate `Chart.lock`.
|
|
182
|
+
- Use `condition` or `tags` to make sub-charts optional.
|
|
183
|
+
- Commit both `Chart.yaml` and `Chart.lock` to version control.
|
|
184
|
+
|
|
185
|
+
## Testing
|
|
186
|
+
|
|
187
|
+
Run these in order during development and CI:
|
|
188
|
+
|
|
189
|
+
1. `helm lint ./chart` -- catch syntax and structural errors.
|
|
190
|
+
2. `helm template release-name ./chart -f values-prod.yaml` -- render manifests locally.
|
|
191
|
+
3. `kubeconform -kubernetes-version 1.29.0 -strict` on rendered output -- validate against schemas.
|
|
192
|
+
4. `helm test release-name` (post-install) -- run in-cluster test pods.
|
|
193
|
+
|
|
194
|
+
## LLM Mistake Checklist
|
|
195
|
+
|
|
196
|
+
1. **Missing `{{-` whitespace control** -- produces blank lines that break multi-document YAML.
|
|
197
|
+
2. **Forgot `| nindent N`** -- YAML indentation wrong in rendered output, causes parse failures.
|
|
198
|
+
3. **Used `{{ .Values.foo }}` without `quote`** -- numeric or special-char values break YAML.
|
|
199
|
+
4. **Hardcoded labels instead of `include`** -- selector/label mismatch on override.
|
|
200
|
+
5. **No default for `.Values.image.tag`** -- empty tag produces `repository:` with trailing colon.
|
|
201
|
+
6. **`toYaml` without `nindent`** -- nested objects render at column 0.
|
|
202
|
+
7. **Chart version not bumped** -- Helm repo serves stale version from cache.
|
|
203
|
+
8. **Missing `required` for mandatory values** -- chart installs with nil values, pods crash at runtime.
|