docs: POC-katselmus — git-pages retention, ADRt, dokumenttipäivitykset
- ADR 0004: commit-status-periaate (natiivi riittää, API vain custom-linkkiin)
- ADR 0005: provider & consumer -malli (ci-engine.yml lukittu rajapinta)
- docs/design-rationale: uusi periaate 1 "Hyödynnä natiivia",
periaate 2 korjattu (API vain tarvittaessa),
periaate 6 (MinIO→git-pages), teknologiavalinnat poistettu
- docs/config-model: isContainerBuild→isArtifactBuild, Docker-labelit poistettu
- docs/ai-context: monorepo-kuvaus (git-pages oma kokonaisuus, ohut rajapinta)
- docs/architecture, tech-stack, report-hosting, shared-scripts, workflows:
MinIO→git-pages, provider agnostinen build-ekosysteemeille
- docs/adr/: ADRt siirretty decisions/→adr/
- git-pages/docs: retention-osiot päivitetty CronJob→sidecar+HTTP API,
URL-kaava korjattu (reports/{sha8}/)
- git-pages/docs/implementation-notes: uusi (storage v2, Host-header,
whiteout, .init, PATCH+directoryt)
- git-pages/templates/init-job.yaml: post-install init (.index)
- scripts/publish-git-pages.sh: PUT-fallback poistettu (init hoitaa),
palauttaa BASE URL ilman index.html
This commit is contained in:
+17
-17
@@ -92,9 +92,9 @@ graph TD
|
||||
subgraph "Retention Flow"
|
||||
R1["K8s Secret<br/>git-pages-retention-gitea"]
|
||||
R2["Gitea PAT<br/>CI-REPORTS_READ_FOR_RETENTION"]
|
||||
R1 -->|token| CJ["CronJob"]
|
||||
R2 -->|API auth| GITEA["Gitea API"]
|
||||
CJ -->|read branches| GITEA
|
||||
R1 -->|token| SC["Sidecar"]
|
||||
SC -->|API auth| GITEA["Gitea API"]
|
||||
SC -->|read branches| GITEA
|
||||
end
|
||||
```
|
||||
|
||||
@@ -157,26 +157,26 @@ GET/HEAD-reitillä ei ole Middlewarea. Luku on julkinen, jos URL tunnetaan.
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
participant CronJob as CronJob<br/>git-pages-retention
|
||||
participant Sidecar as Retention Sidecar
|
||||
participant K8sSecret as K8s Secret<br/>git-pages-retention-gitea
|
||||
participant GiteaAPI as Gitea API
|
||||
participant PVC as PVC /app/data
|
||||
participant GP as git-pages (localhost:3000)
|
||||
|
||||
Note over CronJob: 1. Lue PAT
|
||||
CronJob->>K8sSecret: lue token
|
||||
K8sSecret-->>CronJob: Gitea PAT
|
||||
Note over Sidecar: 1. Lue PAT
|
||||
Sidecar->>K8sSecret: lue token
|
||||
K8sSecret-->>Sidecar: Gitea PAT
|
||||
|
||||
Note over CronJob: 2. Skaalaa deployment 0:aan
|
||||
CronJob->>PVC: lue .meta-tiedostot
|
||||
Note over Sidecar: 2. Lue manifest
|
||||
Sidecar->>GP: GET .git-pages/manifest.json
|
||||
GP-->>Sidecar: sisällysluettelo
|
||||
|
||||
Note over CronJob: 3. Kysy branch-lista
|
||||
CronJob->>GiteaAPI: GET /api/v1/repos/OWNER/REPO/branches
|
||||
GiteaAPI-->>CronJob: branch names
|
||||
Note over Sidecar: 3. Kysy branch
|
||||
Sidecar->>GiteaAPI: GET /api/v1/repos/OWNER/REPO/branches/BRANCH
|
||||
GiteaAPI-->>Sidecar: 200 / 404
|
||||
|
||||
Note over CronJob: 4. Vertaa ja poista
|
||||
CronJob->>PVC: poista vanhentuneet
|
||||
|
||||
Note over CronJob: 5. Skaalaa deployment 1:een
|
||||
Note over Sidecar: 4. Luo whiteout-tar + PATCH
|
||||
Sidecar->>GP: PATCH / (whiteout)
|
||||
GP-->>Sidecar: 200 OK
|
||||
```
|
||||
|
||||
**Huomio:** Retention-PAT:in omistajalla on oltava lukuoikeus KAIKKIIN repoihin,
|
||||
|
||||
Reference in New Issue
Block a user