Files
platform-docs/catalog/component/default/petclinic/README.md

5.5 KiB

title, generated_by, generated_at, human_edited, source_entity, source_repo
title generated_by generated_at human_edited source_entity source_repo
Petclinic Service documentor-agent 2026-06-08T16:14:03+00:00 false Component/default/petclinic https://gitea.kyndemo.live/validate/petclinic

Overview

The Petclinic service is a Spring Boot application designed to manage veterinary clinic operations, including scheduling appointments, managing pet records, and handling customer information. It serves as a foundational component of the broader Petclinic system, providing essential functionality for veterinary platforms.

This service is built using Java 17 and leverages Spring Boot for rapid development and deployment. It supports multiple database configurations, including in-memory H2, MySQL, and PostgreSQL, making it adaptable to various environments. Observability is integrated via OpenTelemetry, enabling detailed monitoring and performance analysis.

Petclinic plays a critical role in the system by ensuring reliable and scalable management of veterinary clinic data, while also serving as a demonstration of modern application development practices.

Repository

Field Value
Source Repo Petclinic Repository
Branch main
ArgoCD App petclinic
Namespace demo-apps

Architecture

The Petclinic service is a Spring Boot application deployed via ArgoCD in the demo-apps namespace. It integrates OpenTelemetry for observability and supports multiple database configurations, including H2, MySQL, and PostgreSQL. The deployment process involves continuous synchronization from the main branch of the source repository.

Key architectural components:

  • Spring Boot Framework: Provides the core application structure and dependency management.
  • Database Configurations: Supports H2 (default), MySQL, and PostgreSQL, with profiles for switching between them.
  • OpenTelemetry Integration: Enables tracing, metrics, and logging for detailed observability.
  • ArgoCD Deployment: Ensures continuous delivery and synchronization of application updates.

Configuration

Configuration Option Description
spring.profiles.active Sets the active profile for database configuration (mysql, postgres, or default h2).
MYSQL_USER MySQL username for database authentication.
MYSQL_PASSWORD MySQL password for database authentication.
POSTGRES_USER PostgreSQL username for database authentication.
POSTGRES_PASSWORD PostgreSQL password for database authentication.

Operations

Running Locally

  1. Clone the repository:
    git clone https://gitea.kyndemo.live/validate/petclinic.git
    cd petclinic
    
  2. Start the application:
    • Using Maven:
      ./mvnw spring-boot:run
      
    • Using Gradle:
      ./gradlew bootRun
      
  3. Access the application at http://localhost:8080.

Container Deployment

  1. Build the container image:
    ./mvnw spring-boot:build-image
    
  2. Run the container:
    docker run -p 8080:8080 docker.io/library/spring-petclinic:latest
    

Rollback

  1. Open the ArgoCD UI.
  2. Click History and Rollback.
  3. Select the desired revision and click Rollback.

Alternatively, revert the commit in Git and push — ArgoCD will auto-sync the rollback.

Observability

This service is configured with OpenTelemetry instrumentation. Metrics, traces, and logs are exported to the OTel Collector and visualized in Grafana.

  • Grafana Dashboard: Petclinic Observability
  • Alerting: Alerts are configured via Grafana and can be filtered by app=petclinic.

Additional observability details are available in the platform observability documentation.

Dependencies

  • component:default/argocd-service
  • resource:default/k6-operator
  • resource:default/otel-collector
  • resource:default/veterinary-platform