Skip to content

Commit cc4dd5a

Browse files
committed
docs: resolve k8s deployment name/namespace from k8s/deployment.yaml, not a hardcoded example
1 parent 661932a commit cc4dd5a

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

‎AGENTS.md‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,14 @@ Instead, add a "Discovering data" section directing the agent to call `list_data
4545

4646
## Branch and deployment workflow
4747

48-
**`main` is the live branch.** The `padus` deployment on k8s clones from `main` at pod startup — whatever is on `main` is what runs in production.
48+
**`main` is the live branch.** The k8s Deployment defined in `k8s/deployment.yaml` clones from `main` at pod startup — whatever is on `main` is what runs in production.
49+
50+
> ⚠️ **Read the Deployment name and namespace from `k8s/deployment.yaml` — never copy them from an example in this doc.** Every fork has its own name (the manifest's `metadata.name` / `metadata.namespace`). The commands below reference the manifest file directly (`-f k8s/deployment.yaml`) so you physically cannot restart the wrong app. If you must use `deployment/<name>` form, get `<name>` from the manifest first: `kubectl get -f k8s/deployment.yaml`.
4951
5052
Workflow for testing CDN pin updates or config changes:
5153
1. Create a `test/` branch, make changes, verify jsDelivr serves the new SHA.
5254
2. Merge the `test/` branch to `main` (fast-forward is fine).
53-
3. Restart the deployment: `kubectl rollout restart deployment/padus -n biodiversity`
55+
3. Restart the deployment: `kubectl rollout restart -f k8s/deployment.yaml` (reads name + namespace from the manifest).
5456

5557
Do **not** merge to main before verifying the CDN SHA is live — jsDelivr can take up to an hour to index a new tag.
5658

@@ -70,8 +72,9 @@ The pod's init container clones the GitHub repo at startup. **Push to GitHub fir
7072

7173
```bash
7274
git add <files> && git commit -m "<message>" && git push
73-
kubectl rollout restart deployment/<app-name> -n <namespace>
74-
kubectl rollout status deployment/<app-name> -n <namespace>
75+
# name + namespace come from the manifest — do not hardcode them
76+
kubectl rollout restart -f k8s/deployment.yaml
77+
kubectl rollout status -f k8s/deployment.yaml
7578
```
7679

7780
Restarting without pushing first serves stale code.
@@ -85,9 +88,9 @@ When the GitHub repo is private, the pod reads content from a k8s ConfigMap inst
8588
# 2. Regenerate the ConfigMap
8689
bash scripts/generate-configmap.sh
8790
# 3. Apply and restart
88-
kubectl apply -f k8s/content-configmap.yaml -n <namespace>
89-
kubectl rollout restart deployment/<app-name> -n <namespace>
90-
kubectl rollout status deployment/<app-name> -n <namespace>
91+
kubectl apply -f k8s/content-configmap.yaml
92+
kubectl rollout restart -f k8s/deployment.yaml
93+
kubectl rollout status -f k8s/deployment.yaml
9194
# 4. Commit and push source files (not just the generated configmap)
9295
git add <source-files> k8s/content-configmap.yaml && git commit -m "<message>" && git push
9396
```

0 commit comments

Comments
 (0)