# tigera-cs/quickstart-self-service architecture

> Architecture diagram of the GitHub repository tigera-cs/quickstart-self-service, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-10-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tigera-cs/quickstart-self-service
- Repository: https://github.com/tigera-cs/quickstart-self-service

## Overview

##### Project Type and Purpose
– This is not a traditional codebase but a self-guided workshop repository. Its goal is to teach “identity-aware microsegmentation” in Kubernetes using Calico Cloud. The “modules” folder holds instructional Markdown files; the “manifests” folder contains the YAML you apply against your cluster (apps and policy tiers).

##### File Structure Highlights
- Root
– README.md (workshop overview)
– quickstart-self-service.code-workspace
- manifests/
– apps/ (sample Kubernetes apps: Bookinfo, HipsterShop, YaoBank, LoadGenerator)
– Policies/ (5 security policy tiers: Default, Security, Platform, Application, AppSec)
– ingress/ (Ingress resource definitions per app)
– basepolicies/ (baseline tiered policy examples)
– securitypolicies/ (stage-by-stage policy snapshots for Steps 3–5)
- modules/
– module-n-intro.md (conceptual introductions)
– deploy-*.md, connect-*.md (lab instructions)
– analyze-*.md (flow analysis, service graphs, network sets)

##### Key Insights from README
– Workshop is organized into 5 Modules:
1. Lab Setup (cluster onboarding, app + ingress deployment)
2. Policy Constructs (anatomy of a Calico Policy)
3. Security-Tier Framework (Default, Security, Platform, Application, AppSec tiers)
4. Zero-Trust Methodology (Identify → Analyze → Deploy → Enforce → Remediate)
5. (Future content)

##### Main Components
a. Participant Environment
– CLI workstation (kubectl, Tigera CLI)
– Flow log aggregator (e.g., Elasticsearch/Kibana)
b. Calico Cloud Control Plane
– Policy manager API
– Service Graph engine
c. Kubernetes Cluster
– Control Plane (API Server, etcd, Controller Manager)
– Data Plane: worker nodes with Calico CNI plugin
– Pods running microservices (frontend, adservice, cartservice, etc.)
– Ingress Controller & Ingress resources
d. External Dependencies
– DNS (kube-dns/CoreDNS)
– External networks/third-party services (e.g., AlienVault IP Threat Feed)

##### Relationships & Interactions
– Participant pushes YAML manifests (apps + policy tiers) to the API Server
– Calico Cloud control plane reconciles policies → distributes to Calico CNI on nodes
– Ingress Controller routes inbound traffic to frontends, flows east-west between services
– Pods query DNS and external services via defined NetworkSets and tiers
– Flow logs & Service Graph telemetry are shipped to Kibana; used to iterate policy rules

##### Architectural Patterns & Principles
– Microservices pattern: each service in its own namespace/pod, connected via service mesh (network policies)
– Layered security tiers: policies applied in order (Default → Security → Platform → Application → AppSec)
– Zero-Trust: default-deny posture, iterative allow-listing based on observed flows
– Declarative infrastructure: manifests hold entire desired state

##### Technologies & Frameworks
– Kubernetes (API Server, Controller Manager, etcd, kube-dns)
– Calico Cloud (Cloud Control Plane, Service Graph, Policy APIs)
– Calico CNI plugin (policy enforcement at the data plane)
– Ingress Controller (Kubernetes Ingress resource support)
– Elasticsearch/Kibana (flow log storage, visualization)

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Participant Environment
    subgraph "Participant Environment"
        CLI["CLI Workstation\n(kubectl, Tigera CLI)"]:::participant
        Repo["Workshop Repo\n(Manifest & Modules)"]:::participant
    end

    %% Calico Cloud Control Plane
    subgraph "Calico Cloud Control Plane"
        PCC["Policy Manager API"]:::controlplane
        SG["Service Graph Engine"]:::controlplane
    end

    %% Kubernetes Control Plane
    subgraph "Kubernetes Control Plane"
        APIS["API Server"]:::controlplane
        ETCD["etcd"]:::controlplane
        CM["Controller Manager"]:::controlplane
    end

    %% Kubernetes Data Plane
    subgraph "Kubernetes Data Plane"
        CNI["Calico CNI Agent"]:::dataplane
        subgraph "Worker Node"
            Ingress["Ingress Controller"]:::dataplane
            Pods["Microservice Pods\n(frontend, adservice, cartservice, etc.)"]:::dataplane
        end
    end

    %% Policy Evaluation Chain
    subgraph "Policy Evaluation Chain"
        Default["Default Tier"]:::tier1
        Security["Security Tier"]:::tier2
        Platform["Platform Tier"]:::tier3
        Application["Application Tier"]:::tier4
        AppSec["AppSec Tier"]:::tier5
    end

    %% External Services
    subgraph "External Services"
        DNS["CoreDNS\n(kube-dns)"]:::external
        Threat["AlienVault Threat Feed"]:::external
        Kib["Elasticsearch/Kibana"]:::external
    end

    %% Connections
    CLI --> Repo
    Repo -->|"push manifests/apps & policies"| APIS
    APIS --> CM
    APIS --> ETCD
    APIS -->|"fetch policies"| PCC
    PCC -->|"distribute policies"| CNI
    CNI --> Default
    Default --> Security
    Security --> Platform
    Platform --> Application
    Application --> AppSec
    AppSec --> Pods
    Ingress --> Pods
    Pods -->|"DNS queries"| DNS
    Pods -->|"External calls"| Threat
    Pods -->|"flow logs"| Kib
    SG -->|"telemetry"| Kib

    %% Click Events
    click Repo "https://github.com/tigera-cs/quickstart-self-service/blob/main/quickstart-self-service.code-workspace"
    click CLI "https://github.com/tigera-cs/quickstart-self-service/blob/main/README.md"
    click WorkshopModules "https://github.com/tigera-cs/quickstart-self-service/tree/main/modules/"
    click SampleApps "https://github.com/tigera-cs/quickstart-self-service/tree/main/manifests/apps/"
    click PolicyTiers "https://github.com/tigera-cs/quickstart-self-service/tree/main/manifests/Policies/"
    click BasePolicies "https://github.com/tigera-cs/quickstart-self-service/tree/main/manifests/basepolicies/1-step-1/"
    click Step3Policies "https://github.com/tigera-cs/quickstart-self-service/tree/main/manifests/securitypolicies/step-3/"
    click Step5Policies "https://github.com/tigera-cs/quickstart-self-service/tree/main/manifests/securitypolicies/step-5/"

    %% Styles
    classDef participant fill:#E8F1FA,stroke:#1F618D,color:#1F618D;
    classDef controlplane fill:#FDEDEC,stroke:#C0392B,color:#C0392B;
    classDef dataplane fill:#FEF9E7,stroke:#B7950B,color:#B7950B;
    classDef external fill:#EBF5FB,stroke:#2E86C1,color:#2E86C1;
    classDef tier1 fill:#D5DBDB,stroke:#909497,color:#909497;
    classDef tier2 fill:#FADBD8,stroke:#CD6155,color:#CD6155;
    classDef tier3 fill:#FCF3CF,stroke:#F4D03F,color:#B7950B;
    classDef tier4 fill:#D6EAF8,stroke:#5DADE2,color:#21618C;
    classDef tier5 fill:#D4EFDF,stroke:#52BE80,color:#1D8348;
```
