Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a0620ea391 | |||
| 13ce96e07e | |||
| fe9d867a87 | |||
| 9ad73f3741 |
+102
-1
@@ -16,6 +16,9 @@ Follow this list top-to-bottom; each step unblocks the next.
|
||||
- [ ] 5. `GITEA_TOKEN` in each API repo's Actions Secrets — unblocks CI image push
|
||||
- [ ] 6. Gitea packages enabled + DNS record for `registry.leeworks.dev` — unblocks image push to registry
|
||||
- [ ] 7. Add api-company Flux source + kustomization to 0xWheatyz/Talos — unblocks all GitOps reconciliation
|
||||
- [ ] 8. `gitea-registry` (zip-enrichment, holidays, air-quality, docs-site) — imagePullSecret for pods pulling from `registry.leeworks.dev`
|
||||
- [ ] 9. `gitea-image-automation-token` (flux-system) — write-scoped token for Flux ImageUpdateAutomation to push image-tag commits
|
||||
- [ ] 10. `rapidapi-proxy-secret` (zip-enrichment, holidays, air-quality) — RapidAPI Proxy Secret for server-side request validation
|
||||
|
||||
---
|
||||
|
||||
@@ -153,6 +156,44 @@ Unblocks: Issue #2 (Flux reconciliation of all `flux/` manifests in this repo).
|
||||
|
||||
---
|
||||
|
||||
---
|
||||
|
||||
### 10. `rapidapi-proxy-secret` — RapidAPI Proxy Secret (per API namespace)
|
||||
|
||||
| Field | Value |
|
||||
|-----------|-------|
|
||||
| Name | `rapidapi-proxy-secret` |
|
||||
| Namespaces | `zip-enrichment`, `holidays`, `air-quality` |
|
||||
| Purpose | Every API service validates the `X-RapidAPI-Proxy-Secret` header on every route. Requests without a valid secret return HTTP 403. |
|
||||
| Source | RapidAPI dashboard → API Settings → Security → **Proxy Secret** (generated after each API listing is created) |
|
||||
| Unblocks | Phase 3 server middleware; API services will start but reject all traffic without this secret |
|
||||
|
||||
```bash
|
||||
for NS in zip-enrichment holidays air-quality; do
|
||||
kubectl create secret generic rapidapi-proxy-secret \
|
||||
--namespace=$NS \
|
||||
--from-literal=X-RapidAPI-Proxy-Secret=<value-from-rapidapi-dashboard>
|
||||
done
|
||||
```
|
||||
|
||||
**Source:** RapidAPI dashboard → select your API → Settings → Security → Proxy Secret
|
||||
|
||||
> **Note:** Placeholder `ExternalSecret` manifests are committed at
|
||||
> `flux/zip-enrichment/externalsecret.yaml`, `flux/holidays/externalsecret.yaml`,
|
||||
> and `flux/air-quality/externalsecret.yaml`. These will auto-sync this secret
|
||||
> from the configured backend once the External Secrets Operator (ESO) is
|
||||
> deployed (see issue #61). Until then, create manually using the commands above.
|
||||
|
||||
Verify:
|
||||
```bash
|
||||
for NS in zip-enrichment holidays air-quality; do
|
||||
echo -n "$NS: "
|
||||
kubectl get secret rapidapi-proxy-secret -n $NS -o jsonpath='{.data.X-RapidAPI-Proxy-Secret}' | base64 -d | wc -c
|
||||
echo " chars"
|
||||
done
|
||||
```
|
||||
|
||||
|
||||
## Dependency Order
|
||||
|
||||
```
|
||||
@@ -162,6 +203,66 @@ Unblocks: Issue #2 (Flux reconciliation of all `flux/` manifests in this repo).
|
||||
3 (grafana-admin) → Grafana login works
|
||||
4 (gatus-slack-webhook) → Gatus alerting works
|
||||
5 + 6 (GITEA_TOKEN + registry packages) → CI pushes images → API services deploy
|
||||
8 (gitea-registry) → pods can pull images from registry.leeworks.dev → services start
|
||||
9 (gitea-image-automation-token) → Flux ImageUpdateAutomation pushes tag-update commits
|
||||
10 (rapidapi-proxy-secret × 3) → API server middleware validates RapidAPI requests → revenue enabled
|
||||
```
|
||||
|
||||
Once all seven items are complete, the full stack (runner, registry, Prometheus, Grafana, Gatus, docs-site, three API services) reconciles automatically via FluxCD with no further manual steps.
|
||||
Once all nine items are complete, the full stack (runner, registry, Prometheus, Grafana, Gatus, docs-site, three API services) reconciles automatically via FluxCD with no further manual steps.
|
||||
|
||||
---
|
||||
|
||||
### 8. `gitea-registry` — imagePullSecret for API service namespaces
|
||||
|
||||
| Field | Value |
|
||||
|-----------|-------|
|
||||
| Name | `gitea-registry` |
|
||||
| Namespaces | `zip-enrichment`, `holidays`, `air-quality`, `docs-site` |
|
||||
| Type | `kubernetes.io/dockerconfigjson` |
|
||||
| Purpose | Allows pods to pull images from `registry.leeworks.dev` without ImagePullBackOff |
|
||||
| Source | Gitea token with `read:packages` scope (can reuse the same token as step 1 if it has that scope) |
|
||||
| Unblocks | Issues #58 (Phase 0 hard deploy blocker) and transitively Phase 3 service deploys |
|
||||
|
||||
```bash
|
||||
for NS in zip-enrichment holidays air-quality docs-site; do
|
||||
kubectl create secret docker-registry gitea-registry \
|
||||
--namespace=$NS \
|
||||
--docker-server=registry.leeworks.dev \
|
||||
--docker-username=leeworks-agents \
|
||||
--docker-password=<GITEA_TOKEN_WITH_READ_PACKAGES> \
|
||||
--docker-email=agent@leeworks.dev
|
||||
done
|
||||
```
|
||||
|
||||
Verify:
|
||||
```bash
|
||||
kubectl get secret gitea-registry -n zip-enrichment -o jsonpath='{.type}'
|
||||
# expected: kubernetes.io/dockerconfigjson
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 9. `gitea-image-automation-token` — Flux ImageUpdateAutomation write token
|
||||
|
||||
| Field | Value |
|
||||
|-----------|-------|
|
||||
| Name | `gitea-image-automation-token` |
|
||||
| Namespace | `flux-system` |
|
||||
| Purpose | Allows Flux `ImageUpdateAutomation` to push image-tag update commits back to `leeworks-agents/api-company` |
|
||||
| Source | Gitea token with **`write:repository`** scope (the existing `gitea-leeworks-agents-token` only has `read:repository` — create a separate token or verify scope) |
|
||||
| Unblocks | Issue #57 (Flux ImageUpdateAutomation for api-company) |
|
||||
|
||||
```bash
|
||||
kubectl create secret generic gitea-image-automation-token \
|
||||
-n flux-system \
|
||||
--from-literal=username=leeworks-agents \
|
||||
--from-literal=password=<TOKEN_WITH_WRITE_REPO_SCOPE>
|
||||
```
|
||||
|
||||
Verify after creation:
|
||||
```bash
|
||||
flux get imageupdateautomations -n flux-system
|
||||
# Expected: api-company shows READY=True
|
||||
```
|
||||
|
||||
> **Note:** If you create a new token with `write:repository` scope, keep the existing `gitea-leeworks-agents-token` for read-only Flux GitRepository pulls and use this new secret exclusively for `ImageUpdateAutomation`.
|
||||
|
||||
@@ -32,6 +32,8 @@ spec:
|
||||
chore(image): update {{range .Updated.Images}}{{.Repository}}:{{.NewTag}} {{end}}
|
||||
push:
|
||||
branch: main
|
||||
secretRef:
|
||||
name: gitea-image-automation-token # must pre-exist in flux-system ns — see docs/secrets-checklist.md item 9
|
||||
update:
|
||||
path: ./flux
|
||||
strategy: Setters
|
||||
|
||||
Reference in New Issue
Block a user