# Skill — `onboard-app` > **Layer:** Layer 1 — agent generates diff(s) and opens PR(s); humans review and Sync. > **Scope:** the slice that lives in `devops-infra-helm-charts`. The matching Argo `Application` slice is in `github.com/Meesho/devops-infra-argo-config` and is paired but separate. This skill is the agent-callable form of [docs/platform/procedures/onboard-app-to-cluster.md](../../docs/platform/procedures/onboard-app-to-cluster.md). --- ## When to use Triggers like: - "Onboard `` to ``." - "Add a `kube-state-metrics` override for `k8s-foo-prd-ase1`." - "Bring up `external-dns` on the new cluster." Do **not** use this skill for: - Adding a brand-new cluster (use the `onboard-new-cluster` procedure). - Bumping a chart's version (use `bump-chart-version`). - Migrating a chart blue-green (use the `blue-green-chart-migration` procedure directly). --- ## Input Required: ```yaml app: # must exist in helm-templates/ target_cluster: # must exist in helm-overrides/ release_name: # often == app workload_namespace: # the K8s namespace pods run in image_tag: # NEVER 'latest' resources: cpu_request: memory_request: cpu_limit: memory_limit: node_pool_key: node_pool_value: ``` Optional: ```yaml needs_external_dns: # if true, add a Service to external-dns-services/ needs_external_secret: # if true, add an ExternalSecret to external-secrets/ needs_compute_class: # if true (Autopilot), add a ComputeClass under computeclass/ replicas: persistence: enabled: storage_class: # MUST exist in manifests/storageclass/ size: ``` --- ## Steps (deterministic) 1. **Verify pre-conditions.** ```bash ls helm-templates//Chart.yaml # chart exists ls helm-overrides// # cluster exists ! ls helm-overrides/// # app not already onboarded here ls manifests/storageclass/.yaml # if persistence.enabled ``` 2. **Read the cluster's scheduling profile.** Sample a sibling app on the **same** cluster: ```bash ls helm-overrides// | grep -v '^contour' | head -3 yq e '.nodeSelector' helm-overrides///custom-values.yaml ``` Confirm the agent's `node_pool_key` matches the cluster's actual style (`dedicated:` vs `cloud.google.com/compute-class:`). Mismatch → **fail fast** and ask. 3. **Generate `helm-overrides///custom-values.yaml`.** Use this template: ```yaml image: registry: asia-southeast1-docker.pkg.dev repository: meesho-devops-admin-0622/admin/sre/ tag: pullPolicy: IfNotPresent replicaCount: resources: requests: cpu: memory: limits: cpu: memory: nodeSelector: : tolerations: - key: value: effect: NoSchedule # if persistence.enabled persistence: enabled: true storageClass: size: accessModes: [ReadWriteOnce] ``` 4. **(If `needs_external_dns: true`)** Generate `helm-overrides///external-dns-services/.yaml` per [raw-manifest-sidecar-schema.md §Service for external-dns binding](../../docs/platform/schemas/raw-manifest-sidecar-schema.md). Sample a sibling cluster's pattern. 5. **(If `needs_external_secret: true`)** Generate an `ExternalSecret` under `helm-overrides//external-secrets/`. Verify the cluster has a `SecretStore` / `ClusterSecretStore` (sample sibling apps' `existingSecret:` references). 6. **(If `needs_compute_class: true`)** Generate `helm-overrides///computeclass/.yaml`. The `metadata.name` MUST equal ``. 7. **Validate.** ```bash yamllint helm-overrides///custom-values.yaml helm template helm-templates/ \ -f helm-overrides///custom-values.yaml > /dev/null ``` Render must succeed. If it errors, fail and surface the error. 8. **Open the PR.** ```bash git checkout -b onboard/-on- git add helm-overrides/// git commit -m "Onboard to " git push origin onboard/-on- gh pr create --base main --title "Onboard to " ``` PR body (use a heredoc): ```markdown ## Summary Onboards `` to ``. - Procedure: `docs/platform/procedures/onboard-app-to-cluster.md` - Skill: `skills/infra/onboard-app.md` - Sister-repo PR: ## Validation - `yamllint` passed - `helm template` rendered cleanly - Scheduling profile verified against sibling apps on `` ## Approvers - App owner: - Cluster owner: ## CMR ``` --- ## Output A single PR diff containing 1–3+ new files in this repo: - `helm-overrides///custom-values.yaml` - (optional) `helm-overrides///external-dns-services/.yaml` - (optional) `helm-overrides///computeclass/.yaml` - (optional) `helm-overrides//external-secrets/.yaml` The skill does **not**: - Open the sister-repo PR (separate skill / manual). It must be drafted by the user or a follow-up step. - Run `argocd app sync` (Layer 1 boundary). - Modify `helm-templates//`. - Modify `repository.yaml`. --- ## Pattern reference A clean recent onboarding to compare against: pick any merged PR titled "Onboard ... to k8s-...". `git log --oneline --grep='Onboard' -i | head -10`. --- ## Gotchas 1. **Don't copy a sibling cluster's values verbatim** — per-cluster scheduling differs ([SANCTITY_RULES R5](../../docs/global/SANCTITY_RULES.md)). 2. **Don't set `automated.{prune,selfHeal}` in the sister-repo Application** ([ADR-A5](../../wiki/analyses/ADR-A5-manual-sync-default-for-infra.md)). 3. **Verify `image.tag`** is real before opening the PR — Argo CD only catches a missing tag at sync time. 4. **The release name (`metadata.name` of the resulting `Application`) is set in the sister repo, not here.** Don't assume it; verify with the user. 5. **For Contour**, always cross-reference [contour-nodeselector-tolerations-summary.md](../../contour-nodeselector-tolerations-summary.md) — the matrix is load-bearing. --- ## Layer constraint Layer 1. Open the PR; do not merge it; do not Sync. Reviewer + sister-repo PR + Argo CD UI Sync click are the human gates. --- ## Related - Procedure: [onboard-app-to-cluster.md](../../docs/platform/procedures/onboard-app-to-cluster.md). - Schema: [custom-values-schema.md](../../docs/platform/schemas/custom-values-schema.md). - Boundaries: [AGENT_BOUNDARIES.md](../../docs/global/AGENT_BOUNDARIES.md).