Skip to content

Commit 50436e7

Browse files
chaodu-agent普渡法師
andcommitted
docs: address review feedback on CronJob reference architecture
- Remove duplicate ASCII flow diagram (kept the detailed version) - Replace hardcoded names with generic 'human or agent follow-up' - Add backoffLimit: 0 explanation (one-shot, no silent retries) - Add comment to pin image tag in production instead of :latest - Fix JS snippet: change language tag from bash to javascript, add context - Add security warning to Helm values about plaintext credentials - Normalize placeholder style Co-authored-by: 超渡法師 <chaodu-agent@openab.dev> Co-authored-by: 普渡法師 <pudu-agent@openab.dev>
1 parent e42bfc2 commit 50436e7

1 file changed

Lines changed: 13 additions & 31 deletions

File tree

docs/cronjob_k8s_refarch.md

Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ Project Board
3333
PR-Screening
3434
|
3535
v
36-
Masami / Pahud
37-
human or agent follow-up
36+
Human or agent follow-up
3837
```
3938

4039
## What This Document Covers
@@ -53,32 +52,6 @@ This shape fits Kubernetes better:
5352
- logs are attached to each job
5453
- `concurrencyPolicy: Forbid` prevents overlapping claimers
5554

56-
## High-Level Architecture
57-
58-
```text
59-
GitHub Project Board
60-
Incoming
61-
|
62-
v
63-
CronJob: openab-project-screening
64-
schedule: every 30 minutes
65-
|
66-
v
67-
Job Pod
68-
image: ghcr.io/openabdev/openab-codex:latest
69-
script: /opt/openab-project-screening/screen_once.sh
70-
|
71-
+--> GitHub API via gh
72-
+--> Codex via codex exec
73-
+--> Discord API via curl
74-
|
75-
v
76-
PR-Screening
77-
|
78-
v
79-
Masami / Pahud follow-up
80-
```
81-
8255
## Credential Model
8356

8457
The job is intentionally stateless.
@@ -108,12 +81,16 @@ spec:
10881
concurrencyPolicy: Forbid
10982
jobTemplate:
11083
spec:
84+
# No retries — each run is one-shot. A failure should surface in job
85+
# logs rather than silently re-claiming the same item.
11186
backoffLimit: 0
11287
template:
11388
spec:
11489
restartPolicy: Never
11590
containers:
11691
- name: project-screening
92+
# Pin to a specific tag in production (e.g. :0.8.0) to ensure
93+
# reproducible runs. :latest is used here for illustration only.
11794
image: ghcr.io/openabdev/openab-codex:latest
11895
command:
11996
- bash
@@ -235,9 +212,9 @@ ${item_title}
235212
Status: moved to ${SCREENING_STATUS_NAME}"
236213
```
237214

238-
Thread naming:
215+
Thread naming (Node.js helper used by the script):
239216

240-
```bash
217+
```javascript
241218
const base = `Screening: #${number}${title ? ` ${title}` : ""}`.trim();
242219
process.stdout.write(base.slice(0, 100) || `Screening: #${number}`);
243220
```
@@ -322,14 +299,19 @@ kubectl -n default logs -f job/"$LATEST_JOB"
322299

323300
A Helm chart can wire this under `projectScreening` values like:
324301

302+
> **⚠️ Security note:** `githubToken` and `codexAuthJson` below are shown inline for illustration.
303+
> In practice, supply these via `--set` flags, environment variables, or an external secret manager
304+
> (e.g. Sealed Secrets, External Secrets Operator). **Do not commit credentials to version control.**
305+
325306
```yaml
326307
projectScreening:
327308
enabled: true
328309
schedule: "*/30 * * * *"
310+
# Pin to a specific tag in production (e.g. :0.8.0)
329311
image: ghcr.io/openabdev/openab-codex:latest
330312
githubToken: "<token with project scope>"
331313
codexAuthJson: |
332-
PASTE_THE_CONTENTS_OF_YOUR__HOME__CODEX__AUTH_JSON_HERE
314+
<contents of ~/.codex/auth.json>
333315
discordReport:
334316
enabled: true
335317
secretName: "openab-kiro-codex"

0 commit comments

Comments
 (0)