3.5 KiB
3.5 KiB
Per AI Blitz Plan §5.5. Layer: 1-T.
Skill — Onboard a New Cluster
Parameterised skill for adding a new GKE cluster to the ArgoCD infrastructure control plane.
Full procedure: docs/platform/procedures/add-new-cluster.md
Inputs
| Parameter | Example | Required |
|---|---|---|
CLUSTER_NAME |
k8s-dsgpu-prd-ase1 |
yes |
ENV |
prd |
yes |
INITIAL_TOOLS |
keda,external-secrets,contour-internal |
no (default: empty appSpec) |
Env → branch / namespace / values-dir:
| ENV | Branch | ArgoCD namespace | Values dir | Incubator dir |
|---|---|---|---|---|
prd |
main |
argocd-prd |
values/prd/ |
incubator/prd/ |
stg / dev |
develop |
argocd-dev |
values/dev/ |
incubator/infra/ |
int |
pre-prod |
argocd-shared-int |
values/int/ |
incubator/int/ |
Pre-flight checks
# 1. Verify GKE cluster exists and is registered as an ArgoCD destination
argocd cluster list | grep <CLUSTER_NAME>
# 2. Verify helm-overrides directory exists in sister repo
ls ../devops-infra-helm-charts/helm-overrides/<CLUSTER_NAME>/
# 3. Check no incubator file already exists for this cluster
ls incubator/<env>/incubator-infra-<CLUSTER_NAME>.yaml 2>/dev/null && echo "ALREADY EXISTS"
Step 1: Create incubator file
File: incubator/<env>/incubator-infra-<CLUSTER_NAME>.yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: incubator-infra-<CLUSTER_NAME>
namespace: <ARGOCD_NAMESPACE>
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: default
source:
repoURL: 'https://github.com/Meesho/devops-infra-argo-config'
targetRevision: <BRANCH>
path: generic-argo-apps-chart
helm:
valueFiles:
- ../values/<ENV>/incubator-infra-<CLUSTER_NAME>-values.yaml
destination:
name: in-cluster
namespace: <ARGOCD_NAMESPACE>
Invariant (R9): metadata.name must exactly equal the filename without .yaml.
Step 2: Create values file
File: values/<ENV>/incubator-infra-<CLUSTER_NAME>-values.yaml
clusterSpec:
destination:
server: ""
name: "<CLUSTER_NAME>"
argocdSpec:
namespace: <ARGOCD_NAMESPACE>
teamSpec:
devops:
source:
repoURL: https://github.com/Meesho/devops-infra-helm-charts
targetRevision: <BRANCH>
path: helm-templates
valueFiles: ../../helm-overrides/<CLUSTER_NAME>
labels:
bu: infra
team: devops
env: <ENV>
cluster: <CLUSTER_NAME>
appSpec: []
Start with appSpec: []. Add tools via add-tool.md in a follow-up PR.
Step 3: Validate
helm template generic-argo-apps-chart/ \
-f values/<ENV>/incubator-infra-<CLUSTER_NAME>-values.yaml
yamllint incubator/<env>/incubator-infra-<CLUSTER_NAME>.yaml
yamllint values/<ENV>/incubator-infra-<CLUSTER_NAME>-values.yaml
Step 4: Open PR
git checkout -b onboard-cluster-<CLUSTER_NAME>
git add incubator/<env>/incubator-infra-<CLUSTER_NAME>.yaml \
values/<ENV>/incubator-infra-<CLUSTER_NAME>-values.yaml
git commit -m "feat: onboard cluster <CLUSTER_NAME> to ArgoCD infra control plane"
git push origin HEAD
PR target branch: <BRANCH> (matches environment).
Blast radius
New cluster only. Existing clusters and their appSpec entries are unaffected. The incubator renders zero child Applications until appSpec entries are added.