docs: generate README for component/default/sonar-test-nest4 [documentor-agent]

This commit is contained in:
2026-05-18 09:31:59 +00:00
parent 7529b38918
commit 27da605859

View File

@@ -1,7 +1,7 @@
--- ---
title: "sonar-test-nest4" title: "sonar-test-nest4"
generated_by: documentor-agent generated_by: documentor-agent
generated_at: "2026-05-15T15:21:00+00:00" generated_at: "2026-05-18T09:31:41+00:00"
human_edited: false human_edited: false
source_entity: "Component/default/sonar-test-nest4" source_entity: "Component/default/sonar-test-nest4"
source_repo: "https://gitea.kyndemo.live/validate/sonar-test-nest4" source_repo: "https://gitea.kyndemo.live/validate/sonar-test-nest4"
@@ -9,38 +9,34 @@ source_repo: "https://gitea.kyndemo.live/validate/sonar-test-nest4"
## Overview ## Overview
`sonar-test-nest4` is a stateless microservice built using the `typescript-nestjs` runtime. It was scaffolded from the **Create Microservice** golden-path template on the Kyndryl Platform. The service provides a REST API for managing items, including endpoints for CRUD operations. It is designed to be lightweight, scalable, and observable, with integrated OpenTelemetry instrumentation and Prometheus metrics. `sonar-test-nest4` is a stateless microservice built using the `typescript-nestjs` runtime. It was scaffolded from the **Create Microservice** golden-path template on the Kyndryl Platform. The service provides a REST API for managing items, exposing endpoints for CRUD operations. It is designed to be lightweight, scalable, and integrates seamlessly with the platform's CI/CD pipeline and observability stack.
This service plays a key role in the broader system by offering item management capabilities. It is deployed on Azure Kubernetes Service (AKS) via Humanitec's Score-based deployment model, with container images stored in Azure Container Registry (ACR). The CI/CD pipeline is managed through Gitea Actions, ensuring automated builds, tests, and deployments across development, staging, and production environments. The service plays a critical role in the demo-apps domain, serving as a foundational component for showcasing platform capabilities such as OpenTelemetry instrumentation, Prometheus metrics, and automated load testing with k6. It is managed by the platform engineering group and follows a strict branch promotion model to ensure stability across environments.
## Repository ## Repository
| Field | Value | | Field | Value |
|----------------|------------------------------------------------------------------------------------------------------------------------------------| |----------------|-----------------------------------------------------------------------------------------------------------------------------|
| Source Repo | [validate/sonar-test-nest4](https://gitea.kyndemo.live/validate/sonar-test-nest4) | | Source Repo | [sonar-test-nest4](https://gitea.kyndemo.live/validate/sonar-test-nest4) |
| Branch | `dev` | | Branch | `dev` |
| ArgoCD App | — | | ArgoCD App | — |
| Namespace | `dev` | | Namespace | `dev` |
## Architecture ## Architecture
`sonar-test-nest4` follows a stateless architecture and is deployed as a containerized service. Key components include: `sonar-test-nest4` is deployed as a containerized service on Azure Kubernetes Service (AKS) via Humanitec's Score-based deployment. The CI/CD pipeline is powered by Gitea Actions, which automates the build, test, and deployment processes. The service communicates with other components through its REST API and exposes Prometheus metrics for monitoring.
Key architectural details:
- **Runtime**: `typescript-nestjs` - **Runtime**: `typescript-nestjs`
- **Container Port**: `3000` - **Container Port**: `3000`
- **Endpoints**: - **Endpoints**:
- `/api/items` for CRUD operations - `/api/items` for CRUD operations
- `/health` for health checks - `/health` for health checks
- `/metrics` for Prometheus metrics - `/metrics` for Prometheus metrics
- **Image Registry**: Azure Container Registry (`bstagecjotdevacr`)
- **Deployment Flow**: - **Deployment Flow**:
- Push to `dev`, `staging`, or `prod` triggers CI/CD workflows: - Push to `dev` triggers automatic build and deployment to the dev environment.
- `build-push.yml`: Builds and tests the application, then pushes the container image to Azure Container Registry. - Promotion to `staging` and `prod` requires PR approval and passing CI gates.
- `deploy-humanitec.yml`: Deploys the service to AKS using Humanitec's API.
- **Branch Model**:
- `dev`: Active development, auto-deploys to the dev environment.
- `staging`: Pre-production, promoted from `dev` via PR.
- `prod`: Production, promoted from `staging` via PR.
- `main`: System of record, receives merges from `prod`.
## Configuration ## Configuration
@@ -53,22 +49,21 @@ This service plays a key role in the broader system by offering item management
## Operations ## Operations
### Deployment Steps ### Deployment Steps
1. Push changes to the `dev` branch for automatic deployment to the dev environment. 1. Push changes to the `dev` branch for automatic deployment to the dev environment.
2. Open a PR to promote changes from `dev` to `staging`. Ensure CI tests pass and obtain one approval. 2. Open a PR for promotion to `staging` or `prod`. Ensure CI tests pass and obtain one approval.
3. Open a PR to promote changes from `staging` to `prod`. Ensure CI tests pass and obtain one approval. 3. Merge the PR to trigger deployment to the target environment.
4. Merge changes from `prod` to `main` for system-of-record updates.
### Runbook Notes ### Runbook Notes
- Monitor the `/health` endpoint for service status.
- Monitor `/health` for service status. - Use the `/metrics` endpoint for Prometheus-based observability.
- Use `/metrics` for Prometheus-based observability. - Refer to `.platform/config.yaml` for runtime-specific configurations.
- For load testing, refer to the K6 configuration in the `dev` namespace.
## Observability ## Observability
- **Grafana Dashboard**: [Opentelemetry Application Observability](https://grafana.kyndemo.live/d/otel-app-observability-v2/opentelemetry-application-observability?orgId=1&var-app=sonar-test-nest4) - **Grafana Dashboard**: [Opentelemetry Application Observability](https://grafana.kyndemo.live/d/otel-app-observability-v2/opentelemetry-application-observability?orgId=1&var-app=sonar-test-nest4)
- **Prometheus Metrics**: Enabled at `/metrics` on port `3000`. - **Prometheus Metrics**: Enabled (`/metrics` endpoint)
- **Chaos Mesh**: Enabled for resilience testing
- **k6 Load Testing**: Configured (`k6-test-sonar-test-nest4` in `dev` namespace)
## Dependencies ## Dependencies