Files
platform-docs/catalog/component/default/petclinic

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:23:20+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 business logic and data management capabilities.

This service is deployed in the demo-apps namespace and managed via ArgoCD. It integrates with OpenTelemetry for observability, supports load testing via k6, and includes chaos engineering capabilities through Chaos Mesh. The application is built using Java 17 and can be run locally or deployed in containerized environments.

Repository

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

Architecture

The Petclinic service is a Spring Boot application that communicates with an in-memory H2 database by default. It supports integration with MySQL and PostgreSQL for persistent storage, configurable via Spring profiles. The service is instrumented with OpenTelemetry for tracing and metrics, and its deployment is managed by ArgoCD, ensuring continuous synchronization with the source repository.

Key architectural components:

  • Spring Boot Framework: Provides the application runtime and dependency management.
  • Database Options: Default H2 database, with optional MySQL or PostgreSQL configurations.
  • Observability: OpenTelemetry instrumentation for metrics, traces, and logs.
  • Deployment: Managed via ArgoCD in the demo-apps namespace.

Configuration

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

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
    

Database Configuration

  • Default: In-memory H2 database.
  • MySQL:
    docker run -e MYSQL_USER=petclinic -e MYSQL_PASSWORD=petclinic -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=petclinic -p 3306:3306 mysql:9.6
    
  • PostgreSQL:
    docker run -e POSTGRES_USER=petclinic -e POSTGRES_PASSWORD=petclinic -e POSTGRES_DB=petclinic -p 5432:5432 postgres:18.3
    

Observability

The Petclinic service is fully instrumented with OpenTelemetry for observability. Metrics, traces, and logs are exported to the OTel Collector and visualized in Grafana.

Dependencies

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