# rscrafted/springboot-jenkins-k8s-automation architecture

> Architecture diagram of the GitHub repository rscrafted/springboot-jenkins-k8s-automation, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rscrafted/springboot-jenkins-k8s-automation
- Repository: https://github.com/rscrafted/springboot-jenkins-k8s-automation

## Overview

This repository demonstrates a Jenkins-to-Kubernetes delivery pipeline for a Spring Boot inventory service. The documented flow starts with a developer commit, then builds and packages the app, creates and publishes a Docker image, and deploys it to a cluster. At runtime, clients request inventory data from the service, which returns a fixed list of products. The graph also includes the documented health endpoint and Helm deployment capability. Pipeline wiring is based on the README; Jenkinsfile and manifest internals were not sampled.

Main entry points: [`src/main/java/com/rsinventory/InventoryController.java`](https://github.com/rscrafted/springboot-jenkins-k8s-automation/blob/main/src/main/java/com/rsinventory/InventoryController.java) (Inventory Endpoint), [`Jenkinsfile`](https://github.com/rscrafted/springboot-jenkins-k8s-automation/blob/main/Jenkinsfile) (Jenkins Pipeline), [`k8s/service.yaml`](https://github.com/rscrafted/springboot-jenkins-k8s-automation/blob/main/k8s/service.yaml) (NodePort Service), [`Dockerfile`](https://github.com/rscrafted/springboot-jenkins-k8s-automation/blob/main/Dockerfile) (Build Image)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pipeline["CI/CD Pipeline"]
  node_jenkins["Jenkins Pipeline"]
  node_build["Compile and Test<br/>[pom.xml]"]
  node_package["Package Application<br/>[pom.xml]"]
end

subgraph group_image["Image Distribution"]
  node_docker["Build Image"]
  node_registry[("Docker Hub")]
end

subgraph group_runtime["Inventory Service"]
  node_application["Spring Boot App<br/>[Application.java]"]
  node_controller["Inventory Endpoint"]
  node_product["Product Model<br/>[Product.java]"]
  node_inventory["Inventory Response"]
  node_health["Health Endpoint"]
end

subgraph group_deployment["Cluster Deployment"]
  node_cluster["Kubernetes Cluster"]
  node_deploymentmanifest["App Deployment<br/>[deployment.yaml]"]
  node_service["NodePort Service<br/>[service.yaml]"]
  node_helm["Helm Release"]
end

node_developer(("Developer"))
node_client(("API Client"))

node_developer -->|"commits to"| node_jenkins
node_jenkins -->|"runs"| node_build
node_jenkins -->|"runs"| node_package
node_jenkins -->|"builds"| node_docker
node_docker -->|"pushes image"| node_registry
node_jenkins -->|"applies manifests"| node_cluster
node_registry -->|"provides image"| node_deploymentmanifest
node_deploymentmanifest -->|"deploys to"| node_cluster
node_service -->|"exposes app"| node_cluster
node_helm -.->|"deploys release"| node_cluster
node_application -->|"starts"| node_controller
node_controller -->|"creates"| node_product
node_controller -->|"returns"| node_inventory
node_client -->|"requests"| node_service
node_service -->|"routes to"| node_controller
node_controller -->|"serves health"| node_health
node_controller -->|"returns response"| node_client

click node_jenkins "https://github.com/rscrafted/springboot-jenkins-k8s-automation/blob/main/Jenkinsfile"
click node_build "https://github.com/rscrafted/springboot-jenkins-k8s-automation/blob/main/pom.xml"
click node_package "https://github.com/rscrafted/springboot-jenkins-k8s-automation/blob/main/pom.xml"
click node_docker "https://github.com/rscrafted/springboot-jenkins-k8s-automation/blob/main/Dockerfile"
click node_deploymentmanifest "https://github.com/rscrafted/springboot-jenkins-k8s-automation/blob/main/k8s/deployment.yaml"
click node_service "https://github.com/rscrafted/springboot-jenkins-k8s-automation/blob/main/k8s/service.yaml"
click node_helm "https://github.com/rscrafted/springboot-jenkins-k8s-automation/tree/main/helm/rs-inventory-app"
click node_application "https://github.com/rscrafted/springboot-jenkins-k8s-automation/blob/main/src/main/java/com/rsinventory/Application.java"
click node_controller "https://github.com/rscrafted/springboot-jenkins-k8s-automation/blob/main/src/main/java/com/rsinventory/InventoryController.java"
click node_product "https://github.com/rscrafted/springboot-jenkins-k8s-automation/blob/main/src/main/java/com/rsinventory/Product.java"
click node_health "https://github.com/rscrafted/springboot-jenkins-k8s-automation/blob/main/src/main/resources/application.properties"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_jenkins,node_build,node_package,node_client toneBlue
class node_docker,node_registry toneAmber
class node_application,node_controller,node_product,node_inventory,node_health toneMint
class node_cluster,node_deploymentmanifest,node_service,node_helm toneRose
class node_developer toneIndigo
```

## Components

### CI/CD Pipeline

- [Jenkins Pipeline](https://github.com/rscrafted/springboot-jenkins-k8s-automation/blob/main/Jenkinsfile): `Jenkinsfile`
- [Compile and Test](https://github.com/rscrafted/springboot-jenkins-k8s-automation/blob/main/pom.xml): `pom.xml`
- [Package Application](https://github.com/rscrafted/springboot-jenkins-k8s-automation/blob/main/pom.xml): `pom.xml`

### Image Distribution

- [Build Image](https://github.com/rscrafted/springboot-jenkins-k8s-automation/blob/main/Dockerfile): `Dockerfile`
- **Docker Hub**

### Inventory Service

- [Spring Boot App](https://github.com/rscrafted/springboot-jenkins-k8s-automation/blob/main/src/main/java/com/rsinventory/Application.java): `src/main/java/com/rsinventory/Application.java`
- [Inventory Endpoint](https://github.com/rscrafted/springboot-jenkins-k8s-automation/blob/main/src/main/java/com/rsinventory/InventoryController.java): `src/main/java/com/rsinventory/InventoryController.java`
- [Product Model](https://github.com/rscrafted/springboot-jenkins-k8s-automation/blob/main/src/main/java/com/rsinventory/Product.java): `src/main/java/com/rsinventory/Product.java`
- **Inventory Response**
- [Health Endpoint](https://github.com/rscrafted/springboot-jenkins-k8s-automation/blob/main/src/main/resources/application.properties): `src/main/resources/application.properties`

### Cluster Deployment

- **Kubernetes Cluster**
- [App Deployment](https://github.com/rscrafted/springboot-jenkins-k8s-automation/blob/main/k8s/deployment.yaml): `k8s/deployment.yaml`
- [NodePort Service](https://github.com/rscrafted/springboot-jenkins-k8s-automation/blob/main/k8s/service.yaml): `k8s/service.yaml`
- [Helm Release](https://github.com/rscrafted/springboot-jenkins-k8s-automation/tree/main/helm/rs-inventory-app): `helm/rs-inventory-app`

### Other components

- **Developer**
- **API Client**

## Connections

- Developer → Jenkins Pipeline: commits to
- Jenkins Pipeline → Compile and Test: runs
- Jenkins Pipeline → Package Application: runs
- Jenkins Pipeline → Build Image: builds
- Build Image → Docker Hub: pushes image
- Jenkins Pipeline → Kubernetes Cluster: applies manifests
- Docker Hub → App Deployment: provides image
- App Deployment → Kubernetes Cluster: deploys to
- NodePort Service → Kubernetes Cluster: exposes app
- Helm Release → Kubernetes Cluster: deploys release
- Spring Boot App → Inventory Endpoint: starts
- Inventory Endpoint → Product Model: creates
- Inventory Endpoint → Inventory Response: returns
- API Client → NodePort Service: requests
- NodePort Service → Inventory Endpoint: routes to
- Inventory Endpoint → Health Endpoint: serves health
- Inventory Endpoint → API Client: returns response
