initial commit
All checks were successful
Build and Publish TechDocs / build-and-publish (push) Successful in 1m27s
All checks were successful
Build and Publish TechDocs / build-and-publish (push) Successful in 1m27s
Change-Id: I3ada42bc15023348100ef2c47ba0830240e41633
This commit is contained in:
20
docs/api.md
Normal file
20
docs/api.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# API Reference
|
||||
|
||||
Base URL: `https://sonar-test-go3.kyndemo.live`
|
||||
|
||||
## Items `/api/items`
|
||||
|
||||
| Method | Path | Body | Response |
|
||||
|--------|------|------|----------|
|
||||
| GET | `/api/items` | — | Array of items |
|
||||
| POST | `/api/items` | `{"name":"...","description":"..."}` | Created item (201) |
|
||||
| GET | `/api/items/{id}` | — | Item or 404 |
|
||||
| PUT | `/api/items/{id}` | `{"name":"...","description":"..."}` | Updated item |
|
||||
| DELETE | `/api/items/{id}` | — | `{"deleted":id}` |
|
||||
|
||||
## Observability
|
||||
|
||||
| Path | Description |
|
||||
|------|-------------|
|
||||
| `/health` | Health check — `{"status":"UP"}` |
|
||||
| `/metrics` | Prometheus exposition format |
|
||||
30
docs/architecture.md
Normal file
30
docs/architecture.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# Architecture
|
||||
|
||||
`sonar-test-go3` is a `go` service.
|
||||
|
||||
| Component | Detail |
|
||||
|-----------|--------|
|
||||
| Runtime | `go` |
|
||||
| Container port | `8080` |
|
||||
| Health check | `/health` |
|
||||
| Metrics | `/metrics` (Prometheus format) |
|
||||
| Image | Azure Container Registry (`bstagecjotdevacr`) |
|
||||
|
||||
## Deployment flow
|
||||
|
||||
```
|
||||
Push to dev/staging/prod
|
||||
→ build-push.yml (build + test → push image to ACR)
|
||||
→ deploy-humanitec.yml (hctl score deploy)
|
||||
```
|
||||
|
||||
## Branch model
|
||||
|
||||
| Branch | Purpose |
|
||||
|--------|---------|
|
||||
| `main` | System of record — catalog, docs, score.yaml, platform config |
|
||||
| `dev` | Active development |
|
||||
| `staging` | Pre-production (lazy-created on first promote) |
|
||||
| `prod` | Production (lazy-created on first promote) |
|
||||
|
||||
Promotions between environments are triggered from the Backstage CI/CD tab.
|
||||
45
docs/index.md
Normal file
45
docs/index.md
Normal file
@@ -0,0 +1,45 @@
|
||||
# sonar-test-go3
|
||||
|
||||
sonar-test-go3
|
||||
|
||||
## Overview
|
||||
|
||||
This service was scaffolded from the **Create Microservice** golden-path template on the Kyndryl Platform.
|
||||
|
||||
- **Runtime**: `go`
|
||||
- **Owner**: group:default/platform-engineering
|
||||
- **Deployment profile**: `stateless`
|
||||
|
||||
## Architecture
|
||||
|
||||
See [architecture.md](architecture.md) for the full architecture diagram.
|
||||
|
||||
At a glance:
|
||||
|
||||
```
|
||||
┌──────────────────────────────────────┐
|
||||
│ Gitea Actions CI/CD │
|
||||
│ ┌─────────────┐ ┌───────────────┐ │
|
||||
│ │ build-push │→ │ deploy- │ │
|
||||
│ │ .yml │ │ humanitec.yml │ │
|
||||
│ └─────────────┘ └───────────────┘ │
|
||||
└──────────────────────────────────────┘
|
||||
│ │
|
||||
▼ ▼
|
||||
Azure ACR Humanitec API
|
||||
│
|
||||
▼
|
||||
AKS (via Score)
|
||||
│
|
||||
▼
|
||||
┌──────────────────────────┐
|
||||
│ sonar-test-go3 │
|
||||
│ :8080 │
|
||||
│ /api/items │
|
||||
│ /health │
|
||||
└──────────────────────────┘
|
||||
```
|
||||
|
||||
## API Reference
|
||||
|
||||
See [api.md](api.md) for the full OpenAPI reference.
|
||||
Reference in New Issue
Block a user