# pika-chew/dangcharge_infra architecture

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

- Interactive diagram: https://gitdiagram.com/pika-chew/dangcharge_infra
- Repository: https://github.com/pika-chew/dangcharge_infra

## Overview

This repository appears to provide Ansible configuration for Kubernetes infrastructure and Jenkins. The likely operator workflow is to run a playbook against the inventory, which configures hosts through roles; separate playbooks and roles also cover Jenkins and worker decommissioning. The README only names the infrastructure project, and no source excerpts show playbook-to-role calls, so relationships are omitted rather than inferred from filenames.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_provisioning["Host Provisioning"]
  node_inventory["Inventory and Vars"]
  node_site_playbook["Site Playbook<br/>[site.yml]"]
  node_common_role["Common Setup<br/>[main.yml]"]
  node_containerd_role["Containerd Setup<br/>[main.yml]"]
  node_docker_role["Docker Setup<br/>[main.yml]"]
end

subgraph group_cluster["Kubernetes Cluster"]
  node_control_plane["Control Plane<br/>[main.yml]"]
  node_kubernetes_role["Kubernetes Setup<br/>[main.yml]"]
  node_cni_role["CNI Setup<br/>[main.yml]"]
  node_worker_role["Worker Setup<br/>[main.yml]"]
  node_decommission_playbook["Decommission Playbook"]
  node_worker_reset["Worker Reset<br/>[main.yml]"]
end

subgraph group_ci["Jenkins CI"]
  node_jenkins_playbook["Jenkins Playbook<br/>[jenkins.yml]"]
  node_jenkins_docker_playbook["Jenkins Docker Playbook<br/>[jenkins-docker.yml]"]
  node_jenkins_role["Jenkins Setup<br/>[main.yml]"]
  node_jenkins_compose["Jenkins Compose"]
end

node_operator(("Operator"))

click node_inventory "https://github.com/pika-chew/dangcharge_infra/tree/main/ansible/inventory"
click node_site_playbook "https://github.com/pika-chew/dangcharge_infra/blob/main/ansible/playbooks/site.yml"
click node_common_role "https://github.com/pika-chew/dangcharge_infra/blob/main/ansible/roles/common/tasks/main.yml"
click node_containerd_role "https://github.com/pika-chew/dangcharge_infra/blob/main/ansible/roles/containerd/tasks/main.yml"
click node_docker_role "https://github.com/pika-chew/dangcharge_infra/blob/main/ansible/roles/docker/tasks/main.yml"
click node_control_plane "https://github.com/pika-chew/dangcharge_infra/blob/main/ansible/roles/control-plane/tasks/main.yml"
click node_kubernetes_role "https://github.com/pika-chew/dangcharge_infra/blob/main/ansible/roles/kubernetes/tasks/main.yml"
click node_cni_role "https://github.com/pika-chew/dangcharge_infra/blob/main/ansible/roles/cni/tasks/main.yml"
click node_worker_role "https://github.com/pika-chew/dangcharge_infra/blob/main/ansible/roles/worker/tasks/main.yml"
click node_decommission_playbook "https://github.com/pika-chew/dangcharge_infra/blob/main/ansible/playbooks/decommission-worker.yml"
click node_worker_reset "https://github.com/pika-chew/dangcharge_infra/blob/main/ansible/roles/worker-reset/tasks/main.yml"
click node_jenkins_playbook "https://github.com/pika-chew/dangcharge_infra/blob/main/ansible/playbooks/jenkins.yml"
click node_jenkins_docker_playbook "https://github.com/pika-chew/dangcharge_infra/blob/main/ansible/playbooks/jenkins-docker.yml"
click node_jenkins_role "https://github.com/pika-chew/dangcharge_infra/blob/main/ansible/roles/jenkins/tasks/main.yml"
click node_jenkins_compose "https://github.com/pika-chew/dangcharge_infra/blob/main/ansible/roles/jenkins/templates/docker-compose.yml.j2"

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_inventory,node_site_playbook,node_common_role,node_containerd_role,node_docker_role toneBlue
class node_control_plane,node_kubernetes_role,node_cni_role,node_worker_role,node_decommission_playbook,node_worker_reset toneAmber
class node_jenkins_playbook,node_jenkins_docker_playbook,node_jenkins_role,node_jenkins_compose toneMint
class node_operator toneIndigo
```

## Components

### Host Provisioning

- [Inventory and Vars](https://github.com/pika-chew/dangcharge_infra/tree/main/ansible/inventory): `ansible/inventory`
- [Site Playbook](https://github.com/pika-chew/dangcharge_infra/blob/main/ansible/playbooks/site.yml): `ansible/playbooks/site.yml`
- [Common Setup](https://github.com/pika-chew/dangcharge_infra/blob/main/ansible/roles/common/tasks/main.yml): `ansible/roles/common/tasks/main.yml`
- [Containerd Setup](https://github.com/pika-chew/dangcharge_infra/blob/main/ansible/roles/containerd/tasks/main.yml): `ansible/roles/containerd/tasks/main.yml`
- [Docker Setup](https://github.com/pika-chew/dangcharge_infra/blob/main/ansible/roles/docker/tasks/main.yml): `ansible/roles/docker/tasks/main.yml`

### Kubernetes Cluster

- [Control Plane](https://github.com/pika-chew/dangcharge_infra/blob/main/ansible/roles/control-plane/tasks/main.yml): `ansible/roles/control-plane/tasks/main.yml`
- [Kubernetes Setup](https://github.com/pika-chew/dangcharge_infra/blob/main/ansible/roles/kubernetes/tasks/main.yml): `ansible/roles/kubernetes/tasks/main.yml`
- [CNI Setup](https://github.com/pika-chew/dangcharge_infra/blob/main/ansible/roles/cni/tasks/main.yml): `ansible/roles/cni/tasks/main.yml`
- [Worker Setup](https://github.com/pika-chew/dangcharge_infra/blob/main/ansible/roles/worker/tasks/main.yml): `ansible/roles/worker/tasks/main.yml`
- [Decommission Playbook](https://github.com/pika-chew/dangcharge_infra/blob/main/ansible/playbooks/decommission-worker.yml): `ansible/playbooks/decommission-worker.yml`
- [Worker Reset](https://github.com/pika-chew/dangcharge_infra/blob/main/ansible/roles/worker-reset/tasks/main.yml): `ansible/roles/worker-reset/tasks/main.yml`

### Jenkins CI

- [Jenkins Playbook](https://github.com/pika-chew/dangcharge_infra/blob/main/ansible/playbooks/jenkins.yml): `ansible/playbooks/jenkins.yml`
- [Jenkins Docker Playbook](https://github.com/pika-chew/dangcharge_infra/blob/main/ansible/playbooks/jenkins-docker.yml): `ansible/playbooks/jenkins-docker.yml`
- [Jenkins Setup](https://github.com/pika-chew/dangcharge_infra/blob/main/ansible/roles/jenkins/tasks/main.yml): `ansible/roles/jenkins/tasks/main.yml`
- [Jenkins Compose](https://github.com/pika-chew/dangcharge_infra/blob/main/ansible/roles/jenkins/templates/docker-compose.yml.j2): `ansible/roles/jenkins/templates/docker-compose.yml.j2`

### Other components

- **Operator**
