12 Commits

Author SHA1 Message Date
3336c1b1e4 docs: set docs.kyndemo.live/readme for component/default/test-alex-1-1 [documentor-agent]
All checks were successful
Integration Test / Platform Conformance (pull_request) Successful in 6s
Integration Test / Unit Tests + Container Smoke (workflow_dispatch) All checks passed
Integration Test / Unit Tests + Container Smoke (pull_request) Successful in 17s
SonarQube Analysis / Build, Test & Analyse (pull_request) Successful in 2m14s
2026-08-02 23:31:33 +00:00
585b9d3f55 Merge pull request 'ci: restore the platform's orchestrator deploy workflow' (#2) from backstage/batch-1785713416818 into main
All checks were successful
Build and Push to ACR / Build and Push (push) Has been skipped
Reviewed-on: #2
2026-08-02 23:30:57 +00:00
42652039fd ci: restore the platform's orchestrator deploy workflow
All checks were successful
Integration Test / Platform Conformance (pull_request) Successful in 20s
Integration Test / Unit Tests + Container Smoke (workflow_dispatch) All checks passed
Integration Test / Unit Tests + Container Smoke (pull_request) Successful in 42s
SonarQube Analysis / Build, Test & Analyse (pull_request) Successful in 2m26s
2026-08-02 23:30:18 +00:00
78ed7d21bb ci: restore the platform's orchestrator deploy workflow 2026-08-02 23:30:18 +00:00
182be6521b feat: modernize application — source, platform artifacts, CI/CD
All checks were successful
Build and Publish TechDocs / build-and-publish (push) Successful in 57s
- chore: ingest source code

112 files from https://github.com/spring-projects/spring-petclinic
- feat: add platform deployment artifacts
- feat: add CI/CD workflow automation
2026-08-02 23:29:49 +00:00
d49897c9d5 Merge pull request 'feat: add service discovery, OTel instrumentation, and k6 load tests' (#1) from backstage/batch-1785713281283 into main
Reviewed-on: #1
2026-08-02 23:29:16 +00:00
09bacb4d01 feat: add service discovery, OTel instrumentation, and k6 load tests
All checks were successful
Integration Test / Platform Conformance (pull_request) Successful in 4s
Integration Test / Unit Tests + Container Smoke (workflow_dispatch) All checks passed
Integration Test / Unit Tests + Container Smoke (pull_request) Successful in 13s
SonarQube Analysis / Build, Test & Analyse (pull_request) Successful in 1m17s
2026-08-02 23:28:07 +00:00
db657b37e1 feat: add service discovery, OTel instrumentation, and k6 load tests 2026-08-02 23:28:06 +00:00
0bc7579472 feat: add service discovery, OTel instrumentation, and k6 load tests 2026-08-02 23:28:05 +00:00
c06936df43 feat: add service discovery, OTel instrumentation, and k6 load tests 2026-08-02 23:28:04 +00:00
86d2c92e2d feat: add service discovery, OTel instrumentation, and k6 load tests 2026-08-02 23:28:03 +00:00
8dc0c8ba83 feat: add service discovery, OTel instrumentation, and k6 load tests 2026-08-02 23:28:02 +00:00
17 changed files with 911 additions and 384 deletions

View File

@@ -0,0 +1,52 @@
name: Build and Publish TechDocs
on:
push:
branches: [main]
paths:
- "docs/**"
- "mkdocs.yml"
- "catalog-info.yaml"
workflow_dispatch: {}
env:
AZURE_FEDERATED_TOKEN_FILE: /var/run/secrets/azure/tokens/azure-identity-token
AZURE_ACCOUNT_NAME: "bstagecjotdevsttechdocs"
ENTITY_NAMESPACE: default
ENTITY_KIND: component
ENTITY_NAME: test-alex-1-1
jobs:
build-and-publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install dependencies
run: |
apt-get update -qq && apt-get install -y python3-pip
pip3 install mkdocs-techdocs-core==1.*
npm install -g @techdocs/cli
- name: Build TechDocs site
run: techdocs-cli generate --source-dir . --output-dir ./site --no-docker --verbose
- name: Install Azure CLI
run: |
if ! command -v az &>/dev/null; then curl -sL https://aka.ms/InstallAzureCLIDeb | bash; fi
- name: Azure login (OIDC)
run: |
az login \
--service-principal \
--username "$AZURE_CLIENT_ID" \
--tenant "$AZURE_TENANT_ID" \
--federated-token "$(cat $AZURE_FEDERATED_TOKEN_FILE)"
- name: Publish TechDocs site
run: |
techdocs-cli publish \
--publisher-type azureBlobStorage \
--storage-name "techdocs" \
--azureAccountName "$AZURE_ACCOUNT_NAME" \
--entity "$ENTITY_NAMESPACE/$ENTITY_KIND/$ENTITY_NAME"

30
Dockerfile Normal file
View File

@@ -0,0 +1,30 @@
# Multi-stage Dockerfile for Spring Boot Application
FROM maven:3.9-eclipse-temurin-17 AS build
WORKDIR /app
# Copy dependency files first for better caching
COPY pom.xml .
RUN mvn dependency:go-offline -B
# Copy source code and build
COPY src ./src
RUN mvn clean package -DskipTests
# Runtime stage - lean JRE for Spring Boot executable JAR (~200MB vs ~500MB Tomcat)
FROM mcr.microsoft.com/openjdk/jdk:17-ubuntu
WORKDIR /app
# Create non-root user for security
RUN groupadd -g 1001 appuser && useradd -u 1001 -g appuser -s /bin/sh appuser && \
chown -R appuser:appuser /app
USER appuser
COPY --from=build /app/target/*.jar app.jar
EXPOSE 8080
# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=30s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:8080/actuator/health || exit 1
CMD ["java", "-jar", "app.jar"]

View File

@@ -1,69 +1,52 @@
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: test-alex-1-1
description: 'test-alex-1-1 — renovated onto the crucible platform orchestrator'
annotations:
gitea.kyndemo.live/project-slug: validate/test-alex-1-1
gitea.kyndemo.live/repo-slug: validate/test-alex-1-1
# The orchestrator names each environment's namespace ns-xxxxx at deploy time, so a
# namespace can never be known here -- pinning one only hides the workload. Omitted
# deliberately: the Kubernetes plugin then searches every namespace it is given.
#
# kubernetes-id matches the label the score-workload module propagates from the Score
# metadata.labels block. The previous selector, app.humanitec.io/name=..., was a
# Humanitec SaaS label that nothing on this platform has ever set.
backstage.io/kubernetes-id: test-alex-1-1
backstage.io/techdocs-ref: dir:.
# Vestigial key names, live values. These drive the Orchestrator tab, which reads
# humanitec.dev/orgId and humanitec.dev/projectId; renaming the keys would break every
# entity already in the catalog, so the names stay and the values point at crucible.
humanitec.dev/orgId: crucible
# THE PROJECT IS THE APPLICATION. This was `apps-cluster`, a single project shared by
# every renovated app, which is why the Orchestrator tab on any one component listed the
# whole estate -- the tab shows a project's environments, and every app's environment
# lived in that one project. Now each app owns a project, so the tab shows this app's
# stages and nothing else. The deploy workflow creates the project, its runner rule and
# its environments on first deploy.
humanitec.dev/projectId: test-alex-1-1
# The environments are now STAGES of this application -- dev, staging, prod -- rather
# than one environment named after the component.
humanitec.dev/appId: test-alex-1-1
cjot.io/target-domain: apps
gitea.kyndemo.live/project-slug: validate/test-alex-1-1
gitea.kyndemo.live/repo-slug: validate/test-alex-1-1
grafana.com/dashboard-url:
https://grafana.kyndemo.live/d/otel-app-observability-v2/opentelemetry-application-observability?orgId=1&var-app=test-alex-1-1
grafana/alert-label-selector: app=test-alex-1-1
grafana/dashboard-selector: uid == 'otel-app-observability-v2'
grafana/grafana-instance: default
humanitec.dev/appId: test-alex-1-1
humanitec.dev/orgId: crucible
humanitec.dev/projectId: test-alex-1-1
sonarqube.org/project-key: test-alex-1-1
grafana/grafana-instance: "default"
grafana/alert-label-selector: "app=test-alex-1-1"
grafana/dashboard-selector: "uid == 'otel-app-observability-v2'"
grafana.com/dashboard-url: "https://grafana.kyndemo.live/d/otel-app-observability-v2/opentelemetry-application-observability?orgId=1&var-app=test-alex-1-1"
tags:
- platform-orchestrator
- renovation
- postgresql
- blob-storage
docs.kyndemo.live/readme: catalog/component/default/test-alex-1-1/README.md
description: "test-alex-1-1 — renovated onto the crucible platform orchestrator"
links:
# console.humanitec.dev is the dead SaaS. This is the live crucible console, deep-linked
# to the per-application environment the deploy workflow creates.
- url: https://console.dev.orchestrator.crucible.kyndemo.live/orgs/crucible/projects/test-alex-1-1/environments/dev
title: Orchestrator Console
icon: dashboard
- url: https://test-alex-1-1.apps.dev.crucible.kyndemo.live
title: Live Application
icon: web
- url: https://gitea.kyndemo.live/validate/test-alex-1-1
title: Source Repository
icon: github
- url: https://gitea.kyndemo.live/validate/test-alex-1-1/actions
title: CI/CD Pipelines
icon: code
- url: https://grafana.kyndemo.live/d/otel-app-observability-v2/opentelemetry-application-observability?orgId=1&var-app=test-alex-1-1
title: Grafana Dashboard
icon: dashboard
- icon: dashboard
title: Orchestrator Console
url:
https://console.dev.orchestrator.crucible.kyndemo.live/orgs/crucible/projects/test-alex-1-1/environments/dev
- icon: web
title: Live Application
url: https://test-alex-1-1.apps.dev.crucible.kyndemo.live
- icon: github
title: Source Repository
url: https://gitea.kyndemo.live/validate/test-alex-1-1
- icon: code
title: CI/CD Pipelines
url: https://gitea.kyndemo.live/validate/test-alex-1-1/actions
- icon: dashboard
title: Grafana Dashboard
url:
https://grafana.kyndemo.live/d/otel-app-observability-v2/opentelemetry-application-observability?orgId=1&var-app=test-alex-1-1
name: test-alex-1-1
tags:
- platform-orchestrator
- renovation
- postgresql
- blob-storage
spec:
type: service
dependsOn:
- resource:default/cjot-aks
- resource:default/ho-v2-postgresql
- resource:default/ho-v2-storage-account
lifecycle: experimental
owner: platform-engineering
dependsOn:
- resource:default/cjot-aks
- resource:default/ho-v2-postgresql
- resource:default/ho-v2-storage-account
type: service

25
docs/api.md Normal file
View File

@@ -0,0 +1,25 @@
# API Reference
## Endpoints
### Health Check
```
GET /health
```
**Response:**
```json
{"status": "UP", "service": "test-alex-1-1"}
```
### Root
```
GET /
```
**Response:**
```json
{"service": "test-alex-1-1", "description": "Modernized test-alex-1-1 service", "version": "1.0.0"}
```

15
docs/architecture.md Normal file
View File

@@ -0,0 +1,15 @@
# Architecture
## Service Design
test-alex-1-1 is a microservice following cloud-native patterns.
## Technology Stack
- **Runtime**: Java Spring Boot
- **Deployment**: Humanitec Platform Orchestrator
- **CI/CD**: Gitea Actions → ACR → Humanitec
## Dependencies
See `score.yaml` for external resource dependencies.

32
docs/index.md Normal file
View File

@@ -0,0 +1,32 @@
# test-alex-1-1
Modernized test-alex-1-1 service
## Overview
This service is built with **Java Spring Boot** and follows the Golden Path architecture patterns.
### Key Features
- 🚀 Production-ready configuration
- 📊 Prometheus metrics exposed
- 🏥 Health check endpoints
- 🔒 Security scanning in CI/CD
- 📦 Containerized deployment
## Quick Start
```bash
git clone https://gitea.kyndemo.live/kyndryl-demos/test-alex-1-1.git
cd test-alex-1-1
```
## Monitoring
- **Metrics**: Prometheus metrics at `/metrics`
- **Health**: `/health`
- **Grafana**: [View Dashboard](https://grafana.kyndemo.live/d/app-test-alex-1-1)
## Support
Contact the Platform Engineering team.

47
docs/migration-plan.md Normal file
View File

@@ -0,0 +1,47 @@
# Modernization Plan for test-alex-1-1
## Application Type
Java Application
## Selected Modernization Strategy
- **Migration Approach**: containerize-optimize
- **Target Platform**: orchestrator
- **Observability**: ENABLED (Prometheus metrics, health checks, tracing)
- **Security Scanning**: ENABLED (Trivy vulnerability scanning)
## Discovery Summary
### Discovery Report
#### Application Overview
- **Type**: Java-based application
- **Framework**: Spring Boot
- **Build Tools**: Maven and Gradle
- **Primary Purpose**: Likely a web application, as indicated by the presence of REST API endpoints and web-related dependencies.
#### Technology Stack
- **Language**: Java
- **Framework**: Spring Boot
- **Build Tools**: Maven and Gradle
- **Database**: H2, MySQL, PostgreSQL (based on dependencies)
- **Caching**: Caffeine, javax.cache (cache-api)
- ...
## Generated Artifacts
1. **Dockerfile**: Optimized with health checks and metrics endpoints
2. **score.yaml**: Platform intent with service ports and DNS resource
3. **CI Workflow**: Automated build/push to ACR with Trivy security scanning
## Next Steps
1. Review and customize generated artifacts
2. Test container build and run
3. Deploy to development environment using score.yaml
4. Validate application functionality
5. Promote to staging/production via Humanitec
## Migration Strategy Details
### Containerize Optimize
Add cloud-native patterns: health checks, metrics, optimized base images.
### Platform: orchestrator
score.yaml optimized for Azure Container Apps with managed scaling and Azure-specific configuration.

36
k6/load-test.js Normal file
View File

@@ -0,0 +1,36 @@
// FALLBACK k6 load-test script.
// This static skeleton is only used when The Watcher agent fails to generate
// a bespoke k6 script tailored to the application's detected HTTP endpoints.
// When generation succeeds, the agent produces a custom script that replaces
// this file in the scaffolded output repository.
import http from 'k6/http';
import { check, sleep } from 'k6';
export const options = {
scenarios: {
load_test: {
executor: 'ramping-vus',
startVUs: 0,
stages: [
{ duration: '${{ values.k6_ramp_up | default("10s") }}', target: ${{ values.k6_virtual_users | default(10) }} },
{ duration: '${{ values.k6_duration | default("30s") }}', target: ${{ values.k6_virtual_users | default(10) }} },
{ duration: '5s', target: 0 },
],
},
},
thresholds: {
http_req_duration: ['p(95)<500'],
http_req_failed: ['rate<0.01'],
},
};
const BASE_URL = `http://${{ values.frontend_service_name | default("frontend") }}.${{ values.destination_namespace }}.svc.cluster.local:${{ values.frontend_service_port | default(80) }}`;
export default function () {
const res = http.get(`${BASE_URL}${{ values.k6_target_path | default("/") }}`);
check(res, {
'status is 200': (r) => r.status === 200,
'response time < 500ms': (r) => r.timings.duration < 500,
});
sleep(0.5);
}

36
k6/testrun.yaml Normal file
View File

@@ -0,0 +1,36 @@
# FALLBACK k6 TestRun CRD — reference template for load testing ${{ values.component_id }}.
# This static skeleton is only used when The Watcher agent fails to generate
# a bespoke k6 script. When generation succeeds, the agent produces a custom
# TestRun CRD that replaces this file in the scaffolded output repository.
#
# TestRun CRDs are committed to the repo as a reference. They are created
# dynamically from Backstage (not auto-synced by ArgoCD) because they are
# ephemeral one-shot resources.
apiVersion: k6.io/v1alpha1
kind: TestRun
metadata:
name: k6-${{ values.component_id }}
namespace: ${{ values.destination_namespace }}
labels:
app: ${{ values.component_id }}
backstage.io/component: ${{ values.component_id }}
app.kubernetes.io/managed-by: backstage
app.kubernetes.io/component: load-testing
spec:
parallelism: 1
script:
configMap:
name: k6-test-${{ values.component_id }}
file: load-test.js
runner:
image: grafana/k6:latest
envFrom:
- configMapRef:
name: k6-test-${{ values.component_id }}
env:
- name: K6_OTEL_SERVICE_NAME
value: k6-${{ values.component_id }}
- name: TEST_VUS
value: "10"
- name: TEST_DURATION
value: "30s"

13
mkdocs.yml Normal file
View File

@@ -0,0 +1,13 @@
site_name: test-alex-1-1
site_description: Modernized test-alex-1-1 service
nav:
- Home: index.md
- Architecture: architecture.md
- API Reference: api.md
plugins:
- techdocs-core
theme:
name: material

188
openapi.yaml Normal file
View File

@@ -0,0 +1,188 @@
openapi: 3.0.3
info:
title: test-alex-1-1
description: Modernized test-alex-1-1 service
version: 1.0.0
servers:
- url: https://test-alex-1-1.kyndemo.live
description: Production
- url: http://localhost:8080
description: Local development
paths:
/health:
get:
summary: Health check
operationId: getHealth
tags:
- System
responses:
'200':
description: Healthy
/vets.html:
get:
summary: GET /vets.html
operationId: getVets.html
responses:
'200':
description: Success
'400':
description: Bad request
/owners/{ownerId}/owners/{ownerId}:
get:
summary: GET /owners/{ownerId}/owners/{ownerId}
operationId: getOwners_ownerId_owners_ownerId
responses:
'200':
description: Success
'400':
description: Bad request
parameters:
- name: ownerId
in: path
required: true
schema:
type: string
- name: ownerId
in: path
required: true
schema:
type: string
/owners/{ownerId}/pets/new:
get:
summary: GET /owners/{ownerId}/pets/new
operationId: getOwners_ownerId_pets_new
responses:
'200':
description: Success
'400':
description: Bad request
parameters:
- name: ownerId
in: path
required: true
schema:
type: string
/owners/{ownerId}/pets/{petId}/edit:
get:
summary: GET /owners/{ownerId}/pets/{petId}/edit
operationId: getOwners_ownerId_pets_petId_edit
responses:
'200':
description: Success
'400':
description: Bad request
parameters:
- name: ownerId
in: path
required: true
schema:
type: string
- name: petId
in: path
required: true
schema:
type: string
/owners/{ownerId}/pets/{petId}/visits/new:
get:
summary: GET /owners/{ownerId}/pets/{petId}/visits/new
operationId: getOwners_ownerId_pets_petId_visits_new
responses:
'200':
description: Success
'400':
description: Bad request
parameters:
- name: ownerId
in: path
required: true
schema:
type: string
- name: petId
in: path
required: true
schema:
type: string
/owners/new:
get:
summary: GET /owners/new
operationId: getOwners_new
responses:
'200':
description: Success
'400':
description: Bad request
/owners/find:
get:
summary: GET /owners/find
operationId: getOwners_find
responses:
'200':
description: Success
'400':
description: Bad request
/owners:
get:
summary: GET /owners
operationId: getOwners
responses:
'200':
description: Success
'400':
description: Bad request
/owners/{ownerId}/edit:
get:
summary: GET /owners/{ownerId}/edit
operationId: getOwners_ownerId_edit
responses:
'200':
description: Success
'400':
description: Bad request
parameters:
- name: ownerId
in: path
required: true
schema:
type: string
/owners/{ownerId}:
get:
summary: GET /owners/{ownerId}
operationId: getOwners_ownerId
responses:
'200':
description: Success
'400':
description: Bad request
parameters:
- name: ownerId
in: path
required: true
schema:
type: string
/:
get:
summary: GET /
operationId: getRoot
responses:
'200':
description: Success
'400':
description: Bad request
/oups:
get:
summary: GET /oups
operationId: getOups
responses:
'200':
description: Success
'400':
description: Bad request
/actuator/prometheus:
get:
summary: Prometheus metrics
operationId: getMetrics
tags:
- System
responses:
'200':
description: text/plain; Prometheus exposition format

View File

@@ -0,0 +1,59 @@
# FALLBACK ConfigMap.
# This static skeleton is only used when The Watcher agent fails to generate
# a bespoke k6 script. When generation succeeds, the agent produces a custom
# ConfigMap containing the tailored load-test.js that replaces this file in
# the scaffolded output repository.
apiVersion: v1
kind: ConfigMap
metadata:
name: k6-test-${{ values.component_id }}
namespace: ${{ values.destination_namespace }}
labels:
app: ${{ values.component_id }}
app.kubernetes.io/managed-by: backstage
app.kubernetes.io/component: load-testing
data:
K6_OUT: "opentelemetry"
K6_OTEL_GRPC_EXPORTER_INSECURE: "true"
K6_OTEL_GRPC_EXPORTER_ENDPOINT: "otel-collector.monitoring.svc.cluster.local:4317"
K6_OTEL_METRIC_PREFIX: "k6_"
K6_OTEL_FLUSH_INTERVAL: "1000"
K6_OTEL_EXPORT_INTERVAL: "5000"
K6_OTEL_SERVICE_NAME: "k6-${{ values.component_id }}"
load-test.js: |
import http from 'k6/http';
import { check, sleep } from 'k6';
const vus = parseInt(__ENV.TEST_VUS || '10');
const duration = __ENV.TEST_DURATION || '30s';
const targetUrl = __ENV.TARGET_URL || 'http://localhost';
export const options = {
scenarios: {
load_test: {
executor: 'ramping-vus',
startVUs: 0,
stages: [
{ duration: '10s', target: vus },
{ duration: duration, target: vus },
{ duration: '5s', target: 0 },
],
},
},
thresholds: {
http_req_duration: ['p(95)<500'],
http_req_failed: ['rate<0.075'],
},
};
// Treat 2xx and 3xx responses as expected (redirects won't inflate http_req_failed)
http.setResponseCallback(http.expectedStatuses({ min: 200, max: 399 }));
export default function () {
const res = http.get(targetUrl);
check(res, {
'status is 200': (r) => r.status === 200,
'response time < 500ms': (r) => r.timings.duration < 500,
});
sleep(0.5);
}

View File

@@ -0,0 +1,14 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../deploy
patches:
- target:
kind: Deployment
name: petclinic
patch: "apiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: petclinic\nspec:\n\
\ template:\n metadata:\n annotations:\n instrumentation.opentelemetry.io/inject-java:\
\ monitoring/otel-instrumentation\n spec:\n containers:\n - name:\
\ workload\n env:\n - name: OTEL_SERVICE_NAME\n value:\
\ petclinic\n - name: OTEL_EXPORTER_OTLP_ENDPOINT\n value: http://otel-collector.monitoring.svc.cluster.local:4318\n\
\ - name: OTEL_RESOURCE_ATTRIBUTES\n value: app=test-alex-1-1\n"

View File

@@ -0,0 +1,19 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: petclinic
spec:
template:
metadata:
annotations:
instrumentation.opentelemetry.io/inject-java: monitoring/otel-instrumentation
spec:
containers:
- name: workload
env:
- name: OTEL_SERVICE_NAME
value: petclinic
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: http://otel-collector.monitoring.svc.cluster.local:4318
- name: OTEL_RESOURCE_ATTRIBUTES
value: app=test-alex-1-1

View File

@@ -1,63 +1,41 @@
apiVersion: score.dev/v1b1
metadata:
name: test-alex-1-1
labels:
app: test-alex-1-1
containers:
main:
test-alex-1-1:
image: .
variables:
# The Watcher's OTel work lands in overlays/otel/, which only ArgoCD reads. On the
# orchestrator path nothing consumes that overlay, so without these variables the
# renovated app emits no telemetry at all and never appears in Grafana.
OTEL_SERVICE_NAME: "test-alex-1-1"
OTEL_EXPORTER_OTLP_ENDPOINT: "http://otel-collector.monitoring.svc.cluster.local:4318"
OTEL_EXPORTER_OTLP_PROTOCOL: "http/protobuf"
OTEL_RESOURCE_ATTRIBUTES: "service.name=test-alex-1-1"
OTEL_METRICS_EXPORTER: "otlp"
OTEL_TRACES_EXPORTER: "otlp"
OTEL_LOGS_EXPORTER: "none"
DATABASE_URL: "postgresql://${resources.db.username}:${resources.db.password}@${resources.db.host}:${resources.db.port}/${resources.db.name}"
STORAGE_CONTAINER_NAME: "${resources.storage.container_name}"
STORAGE_ACCOUNT_NAME: "${resources.storage.storage_account_name}"
BLOB_ENDPOINT: "${resources.storage.blob_endpoint}"
service:
ports:
web:
port: 80
targetPort: 8080
SPRING_DATASOURCE_PASSWORD: ${resources.db.password}
SPRING_DATASOURCE_URL: jdbc:postgresql://${resources.db.host}:${resources.db.port}/${resources.db.name}
SPRING_DATASOURCE_USERNAME: ${resources.db.username}
OTEL_SERVICE_NAME: test-alex-1-1
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector.monitoring.svc.cluster.local:4318
OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf
OTEL_RESOURCE_ATTRIBUTES: service.name=test-alex-1-1,app=test-alex-1-1
OTEL_METRICS_EXPORTER: otlp
OTEL_TRACES_EXPORTER: otlp
OTEL_LOGS_EXPORTER: none
metadata:
annotations:
prometheus.io/path: /metrics
prometheus.io/port: '8080'
prometheus.io/scrape: 'true'
labels:
app: test-alex-1-1
backstage.io/kubernetes-id: test-alex-1-1
name: test-alex-1-1
resources:
env:
type: environment
# Gives the renovated workload a public HTTPS URL. Without this the deploy still goes
# green and the pod still runs -- there is simply no Ingress, no certificate and no
# hostname, so the demo's payoff (curl the renovated app) has nothing to hit.
#
# hostname is hardcoded to the apps domain deliberately: it is the only domain the apps
# cluster serves, and both the wildcard A record (*.apps.dev) and the cert-manager
# ClusterIssuer are scoped to exactly it.
#
# service_port is the Score `service.ports.web.port` below (80), NOT the container port.
# An Ingress naming a Service or port that does not exist fails at neither plan nor
# apply -- it surfaces only as nginx answering 503.
#
# CAVEAT: modernization-factory's generate_score_yaml rewrites BOTH `port` and
# `targetPort` to the detected application port whenever that port is not 8080. An app
# on 3000 therefore ends up with a Service on 3000 and this Ingress pointing at a port
# that no longer exists. Apps already listening on 8080 (Spring PetClinic among them)
# skip that patch entirely and are unaffected.
ingress:
type: workload-ingress
params:
name: test-alex-1-1
hostname: test-alex-1-1.apps.dev.crucible.kyndemo.live
service_name: test-alex-1-1
service_port: 80
db:
type: postgres
storage:
type: azure-blob
env:
type: environment
ingress:
params:
hostname: test-alex-1-1.apps.dev.crucible.kyndemo.live
name: test-alex-1-1
service_name: test-alex-1-1
service_port: 8080
type: workload-ingress
service:
ports:
http:
port: 8080
targetPort: 8080