# hekumar2112/blueprint architecture

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

- Interactive diagram: https://gitdiagram.com/hekumar2112/blueprint
- Repository: https://github.com/hekumar2112/blueprint

## Overview

This repository is a Kubernetes/Kasten configuration product for logical etcd backups on kubeadm clusters using distroless etcd. The documented workflow binds a Secret annotation to a Kanister Blueprint, takes and verifies a snapshot, uploads it through the configured Kasten location profile, then removes the temporary file. The graph follows those documented stages and the PodSecurity requirement; source excerpts were unavailable, so relationships are evidenced by the README rather than inspected YAML.

Main entry points: [`etcd-blueprint.yaml`](https://github.com/hekumar2112/blueprint/blob/main/etcd-blueprint.yaml) (Upload snapshot), [`etcd-blueprintbinding.yaml`](https://github.com/hekumar2112/blueprint/blob/main/etcd-blueprintbinding.yaml) (Blueprint binding), [`kasten-io-podsecurity-patch.yaml`](https://github.com/hekumar2112/blueprint/blob/main/kasten-io-podsecurity-patch.yaml) (PodSecurity patch), [`etcd-details-secret.yaml`](https://github.com/hekumar2112/blueprint/blob/main/etcd-details-secret.yaml) (etcd details Secret)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_trigger["Backup Trigger"]
  node_policy(("Kasten backup policy"))
  node_secret["etcd details Secret"]
  node_binding["Blueprint binding"]
end

subgraph group_workflow["Snapshot Workflow"]
  node_blueprint["Kanister blueprint"]
  node_snapshot["Take and verify snapshot"]
  node_upload["Upload snapshot"]
  node_cleanup["Remove snapshot"]
  node_profile["Kasten location profile"]
end

subgraph group_cluster["Cluster Access"]
  node_etcd["etcd static pod"]
  node_nodefile[("Node snapshot file")]
  node_podsecurity["PodSecurity patch"]
end

node_policy -->|"triggers binding"| node_binding
node_secret -->|"annotation matched"| node_binding
node_binding -->|"selects blueprint"| node_blueprint
node_blueprint -->|"defines phase"| node_snapshot
node_snapshot -->|"executes etcdctl"| node_etcd
node_snapshot -->|"writes snapshot"| node_nodefile
node_snapshot -->|"then runs"| node_upload
node_upload -->|"reads snapshot"| node_nodefile
node_upload -->|"pushes artifact"| node_profile
node_upload -->|"then runs"| node_cleanup
node_cleanup -->|"deletes snapshot"| node_nodefile
node_podsecurity -->|"permits hostPath"| node_upload
node_podsecurity -->|"permits hostPath"| node_cleanup

click node_secret "https://github.com/hekumar2112/blueprint/blob/main/etcd-details-secret.yaml"
click node_binding "https://github.com/hekumar2112/blueprint/blob/main/etcd-blueprintbinding.yaml"
click node_blueprint "https://github.com/hekumar2112/blueprint/blob/main/etcd-blueprint.yaml"
click node_snapshot "https://github.com/hekumar2112/blueprint/blob/main/etcd-blueprint.yaml"
click node_upload "https://github.com/hekumar2112/blueprint/blob/main/etcd-blueprint.yaml"
click node_cleanup "https://github.com/hekumar2112/blueprint/blob/main/etcd-blueprint.yaml"
click node_podsecurity "https://github.com/hekumar2112/blueprint/blob/main/kasten-io-podsecurity-patch.yaml"

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_policy,node_secret,node_binding toneBlue
class node_blueprint,node_snapshot,node_upload,node_cleanup,node_profile toneAmber
class node_etcd,node_nodefile,node_podsecurity toneMint
```

## Components

### Backup Trigger

- **Kasten backup policy**
- [etcd details Secret](https://github.com/hekumar2112/blueprint/blob/main/etcd-details-secret.yaml): `etcd-details-secret.yaml`
- [Blueprint binding](https://github.com/hekumar2112/blueprint/blob/main/etcd-blueprintbinding.yaml): `etcd-blueprintbinding.yaml`

### Snapshot Workflow

- [Kanister blueprint](https://github.com/hekumar2112/blueprint/blob/main/etcd-blueprint.yaml): `etcd-blueprint.yaml`
- [Take and verify snapshot](https://github.com/hekumar2112/blueprint/blob/main/etcd-blueprint.yaml): `etcd-blueprint.yaml`
- [Upload snapshot](https://github.com/hekumar2112/blueprint/blob/main/etcd-blueprint.yaml): `etcd-blueprint.yaml`
- [Remove snapshot](https://github.com/hekumar2112/blueprint/blob/main/etcd-blueprint.yaml): `etcd-blueprint.yaml`
- **Kasten location profile**

### Cluster Access

- **etcd static pod**
- **Node snapshot file**
- [PodSecurity patch](https://github.com/hekumar2112/blueprint/blob/main/kasten-io-podsecurity-patch.yaml): `kasten-io-podsecurity-patch.yaml`

## Connections

- Kasten backup policy → Blueprint binding: triggers binding (evidence: `README.md`)
- etcd details Secret → Blueprint binding: annotation matched (evidence: `README.md`)
- Blueprint binding → Kanister blueprint: selects blueprint (evidence: `README.md`)
- Kanister blueprint → Take and verify snapshot: defines phase (evidence: `README.md`)
- Take and verify snapshot → etcd static pod: executes etcdctl (evidence: `README.md`)
- Take and verify snapshot → Node snapshot file: writes snapshot (evidence: `README.md`)
- Take and verify snapshot → Upload snapshot: then runs (evidence: `README.md`)
- Upload snapshot → Node snapshot file: reads snapshot (evidence: `README.md`)
- Upload snapshot → Kasten location profile: pushes artifact (evidence: `README.md`)
- Upload snapshot → Remove snapshot: then runs (evidence: `README.md`)
- Remove snapshot → Node snapshot file: deletes snapshot (evidence: `README.md`)
- PodSecurity patch → Upload snapshot: permits hostPath (evidence: `README.md`)
- PodSecurity patch → Remove snapshot: permits hostPath (evidence: `README.md`)
