3.6 KiB
title, generated_by, generated_at, human_edited, source_entity, source_repo
| title | generated_by | generated_at | human_edited | source_entity | source_repo |
|---|---|---|---|---|---|
| Sonar Test Nest4 | documentor-agent | 2026-05-14T12:03:53+00:00 | false | Component/default/sonar-test-nest4 | https://gitea.kyndemo.live/validate/sonar-test-nest4 |
Sonar Test Nest4
A stateless microservice built with TypeScript and NestJS, providing API endpoints for item management and integrated observability features.
Overview
Sonar Test Nest4 is a stateless microservice scaffolded from the Create Microservice golden-path template on the Kyndryl Platform. It is implemented using the typescript-nestjs runtime and is designed to manage items through a RESTful API. The service includes built-in observability features such as health checks and Prometheus metrics.
The service follows a structured branch model (dev → staging → prod → main) to ensure smooth CI/CD workflows. Application code resides in the dev branch, which triggers automatic builds and deployments to the development environment. Promotions to staging and production require pull requests with CI gates and approvals.
Sonar Test Nest4 integrates with Azure Container Registry for image storage and Humanitec for deployment orchestration, targeting an AKS cluster. Observability is enhanced with OpenTelemetry instrumentation and a Grafana dashboard for monitoring.
Repository
| Field | Value |
|---|---|
| Source Repo | Sonar Test Nest4 Repository |
| Branch | dev |
| ArgoCD App | — |
| Namespace | dev |
Architecture
Sonar Test Nest4 is built using the typescript-nestjs runtime and deployed as a stateless service. Key architectural components include:
- Runtime: TypeScript with NestJS framework.
- Container Port:
3000. - Endpoints:
/healthfor health checks./metricsfor Prometheus metrics./api/itemsfor item management.
- Image Storage: Azure Container Registry (
bstagecjotdevacr). - Deployment Flow:
- CI/CD pipelines (
build-push.ymlanddeploy-humanitec.yml) handle image building, testing, and deployment. - Humanitec orchestrates deployments to AKS using Score files.
- CI/CD pipelines (
The service is integrated with Gitea Actions for CI/CD and Humanitec for deployment orchestration. Observability is provided through Prometheus metrics and a Grafana dashboard.
Configuration
| Config Key | Value |
|---|---|
| runtime | typescript-nestjs |
| health_path | /health |
| container_port | 3000 |
Operations
Deployment Steps
- Push changes to the
devbranch to trigger automatic builds and deployments to the development environment. - Open a pull request for promotion to
stagingorprod. Ensure CI tests pass and obtain one approval. - Merge the pull request to promote the service to the target environment.
- Application code is merged into the
mainbranch fromprodafter releases.
Branch Model
| Branch | Purpose |
|---|---|
| dev | Active development — push freely, deploys to dev environment automatically. |
| staging | Pre-production — promoted from dev via PR (CI gate + 1 approval). |
| prod | Production — promoted from staging via PR (CI gate + 1 approval). |
| main | System of record — receives merges from prod after releases. |
Observability
| Observability Feature | Description |
|---|---|
| Health Check | /health endpoint returns {"status":"UP"}. |
| Metrics | /metrics endpoint exposes Prometheus metrics. |
| Grafana Dashboard | OpenTelemetry Application Observability. |
Dependencies
No declared dependencies.