# dolev225/docker-k8s-depploy-myapp architecture

> Architecture diagram of the GitHub repository dolev225/docker-k8s-depploy-myapp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dolev225/docker-k8s-depploy-myapp
- Repository: https://github.com/dolev225/docker-k8s-depploy-myapp

## Overview

This repository pairs a Flask sample application that generates and exposes Prometheus metrics with Docker and Helm deployment assets. The user-facing flow is to run the app, view its counter and metadata page or scrape `/metrics`, then deploy the container locally or through Helm. The README also documents a Jenkins pipeline, but its implementation and the Docker and chart templates were not sampled, so those deployment relationships are shown only where documented.

Main entry points: [`myapp.py`](https://github.com/dolev225/docker-k8s-depploy-myapp/blob/main/myapp.py) (Flask server), [`chart/Chart.yaml`](https://github.com/dolev225/docker-k8s-depploy-myapp/blob/main/chart/Chart.yaml) (Helm chart), [`Dockerfile`](https://github.com/dolev225/docker-k8s-depploy-myapp/blob/main/Dockerfile) (Container image), [`chart/templates/service.yaml`](https://github.com/dolev225/docker-k8s-depploy-myapp/blob/main/chart/templates/service.yaml) (Kubernetes service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_application["Flask application"]
  node_flask["Flask server<br/>[myapp.py]"]
  node_status_page["Counters and app info<br/>[myapp.py]"]
end

subgraph group_observability["Metrics and observability"]
  node_metrics_route["Metrics endpoint<br/>[myapp.py]"]
  node_registry[("Prometheus registry<br/>[myapp.py]")]
  node_metric_collectors["Metric collectors<br/>[myapp.py]"]
  node_traffic_simulator["Traffic simulator<br/>[myapp.py]"]
end

subgraph group_container["Container packaging"]
  node_docker_image["Container image"]
end

subgraph group_deployment["Helm deployment"]
  node_helm_chart["Helm chart<br/>[Chart.yaml]"]
  node_chart_values["Chart values<br/>[values.yaml]"]
  node_workload["Kubernetes workload<br/>[deployment.yaml]"]
  node_service["Kubernetes service<br/>[service.yaml]"]
  node_ingress["Ingress routing<br/>[ingress.yaml]"]
  node_jenkins["Jenkins pipeline"]
end

node_visitor(("Browser or scraper"))

node_visitor -->|"requests"| node_flask
node_flask -->|"routes &#96;/&#96;"| node_status_page
node_flask -->|"routes &#96;/metrics&#96;"| node_metrics_route
node_status_page -->|"reads counters"| node_registry
node_metrics_route -->|"scrapes metrics"| node_registry
node_metric_collectors -->|"registers metrics"| node_registry
node_traffic_simulator -->|"updates metrics"| node_registry
node_visitor -->|"builds and runs"| node_docker_image
node_docker_image -->|"runs app"| node_flask
node_visitor -->|"installs chart"| node_helm_chart
node_helm_chart -.->|"uses values"| node_chart_values
node_helm_chart -->|"deploys image"| node_workload
node_visitor -->|"port-forwards"| node_service
node_ingress -.->|"routes traffic"| node_service
node_jenkins -.->|"builds image"| node_docker_image

click node_flask "https://github.com/dolev225/docker-k8s-depploy-myapp/blob/main/myapp.py"
click node_status_page "https://github.com/dolev225/docker-k8s-depploy-myapp/blob/main/myapp.py"
click node_metrics_route "https://github.com/dolev225/docker-k8s-depploy-myapp/blob/main/myapp.py"
click node_registry "https://github.com/dolev225/docker-k8s-depploy-myapp/blob/main/myapp.py"
click node_metric_collectors "https://github.com/dolev225/docker-k8s-depploy-myapp/blob/main/myapp.py"
click node_traffic_simulator "https://github.com/dolev225/docker-k8s-depploy-myapp/blob/main/myapp.py"
click node_docker_image "https://github.com/dolev225/docker-k8s-depploy-myapp/blob/main/Dockerfile"
click node_helm_chart "https://github.com/dolev225/docker-k8s-depploy-myapp/blob/main/chart/Chart.yaml"
click node_chart_values "https://github.com/dolev225/docker-k8s-depploy-myapp/blob/main/chart/values.yaml"
click node_workload "https://github.com/dolev225/docker-k8s-depploy-myapp/blob/main/chart/templates/deployment.yaml"
click node_service "https://github.com/dolev225/docker-k8s-depploy-myapp/blob/main/chart/templates/service.yaml"
click node_ingress "https://github.com/dolev225/docker-k8s-depploy-myapp/blob/main/chart/templates/ingress.yaml"
click node_jenkins "https://github.com/dolev225/docker-k8s-depploy-myapp/blob/main/Jenkinsfile"

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_flask,node_status_page,node_visitor toneBlue
class node_metrics_route,node_registry,node_metric_collectors,node_traffic_simulator toneAmber
class node_docker_image toneMint
class node_helm_chart,node_chart_values,node_workload,node_service,node_ingress,node_jenkins toneRose
```

## Components

### Flask application

- [Flask server](https://github.com/dolev225/docker-k8s-depploy-myapp/blob/main/myapp.py): `myapp.py`
- [Counters and app info](https://github.com/dolev225/docker-k8s-depploy-myapp/blob/main/myapp.py): `myapp.py`

### Metrics and observability

- [Metrics endpoint](https://github.com/dolev225/docker-k8s-depploy-myapp/blob/main/myapp.py): `myapp.py`
- [Prometheus registry](https://github.com/dolev225/docker-k8s-depploy-myapp/blob/main/myapp.py): `myapp.py`
- [Metric collectors](https://github.com/dolev225/docker-k8s-depploy-myapp/blob/main/myapp.py): `myapp.py`
- [Traffic simulator](https://github.com/dolev225/docker-k8s-depploy-myapp/blob/main/myapp.py): `myapp.py`

### Container packaging

- [Container image](https://github.com/dolev225/docker-k8s-depploy-myapp/blob/main/Dockerfile): `Dockerfile`

### Helm deployment

- [Helm chart](https://github.com/dolev225/docker-k8s-depploy-myapp/blob/main/chart/Chart.yaml): `chart/Chart.yaml`
- [Chart values](https://github.com/dolev225/docker-k8s-depploy-myapp/blob/main/chart/values.yaml): `chart/values.yaml`
- [Kubernetes workload](https://github.com/dolev225/docker-k8s-depploy-myapp/blob/main/chart/templates/deployment.yaml): `chart/templates/deployment.yaml`
- [Kubernetes service](https://github.com/dolev225/docker-k8s-depploy-myapp/blob/main/chart/templates/service.yaml): `chart/templates/service.yaml`
- [Ingress routing](https://github.com/dolev225/docker-k8s-depploy-myapp/blob/main/chart/templates/ingress.yaml): `chart/templates/ingress.yaml`
- [Jenkins pipeline](https://github.com/dolev225/docker-k8s-depploy-myapp/blob/main/Jenkinsfile): `Jenkinsfile`

### Other components

- **Browser or scraper**

## Connections

- Browser or scraper → Flask server: requests (evidence: `myapp.py`)
- Flask server → Counters and app info: routes `/` (evidence: `myapp.py`)
- Flask server → Metrics endpoint: routes `/metrics` (evidence: `myapp.py`)
- Counters and app info → Prometheus registry: reads counters (evidence: `myapp.py`)
- Metrics endpoint → Prometheus registry: scrapes metrics (evidence: `myapp.py`)
- Metric collectors → Prometheus registry: registers metrics (evidence: `myapp.py`)
- Traffic simulator → Prometheus registry: updates metrics (evidence: `myapp.py`)
- Browser or scraper → Container image: builds and runs (evidence: `README.md`)
- Container image → Flask server: runs app (evidence: `README.md`)
- Browser or scraper → Helm chart: installs chart (evidence: `README.md`)
- Helm chart → Chart values: uses values
- Helm chart → Kubernetes workload: deploys image (evidence: `README.md`)
- Browser or scraper → Kubernetes service: port-forwards (evidence: `README.md`)
- Ingress routing → Kubernetes service: routes traffic
- Jenkins pipeline → Container image: builds image
