[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78D131D2KJK29SNZPME3RG5":3,"skill-same:01M78D131D2KJK29SNZPME3RG5":64},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":33,"repositoryHtmlUrl":34,"repositoryHomepageUrl":35,"ownerHtmlUrl":36,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":37,"install":38,"resources":51},"01M78D131D2KJK29SNZPME3RG5","deployment",null,"Use this skill for a Helm-upgrade deploy of an app service (the web portal or the edge service) to an EXISTING Kubernetes cluster, plus post-deploy verification. NOT for cluster-level ops -- Minikube\u002Fk3s lifecycle, GCP firewall, tunnels, bootstrap secrets (use kubernetes-deployment); NOT for cross-environment promotion (use release-promotion).","atretyak1985\u002Fswarmery","atretyak1985","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1436737?v=4","01M78CTSX57YH0EYY9YGH0TWKX","Andrii Tretiak","01M78CTSXRPJPYQ7GNPMP45TYX",8,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery\u002Fblob\u002Fmain\u002Fplugins\u002Finfra-pack\u002Fskills\u002Fdeployment\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: deployment\ndescription: \"Use this skill for a Helm-upgrade deploy of an app service (the web portal or the edge service) to an EXISTING Kubernetes cluster, plus post-deploy verification. NOT for cluster-level ops -- Minikube\u002Fk3s lifecycle, GCP firewall, tunnels, bootstrap secrets (use kubernetes-deployment); NOT for cross-environment promotion (use release-promotion).\"\nversion: \"1.0.0\"\nowner: \"swarmery-infra\"\ndocs:\n  status: reviewed\n  source_sha: 4112200c69a3\n  updated: 2026-08-06\n---\n\n# Purpose\n\nOrchestrate the project's service deployments across local-dev (Minikube), the staging environment (project.json → cloud.envAlias; typically a cloud VM + Minikube), and production (e.g. edge device + k3s) using Helm, producing a deploy status report with pod health and endpoint verification. This skill covers the single-environment deploy-and-verify cycle; it defers image building to `docker-build`, chart template authoring to `helm-chart-expert`, and cross-environment promotion to `release-promotion`.\n\n# When to use this skill\n\n- Trigger A -- Deploying a Helm release to any single project environment\n- Trigger B -- Running post-deployment verification (pod health, endpoint checks, ingress validation)\n- Trigger C -- Rolling back a failed Helm release within the same environment\n- Trigger D -- Inspecting current deploy state (helm list, helm history, pod status)\n\n# When NOT to use this skill\n\n- Anti-trigger A -- Building or pushing Docker images -> use `docker-build` instead\n- Anti-trigger B -- Writing or modifying Helm chart templates -> use `helm-chart-expert` instead\n- Anti-trigger C -- CI\u002FCD pipeline configuration -> use `gitlab-ci-cd` instead\n- Anti-trigger D -- Production deploy without an approved merge request -> stop and escalate\n- Anti-trigger E -- Staging-environment operational recovery (SSH debugging, secret rotation, VM recovery) -> follow the project's environment runbooks; cluster-level pieces belong to `kubernetes-deployment`\n- Anti-trigger F -- Promoting an image across environments (dev -> staging -> production) -> use `release-promotion` instead\n- Anti-trigger G -- Cluster-level infrastructure ops (Minikube management, GCP firewall, tunnel debugging) -> use `kubernetes-deployment` instead\n\n# Required environment\n\n- Runtime mount: `.claude\u002Fskills\u002Fdeployment\u002FSKILL.md`\n- Tools \u002F libraries: `helm` (v3+), `kubectl`, `gcloud` CLI, SSH access (for staging\u002Fproduction)\n- Bundled resources:\n  - `.claude\u002Fskills\u002Fdeployment\u002Fscripts\u002Fdeploy-checklist.sh` -- pre-deploy validation\n  - `.claude\u002Fskills\u002Fdeployment\u002Fresources\u002Fenvironments.md` -- environment coordinates\n- Reversibility profile: hard-to-reverse -- confirm before applying to shared clusters; `helm rollback` can revert but causes pod disruption\n\n# Inputs\n\n- `environment: \"localdev\" | \"\u003CenvAlias>\" | \"production\"` -- target environment (staging alias from project.json → cloud.envAlias)\n- `chart_path: string` -- path to the Helm chart (e.g., `charts\u002F\u003Capp>\u002F`)\n- `values_file: string` -- environment-specific values file (e.g., `values.localdev.yaml`)\n- `image_tag: string` -- the image tag to deploy (git short hash or semver)\n\n# Outputs\n\n- Format: Deploy status report inlined in agent response\n- Length budget: max 30 lines for the status report; verbose pod logs or dry-run diffs go in a collapsible block\n- Output template:\n  ```\n  Deploy: {chart} -> {environment}\n  Image: {registry}\u002F{image}:{tag}\n  Helm revision: {N}\n  Pod status: {count} Running, {count} other\n  Health endpoint: {status code}\n  Audit trail: {updated | skipped (localdev)}\n  ```\n\n# Procedure\n\n1. **Validate prerequisites** -- Confirm GCP auth (`gcloud auth print-access-token`), kubectl cluster access (`kubectl get nodes`), and image existence in registry (`gcloud artifacts docker images describe $IMAGE_REGISTRY\u002F$IMAGE:$TAG`). Use `$IMAGE_REGISTRY` environment variable for the registry URL (do not hardcode GCP project IDs). Checkpoint: All three checks pass. If any fails, stop and report which prerequisite is missing.\n\n2. **Run pre-deploy checklist** -- Execute `.claude\u002Fskills\u002Fdeployment\u002Fscripts\u002Fdeploy-checklist.sh \u003Cimage-name> \u003Cimage-tag> \u003Cchart-path>` to validate chart lint, template render, and image availability. Checkpoint: Script exits 0.\n\n3. **Dry-run first** -- Always run `helm upgrade --install --dry-run` (or the chart repo's environment wrapper with its dry-run flag, if one exists) before the live deploy. Review the rendered manifests for stop conditions.\n\n   ```bash\n   # Local dev\n   helm upgrade --install \u003Crelease> charts\u002F\u003Capp>\u002F -f charts\u002F\u003Capp>\u002Fvalues.localdev.yaml --dry-run\n\n   # Staging (\u003CenvAlias>)\n   ssh \u003Cstaging-host> \"cd \u003Cchart-repo> && helm upgrade --install \u003Crelease> charts\u002F\u003Capp>\u002F -f charts\u002F\u003Capp>\u002Fvalues.\u003CenvAlias>.yaml --dry-run\"\n   ```\n\n   Checkpoint: Dry-run output reviewed. STOP if any of these appear: `kind: PersistentVolumeClaim` being deleted, replica count decrease >50%, resource limits removed entirely, namespace change, or `kind: ServiceAccount` deleted. Otherwise proceed.\n\n4. **Run helm diff** -- If `helm-diff` plugin is available, run `helm diff upgrade` to see a colored diff of what will change. Checkpoint: Diff reviewed and accepted by the operator.\n\n5. **Deploy** -- Execute the live deploy command. Side effect: This modifies the target Kubernetes cluster. The Helm release revision increments.\n\n   ```bash\n   # Local dev\n   helm upgrade --install \u003Crelease> charts\u002F\u003Capp>\u002F -f charts\u002F\u003Capp>\u002Fvalues.localdev.yaml\n\n   # Staging (\u003CenvAlias>)\n   ssh \u003Cstaging-host> \"cd \u003Cchart-repo> && helm upgrade --install \u003Crelease> charts\u002F\u003Capp>\u002F -f charts\u002F\u003Capp>\u002Fvalues.\u003CenvAlias>.yaml\"\n   ```\n\n   Checkpoint: `helm history` shows the new revision with status `deployed`.\n\n6. **Post-deploy verification** -- Run all checks:\n   - `kubectl get pods -n \u003Cnamespace>` -- all pods in Running state within 120 seconds\n   - `curl http:\u002F\u002F\u003Cendpoint>\u002Fapi\u002Fhealth` -- returns HTTP 200\n   - `kubectl get ingress -A` -- ingress routes match expected hostnames\n\n   Checkpoint: All pods Running, health endpoint returns 200, ingress routes correct.\n\n7. **Update audit trail** -- After a successful staging or production deploy, update the version-pinning repo, if the project uses one (project.json → repos), via a commit or MR. Fields to update: `image_tag`, `chart_version`, `deployed_at` (ISO 8601 timestamp), `helm_revision`. This is not optional for shared environments. Checkpoint: Version file committed or MR opened.\n\n### Environments Reference\n\n| Environment | Infra | Namespace | Access |\n|-------------|-------|-----------|--------|\n| localdev | Minikube | `\u003Capp-namespace>` | `*.\u003Clocaldev-host>` via \u002Fetc\u002Fhosts |\n| `\u003CenvAlias>` (staging) | Cloud VM + Minikube | `\u003Capp-namespace>` | SSH tunnel |\n| production | Edge device + k3s (or managed cluster) | `\u003Capp-namespace>` | Direct |\n\n### Service Ports (localdev)\n\n| Service | Domain | Port |\n|---------|--------|------|\n| Web portal | `\u003Clocaldev-host>` | 80 |\n| Device N | `dN.\u003Clocaldev-host>` | 80 |\n| Keycloak | `keycloak.\u003Clocaldev-host>` | 80 |\n| PgAdmin | `pgadmin.\u003Clocaldev-host>` | 80 |\n\n# Self-check before returning\n\n- [ ] Every file cited has been read; no claim references an unopened file.\n- [ ] Output matches the format above.\n- [ ] Uncertain claims tagged `[LOW-CONFIDENCE]`.\n- [ ] No hardcoded paths or environment-specific values leaked.\n- [ ] Pre-deploy checklist script was run and exited 0.\n- [ ] `helm upgrade --dry-run` was executed before the live deploy.\n- [ ] No `NEXT_PUBLIC_*` variables were passed as `--build-arg` (build-time bake violates 12-factor; use `window.__ENV__` runtime bridge).\n- [ ] Registry URL used `$IMAGE_REGISTRY` variable, not a hardcoded GCP project ID.\n- [ ] All pods in target namespace are Running.\n- [ ] Health endpoint returned HTTP 200.\n- [ ] Version-pinning audit trail was updated (staging\u002Fproduction only, if the project uses one).\n- [ ] No `--push` command was run without the operator understanding it writes to the shared registry.\n\n# Common mistakes to avoid\n\n- DO NOT use `NEXT_PUBLIC_*` as Docker `--build-arg` -- this bakes environment-specific values into the image, violating 12-factor build-once\u002Fdeploy-anywhere. Use the `window.__ENV__` runtime bridge pattern instead (server renders `\u003Cscript>window.__ENV__={...}\u003C\u002Fscript>`, client reads from `window.__ENV__`).\n- DO NOT hardcode GCP project IDs in commands -- use the `$IMAGE_REGISTRY` variable.\n- DO NOT run the live deploy before the dry-run -- always `--dry-run` first.\n- DO NOT skip `helm dependency update` after modifying subchart Chart.yaml versions.\n- DO NOT run `--push` to the shared registry without confirming the intended tag -- pushes are not easily reversible.\n- DO NOT deploy to production without an approved merge request.\n- DO NOT use `latest` tag in any environment.\n- DO NOT confuse this skill with `release-promotion` -- this skill deploys to one environment; `release-promotion` manages the digest handoff across environments.\n\n# Escalation\n\n- Stop and ask when: Target is production and there is no approved MR.\n- Stop and ask when: Dry-run shows any stop condition (PVC deletion, replica decrease >50%, resource limits removed, namespace change).\n- Stop and ask when: Post-deploy verification fails after 2 retry cycles (pods not Running, health endpoint not responding).\n- Stop and ask when: The image tag does not exist in the registry.\n- Refuse and explain when: Asked to deploy to production without confirmed approved MR URL. Required: operator must provide the MR URL before the skill proceeds with production deploy commands.\n\n\u003Cexamples>\n\u003Cexample>\n\u003Cuser_task>Deploy the web portal to localdev after a new feature merge\u003C\u002Fuser_task>\n\u003Cprocedure_trace>\nStep 1: Validate prerequisites\n  gcloud auth print-access-token > \u002Fdev\u002Fnull 2>&1  # Auth valid\n  kubectl get nodes                                  # Cluster accessible\n\nStep 2: Pre-deploy checklist\n  .claude\u002Fskills\u002Fdeployment\u002Fscripts\u002Fdeploy-checklist.sh \u003Cmain-app> abc1234 charts\u002F\u003Capp>\u002F\n\nStep 3: Dry-run\n  helm upgrade --install \u003Crelease> charts\u002F\u003Capp>\u002F -f charts\u002F\u003Capp>\u002Fvalues.localdev.yaml --dry-run\n  # Reviewed: no PVC deletions, no replica decreases, no namespace changes.\n\nStep 4: Deploy\n  helm upgrade --install \u003Crelease> charts\u002F\u003Capp>\u002F -f charts\u002F\u003Capp>\u002Fvalues.localdev.yaml\n\nStep 5: Verify\n  kubectl get pods -n \u003Capp-namespace>\n  # NAME                                READY   STATUS    RESTARTS\n  # \u003Crelease>-\u003Capp>-7b9f8c6d4-x2k9m    1\u002F1     Running   0\n\n  curl http:\u002F\u002F\u003Clocaldev-host>\u002Fapi\u002Fhealth\n  # {\"status\":\"ok\"}\n\u003C\u002Fprocedure_trace>\n\u003Coutput>\nDeploy: \u003Capp> -> localdev\nImage: $IMAGE_REGISTRY\u002F\u003Cmain-app>:abc1234\nHelm revision: 12\nPod status: 1 Running\nHealth endpoint: 200 OK\nAudit trail: skipped (localdev)\n\u003C\u002Foutput>\n\u003C\u002Fexample>\n\u003C\u002Fexamples>\n\n# Failure modes\n\n- Mode: ImagePullBackOff -- symptom: pod stuck in ImagePullBackOff -- detection: `kubectl describe pod` shows auth error -- action: re-authenticate with `gcloud auth login && gcloud auth configure-docker \u003Cregion>-docker.pkg.dev`, then regenerate the registry pull secret via the chart repo's docker-secret helper script\n- Mode: Stale subchart -- symptom: Helm chart changes not applied after deploy -- detection: `helm template` output does not include expected changes -- action: bump version in subchart `Chart.yaml`, bump dependency version in parent `Chart.yaml`, run `helm dependency update charts\u002F\u003Capp>\u002F`\n- Mode: CrashLoopBackOff -- symptom: pod restarts repeatedly -- detection: `kubectl logs -n \u003Cns> \u003Cpod> --previous` shows error -- action: check for missing env vars in values.yaml, wrong image tag, or failing health probe\n- Mode: Rollback needed -- symptom: deploy succeeded but application is broken -- detection: health endpoint returns non-200 or telemetry not flowing -- action: `helm rollback \u003Crelease> \u003Crevision> -n \u003Cnamespace>`, then update the version-pinning repo (if the project uses one)\n\n# Related skills\n\n- `docker-build` -- defer to docker-build for image creation; deployment consumes the built image\n- `helm-chart-expert` -- defer to helm-chart-expert for chart template modifications; compose when a deploy failure traces to a template bug\n- `gitlab-ci-cd` -- defer to gitlab-ci-cd for pipeline configuration; deployment is the runtime execution\n- `release-promotion` -- defer to release-promotion for cross-environment digest promotion; deployment handles the single-environment Helm upgrade that release-promotion orchestrates\n- `kubernetes-deployment` -- defer to kubernetes-deployment for cluster-level infrastructure (Minikube management, firewall rules, tunnel debugging)\n\n# How to use\n\n## What it does\n\nThis skill runs one Helm deploy against one Kubernetes cluster that already exists, then proves the deploy worked. It walks you through prerequisite checks, a mandatory dry-run, the live `helm upgrade --install`, pod and health-endpoint verification, and the audit-trail update for shared environments. You end up with a short status report instead of a pile of raw `kubectl` output.\n\n## When to use it\n\n- You want to ship a built image to local dev, staging, or production and confirm it came up healthy.\n- A deploy already happened and you need post-deploy verification: pod health, health endpoint, ingress routes.\n- A release went bad in one environment and you need `helm rollback` plus the follow-up audit update.\n- You want to read the current state of a release — `helm list`, `helm history`, pod status.\n\n## When not to use it\n\n- Building or pushing the image itself — use the `docker-build` skill.\n- Editing chart templates or values structure — use the `helm-chart-expert` skill.\n- Moving an image digest across environments — use the `release-promotion` skill.\n- Cluster-level work such as Minikube lifecycle, firewall rules, or tunnels — use the `kubernetes-deployment` skill.\n\n## How to invoke\n\n```\nSkill(skill: \"infra-pack:deployment\")\n```\n\nInvoke it, then say which environment, chart, values file, and image tag you are deploying.\n\n## Inputs\n\n- `environment` — `localdev`, your staging alias, or `production` — required.\n- `chart_path` — path to the Helm chart, e.g. `charts\u002F\u003Capp>\u002F` — required.\n- `values_file` — the environment values file, e.g. `values.localdev.yaml` — required.\n- `image_tag` — a git short hash or semver; never `latest` — required.\n\n## What you get back\n\nA status report of at most 30 lines in the reply: chart and target environment, the deployed image reference, the new Helm revision, pod counts by state, the health-endpoint status code, and whether the audit trail was updated or skipped. Verbose logs and dry-run diffs stay in a collapsible block. Side effects are real: the cluster changes and the Helm revision increments.\n\n## Worked example\n\n```\nSkill(skill: \"infra-pack:deployment\")\nDeploy the web portal to localdev at image tag abc1234, chart charts\u002F\u003Capp>\u002F.\n\n→ auth + cluster + registry checks pass\n→ pre-deploy checklist script exits 0\n→ helm upgrade --dry-run reviewed: no PVC deletion, no replica drop\n→ helm upgrade --install runs; history shows revision 12 deployed\n→ 1\u002F1 pod Running, \u002Fapi\u002Fhealth returns 200\n\nDeploy: \u003Capp> -> localdev\nImage: $IMAGE_REGISTRY\u002F\u003Cmain-app>:abc1234\nHelm revision: 12\nPod status: 1 Running\nHealth endpoint: 200 OK\nAudit trail: skipped (localdev)\n```\n\n## Related\n\n- `docker-build` — build and push the image before you deploy it.\n- `helm-chart-expert` — change chart templates when a deploy failure traces to one.\n- `release-promotion` — promote a digest from one environment to the next.\n- `kubernetes-deployment` — cluster-level infrastructure rather than a single release.\n","# Purpose\n\nOrchestrate the project's service deployments across local-dev (Minikube), the staging environment (project.json → cloud.envAlias; typically a cloud VM + Minikube), and production (e.g. edge device + k3s) using Helm, producing a deploy status report with pod health and endpoint verification. This skill covers the single-environment deploy-and-verify cycle; it defers image building to `docker-build`, chart template authoring to `helm-chart-expert`, and cross-environment promotion to `release-promotion`.\n\n# When to use this skill\n\n- Trigger A -- Deploying a Helm release to any single project environment\n- Trigger B -- Running post-deployment verification (pod health, endpoint checks, ingress validation)\n- Trigger C -- Rolling back a failed Helm release within the same environment\n- Trigger D -- Inspecting current deploy state (helm list, helm history, pod status)\n\n# When NOT to use this skill\n\n- Anti-trigger A -- Building or pushing Docker images -> use `docker-build` instead\n- Anti-trigger B -- Writing or modifying Helm chart templates -> use `helm-chart-expert` instead\n- Anti-trigger C -- CI\u002FCD pipeline configuration -> use `gitlab-ci-cd` instead\n- Anti-trigger D -- Production deploy without an approved merge request -> stop and escalate\n- Anti-trigger E -- Staging-environment operational recovery (SSH debugging, secret rotation, VM recovery) -> follow the project's environment runbooks; cluster-level pieces belong to `kubernetes-deployment`\n- Anti-trigger F -- Promoting an image across environments (dev -> staging -> production) -> use `release-promotion` instead\n- Anti-trigger G -- Cluster-level infrastructure ops (Minikube management, GCP firewall, tunnel debugging) -> use `kubernetes-deployment` instead\n\n# Required environment\n\n- Runtime mount: `.claude\u002Fskills\u002Fdeployment\u002FSKILL.md`\n- Tools \u002F libraries: `helm` (v3+), `kubectl`, `gcloud` CLI, SSH access (for staging\u002Fproduction)\n- Bundled resources:\n  - `.claude\u002Fskills\u002Fdeployment\u002Fscripts\u002Fdeploy-checklist.sh` -- pre-deploy validation\n  - `.claude\u002Fskills\u002Fdeployment\u002Fresources\u002Fenvironments.md` -- environment coordinates\n- Reversibility profile: hard-to-reverse -- confirm before applying to shared clusters; `helm rollback` can revert but causes pod disruption\n\n# Inputs\n\n- `environment: \"localdev\" | \"\u003CenvAlias>\" | \"production\"` -- target environment (staging alias from project.json → cloud.envAlias)\n- `chart_path: string` -- path to the Helm chart (e.g., `charts\u002F\u003Capp>\u002F`)\n- `values_file: string` -- environment-specific values file (e.g., `values.localdev.yaml`)\n- `image_tag: string` -- the image tag to deploy (git short hash or semver)\n\n# Outputs\n\n- Format: Deploy status report inlined in agent response\n- Length budget: max 30 lines for the status report; verbose pod logs or dry-run diffs go in a collapsible block\n- Output template:\n  ```\n  Deploy: {chart} -> {environment}\n  Image: {registry}\u002F{image}:{tag}\n  Helm revision: {N}\n  Pod status: {count} Running, {count} other\n  Health endpoint: {status code}\n  Audit trail: {updated | skipped (localdev)}\n  ```\n\n# Procedure\n\n1. **Validate prerequisites** -- Confirm GCP auth (`gcloud auth print-access-token`), kubectl cluster access (`kubectl get nodes`), and image existence in registry (`gcloud artifacts docker images describe $IMAGE_REGISTRY\u002F$IMAGE:$TAG`). Use `$IMAGE_REGISTRY` environment variable for the registry URL (do not hardcode GCP project IDs). Checkpoint: All three checks pass. If any fails, stop and report which prerequisite is missing.\n\n2. **Run pre-deploy checklist** -- Execute `.claude\u002Fskills\u002Fdeployment\u002Fscripts\u002Fdeploy-checklist.sh \u003Cimage-name> \u003Cimage-tag> \u003Cchart-path>` to validate chart lint, template render, and image availability. Checkpoint: Script exits 0.\n\n3. **Dry-run first** -- Always run `helm upgrade --install --dry-run` (or the chart repo's environment wrapper with its dry-run flag, if one exists) before the live deploy. Review the rendered manifests for stop conditions.\n\n   ```bash\n   # Local dev\n   helm upgrade --install \u003Crelease> charts\u002F\u003Capp>\u002F -f charts\u002F\u003Capp>\u002Fvalues.localdev.yaml --dry-run\n\n   # Staging (\u003CenvAlias>)\n   ssh \u003Cstaging-host> \"cd \u003Cchart-repo> && helm upgrade --install \u003Crelease> charts\u002F\u003Capp>\u002F -f charts\u002F\u003Capp>\u002Fvalues.\u003CenvAlias>.yaml --dry-run\"\n   ```\n\n   Checkpoint: Dry-run output reviewed. STOP if any of these appear: `kind: PersistentVolumeClaim` being deleted, replica count decrease >50%, resource limits removed entirely, namespace change, or `kind: ServiceAccount` deleted. Otherwise proceed.\n\n4. **Run helm diff** -- If `helm-diff` plugin is available, run `helm diff upgrade` to see a colored diff of what will change. Checkpoint: Diff reviewed and accepted by the operator.\n\n5. **Deploy** -- Execute the live deploy command. Side effect: This modifies the target Kubernetes cluster. The Helm release revision increments.\n\n   ```bash\n   # Local dev\n   helm upgrade --install \u003Crelease> charts\u002F\u003Capp>\u002F -f charts\u002F\u003Capp>\u002Fvalues.localdev.yaml\n\n   # Staging (\u003CenvAlias>)\n   ssh \u003Cstaging-host> \"cd \u003Cchart-repo> && helm upgrade --install \u003Crelease> charts\u002F\u003Capp>\u002F -f charts\u002F\u003Capp>\u002Fvalues.\u003CenvAlias>.yaml\"\n   ```\n\n   Checkpoint: `helm history` shows the new revision with status `deployed`.\n\n6. **Post-deploy verification** -- Run all checks:\n   - `kubectl get pods -n \u003Cnamespace>` -- all pods in Running state within 120 seconds\n   - `curl http:\u002F\u002F\u003Cendpoint>\u002Fapi\u002Fhealth` -- returns HTTP 200\n   - `kubectl get ingress -A` -- ingress routes match expected hostnames\n\n   Checkpoint: All pods Running, health endpoint returns 200, ingress routes correct.\n\n7. **Update audit trail** -- After a successful staging or production deploy, update the version-pinning repo, if the project uses one (project.json → repos), via a commit or MR. Fields to update: `image_tag`, `chart_version`, `deployed_at` (ISO 8601 timestamp), `helm_revision`. This is not optional for shared environments. Checkpoint: Version file committed or MR opened.\n\n### Environments Reference\n\n| Environment | Infra | Namespace | Access |\n|-------------|-------|-----------|--------|\n| localdev | Minikube | `\u003Capp-namespace>` | `*.\u003Clocaldev-host>` via \u002Fetc\u002Fhosts |\n| `\u003CenvAlias>` (staging) | Cloud VM + Minikube | `\u003Capp-namespace>` | SSH tunnel |\n| production | Edge device + k3s (or managed cluster) | `\u003Capp-namespace>` | Direct |\n\n### Service Ports (localdev)\n\n| Service | Domain | Port |\n|---------|--------|------|\n| Web portal | `\u003Clocaldev-host>` | 80 |\n| Device N | `dN.\u003Clocaldev-host>` | 80 |\n| Keycloak | `keycloak.\u003Clocaldev-host>` | 80 |\n| PgAdmin | `pgadmin.\u003Clocaldev-host>` | 80 |\n\n# Self-check before returning\n\n- [ ] Every file cited has been read; no claim references an unopened file.\n- [ ] Output matches the format above.\n- [ ] Uncertain claims tagged `[LOW-CONFIDENCE]`.\n- [ ] No hardcoded paths or environment-specific values leaked.\n- [ ] Pre-deploy checklist script was run and exited 0.\n- [ ] `helm upgrade --dry-run` was executed before the live deploy.\n- [ ] No `NEXT_PUBLIC_*` variables were passed as `--build-arg` (build-time bake violates 12-factor; use `window.__ENV__` runtime bridge).\n- [ ] Registry URL used `$IMAGE_REGISTRY` variable, not a hardcoded GCP project ID.\n- [ ] All pods in target namespace are Running.\n- [ ] Health endpoint returned HTTP 200.\n- [ ] Version-pinning audit trail was updated (staging\u002Fproduction only, if the project uses one).\n- [ ] No `--push` command was run without the operator understanding it writes to the shared registry.\n\n# Common mistakes to avoid\n\n- DO NOT use `NEXT_PUBLIC_*` as Docker `--build-arg` -- this bakes environment-specific values into the image, violating 12-factor build-once\u002Fdeploy-anywhere. Use the `window.__ENV__` runtime bridge pattern instead (server renders `\u003Cscript>window.__ENV__={...}\u003C\u002Fscript>`, client reads from `window.__ENV__`).\n- DO NOT hardcode GCP project IDs in commands -- use the `$IMAGE_REGISTRY` variable.\n- DO NOT run the live deploy before the dry-run -- always `--dry-run` first.\n- DO NOT skip `helm dependency update` after modifying subchart Chart.yaml versions.\n- DO NOT run `--push` to the shared registry without confirming the intended tag -- pushes are not easily reversible.\n- DO NOT deploy to production without an approved merge request.\n- DO NOT use `latest` tag in any environment.\n- DO NOT confuse this skill with `release-promotion` -- this skill deploys to one environment; `release-promotion` manages the digest handoff across environments.\n\n# Escalation\n\n- Stop and ask when: Target is production and there is no approved MR.\n- Stop and ask when: Dry-run shows any stop condition (PVC deletion, replica decrease >50%, resource limits removed, namespace change).\n- Stop and ask when: Post-deploy verification fails after 2 retry cycles (pods not Running, health endpoint not responding).\n- Stop and ask when: The image tag does not exist in the registry.\n- Refuse and explain when: Asked to deploy to production without confirmed approved MR URL. Required: operator must provide the MR URL before the skill proceeds with production deploy commands.\n\n\u003Cexamples>\n\u003Cexample>\n\u003Cuser_task>Deploy the web portal to localdev after a new feature merge\u003C\u002Fuser_task>\n\u003Cprocedure_trace>\nStep 1: Validate prerequisites\n  gcloud auth print-access-token > \u002Fdev\u002Fnull 2>&1  # Auth valid\n  kubectl get nodes                                  # Cluster accessible\n\nStep 2: Pre-deploy checklist\n  .claude\u002Fskills\u002Fdeployment\u002Fscripts\u002Fdeploy-checklist.sh \u003Cmain-app> abc1234 charts\u002F\u003Capp>\u002F\n\nStep 3: Dry-run\n  helm upgrade --install \u003Crelease> charts\u002F\u003Capp>\u002F -f charts\u002F\u003Capp>\u002Fvalues.localdev.yaml --dry-run\n  # Reviewed: no PVC deletions, no replica decreases, no namespace changes.\n\nStep 4: Deploy\n  helm upgrade --install \u003Crelease> charts\u002F\u003Capp>\u002F -f charts\u002F\u003Capp>\u002Fvalues.localdev.yaml\n\nStep 5: Verify\n  kubectl get pods -n \u003Capp-namespace>\n  # NAME                                READY   STATUS    RESTARTS\n  # \u003Crelease>-\u003Capp>-7b9f8c6d4-x2k9m    1\u002F1     Running   0\n\n  curl http:\u002F\u002F\u003Clocaldev-host>\u002Fapi\u002Fhealth\n  # {\"status\":\"ok\"}\n\u003C\u002Fprocedure_trace>\n\u003Coutput>\nDeploy: \u003Capp> -> localdev\nImage: $IMAGE_REGISTRY\u002F\u003Cmain-app>:abc1234\nHelm revision: 12\nPod status: 1 Running\nHealth endpoint: 200 OK\nAudit trail: skipped (localdev)\n\u003C\u002Foutput>\n\u003C\u002Fexample>\n\u003C\u002Fexamples>\n\n# Failure modes\n\n- Mode: ImagePullBackOff -- symptom: pod stuck in ImagePullBackOff -- detection: `kubectl describe pod` shows auth error -- action: re-authenticate with `gcloud auth login && gcloud auth configure-docker \u003Cregion>-docker.pkg.dev`, then regenerate the registry pull secret via the chart repo's docker-secret helper script\n- Mode: Stale subchart -- symptom: Helm chart changes not applied after deploy -- detection: `helm template` output does not include expected changes -- action: bump version in subchart `Chart.yaml`, bump dependency version in parent `Chart.yaml`, run `helm dependency update charts\u002F\u003Capp>\u002F`\n- Mode: CrashLoopBackOff -- symptom: pod restarts repeatedly -- detection: `kubectl logs -n \u003Cns> \u003Cpod> --previous` shows error -- action: check for missing env vars in values.yaml, wrong image tag, or failing health probe\n- Mode: Rollback needed -- symptom: deploy succeeded but application is broken -- detection: health endpoint returns non-200 or telemetry not flowing -- action: `helm rollback \u003Crelease> \u003Crevision> -n \u003Cnamespace>`, then update the version-pinning repo (if the project uses one)\n\n# Related skills\n\n- `docker-build` -- defer to docker-build for image creation; deployment consumes the built image\n- `helm-chart-expert` -- defer to helm-chart-expert for chart template modifications; compose when a deploy failure traces to a template bug\n- `gitlab-ci-cd` -- defer to gitlab-ci-cd for pipeline configuration; deployment is the runtime execution\n- `release-promotion` -- defer to release-promotion for cross-environment digest promotion; deployment handles the single-environment Helm upgrade that release-promotion orchestrates\n- `kubernetes-deployment` -- defer to kubernetes-deployment for cluster-level infrastructure (Minikube management, firewall rules, tunnel debugging)\n\n# How to use\n\n## What it does\n\nThis skill runs one Helm deploy against one Kubernetes cluster that already exists, then proves the deploy worked. It walks you through prerequisite checks, a mandatory dry-run, the live `helm upgrade --install`, pod and health-endpoint verification, and the audit-trail update for shared environments. You end up with a short status report instead of a pile of raw `kubectl` output.\n\n## When to use it\n\n- You want to ship a built image to local dev, staging, or production and confirm it came up healthy.\n- A deploy already happened and you need post-deploy verification: pod health, health endpoint, ingress routes.\n- A release went bad in one environment and you need `helm rollback` plus the follow-up audit update.\n- You want to read the current state of a release — `helm list`, `helm history`, pod status.\n\n## When not to use it\n\n- Building or pushing the image itself — use the `docker-build` skill.\n- Editing chart templates or values structure — use the `helm-chart-expert` skill.\n- Moving an image digest across environments — use the `release-promotion` skill.\n- Cluster-level work such as Minikube lifecycle, firewall rules, or tunnels — use the `kubernetes-deployment` skill.\n\n## How to invoke\n\n```\nSkill(skill: \"infra-pack:deployment\")\n```\n\nInvoke it, then say which environment, chart, values file, and image tag you are deploying.\n\n## Inputs\n\n- `environment` — `localdev`, your staging alias, or `production` — required.\n- `chart_path` — path to the Helm chart, e.g. `charts\u002F\u003Capp>\u002F` — required.\n- `values_file` — the environment values file, e.g. `values.localdev.yaml` — required.\n- `image_tag` — a git short hash or semver; never `latest` — required.\n\n## What you get back\n\nA status report of at most 30 lines in the reply: chart and target environment, the deployed image reference, the new Helm revision, pod counts by state, the health-endpoint status code, and whether the audit trail was updated or skipped. Verbose logs and dry-run diffs stay in a collapsible block. Side effects are real: the cluster changes and the Helm revision increments.\n\n## Worked example\n\n```\nSkill(skill: \"infra-pack:deployment\")\nDeploy the web portal to localdev at image tag abc1234, chart charts\u002F\u003Capp>\u002F.\n\n→ auth + cluster + registry checks pass\n→ pre-deploy checklist script exits 0\n→ helm upgrade --dry-run reviewed: no PVC deletion, no replica drop\n→ helm upgrade --install runs; history shows revision 12 deployed\n→ 1\u002F1 pod Running, \u002Fapi\u002Fhealth returns 200\n\nDeploy: \u003Capp> -> localdev\nImage: $IMAGE_REGISTRY\u002F\u003Cmain-app>:abc1234\nHelm revision: 12\nPod status: 1 Running\nHealth endpoint: 200 OK\nAudit trail: skipped (localdev)\n```\n\n## Related\n\n- `docker-build` — build and push the image before you deploy it.\n- `helm-chart-expert` — change chart templates when a deploy failure traces to one.\n- `release-promotion` — promote a digest from one environment to the next.\n- `kubernetes-deployment` — cluster-level infrastructure rather than a single release.\n",{"docs":24,"name":5,"owner":28,"version":29,"description":7},{"status":25,"updated":26,"source_sha":27},"reviewed",1785974400000,"4112200c69a3","swarmery-infra","1.0.0","main","2d9e918cc79c9b17b59356780ff0a3da38a3e98a","plugins\u002Finfra-pack\u002Fskills\u002Fdeployment",5,"https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery","https:\u002F\u002Fatretyak1985.github.io\u002Fswarmery\u002F","https:\u002F\u002Fgithub.com\u002Fatretyak1985","2026-11-11 04:29:12",{"source":8,"skillName":5,"commands":39,"prompt":49,"zipAvailable":50},[40,43,46],{"tool":41,"command":42},"npx","npx skills add atretyak1985\u002Fswarmery --skill deployment",{"tool":44,"command":45},"bunx","bunx skills add atretyak1985\u002Fswarmery --skill deployment",{"tool":47,"command":48},"pnpm","pnpm dlx skills add atretyak1985\u002Fswarmery --skill deployment","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery\u002Fblob\u002Fmain\u002Fplugins\u002Finfra-pack\u002Fskills\u002Fdeployment\u002FSKILL.md",true,[52,58],{"path":53,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":56,"sourceHtmlUrl":57},"resources\u002Fenvironments.md","REFERENCE","参考文档",1938,"https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery\u002Fblob\u002Fmain\u002Fplugins\u002Finfra-pack\u002Fskills\u002Fdeployment\u002Fresources\u002Fenvironments.md",{"path":59,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":62,"sourceHtmlUrl":63},"scripts\u002Fdeploy-checklist.sh","SCRIPT","脚本",1632,"https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery\u002Fblob\u002Fmain\u002Fplugins\u002Finfra-pack\u002Fskills\u002Fdeployment\u002Fscripts\u002Fdeploy-checklist.sh",[65,72,78,85,92,99],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M78D4T1FFWFW19Z44AHH5BSY","short-desc","Too short.","https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery\u002Fblob\u002Fmain\u002Ftools\u002Fswarmery\u002Ftestdata\u002Fsysconfig\u002Fclaude\u002Fskills\u002Fshort-desc\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M78D4S0TWT42WXFJHC1DBN0R","no-frontmatter","https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery\u002Fblob\u002Fmain\u002Ftools\u002Fswarmery\u002Ftestdata\u002Fsysconfig\u002Fclaude\u002Fskills\u002Fno-frontmatter\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M78D4Q14P8DJ4W78N62F3EG2","global-skill","Fixture global skill (minimal user-scope shape, format doc §2.3).","https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery\u002Fblob\u002Fmain\u002Ftools\u002Fswarmery\u002Ftestdata\u002Fsysconfig\u002Fclaude\u002Fskills\u002Fglobal-skill\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M78D4N1JHGQJQ7EZ43KY5SV3","documented-skill","Fixture skill whose usage guide deliberately omits the Worked example subsection.","https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery\u002Fblob\u002Fmain\u002Ftools\u002Fswarmery\u002Ftestdata\u002Fsysconfig\u002Fclaude\u002Fskills\u002Fdocumented-skill\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":19},"01M78D4KVNZ03GBKGDFJZWW5FJ","z","NOT auto-discovered — only skills\u002F is scanned for plugins (§2.2).","https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery\u002Fblob\u002Fmain\u002Ftools\u002Fswarmery\u002Ftestdata\u002Fsysconfig\u002Fclaude\u002Fplugins\u002Fcache\u002Fmkt\u002Ftoolpack\u002F1.0.0\u002Fworkflow-skills\u002Fz\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":19},"01M78D4JMBRZWK51HFE5RZJGHC","y","Plugin skill y from toolpack — stored as \"toolpack:y\".","https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery\u002Fblob\u002Fmain\u002Ftools\u002Fswarmery\u002Ftestdata\u002Fsysconfig\u002Fclaude\u002Fplugins\u002Fcache\u002Fmkt\u002Ftoolpack\u002F1.0.0\u002Fskills\u002Fy\u002FSKILL.md",[],[]]