# flavorplus/gitops-cert-level-2-examples architecture

> Architecture diagram of the GitHub repository flavorplus/gitops-cert-level-2-examples, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/flavorplus/gitops-cert-level-2-examples
- Repository: https://github.com/flavorplus/gitops-cert-level-2-examples

## Overview

##### Project Type and Purpose
- The README tells us it is for the “Codefresh GitOps Certification examples – Level 2” workshop. Thus, the repository isn’t a production application per se—it’s rather a collection of sample configurations and best practices for managing Kubernetes resources using GitOps.
- The project focuses on demonstrating varied GitOps techniques such as app-of-apps, application sets, environment promotion, custom diff strategies, image-updater functionalities, and notifications setups.

##### File Structure
- At the top level, you see a few categories:
- Directories like “app-of-apps” and “application-sets” indicate common architectural patterns used in GitOps to manage multiple applications and environments.
- “custom-diff”, “environment-promotion”, and “sync-hooks-waves” suggest advanced GitOps operations including custom comparison logic, promoting environments, and handling application sync hooks.
- “image-updater” shows an example of automating image version updates.
- Additional directories such as “notifications”, “argocd-noauth”, “source-code-configmap”, and “solutions” highlight various integration points and demonstrations.
- The “.github/workflows” directory indicates that GitHub Actions are used for CI/CD and possibly for automating tasks like Docker publishing or promoting changes.
- The structure implies a modular, multi-component setup where each directory stands as an independent example or use-case feature, yet collectively they show how GitOps supports diverse operations within a Kubernetes cluster.

##### Extract Key Insights from the README
- The single-line description reinforces that these are certification examples aimed at teaching GitOps at scale.

a. Main Components:
- Git Repository: Represent the repository as the source of truth containing all manifest examples.
- Continuous Integration/Delivery: Include the GitHub Actions workflows that automate builds, tests, and possibly promotions.
- ArgoCD Server & Controllers: Illustrate the ArgoCD components that continuously monitor and sync the stated configurations from the repository to the Kubernetes clusters.
- Modular Examples: Create grouped blocks for key patterns such as:
º App-of-apps: Demonstrates using a parent-child application management pattern.
º Application Sets: For dynamically managing groups of applications.
º Custom Diff & Environment Promotion: For advanced diffing logic and multi-environment promotion workflows.
º Image Updater & Notifications: For automated image updates and alerting mechanisms.
b. Relationships and Interactions:
- Git repository (on the left) triggering CI workflows (via GitHub Actions).
- How those workflows feed into the ArgoCD server.
- Within the cluster, show that multiple modules (app-of-apps, env promotion, etc.) operate as separate yet interconnected components.
- External integrations where applicable – for instance, how notifications or external helm applications might be integrated.
c. Architectural Patterns:
- GitOps pattern where source control is the single source of truth.
- How “app-of-apps” and “application sets” serve as examples of declarative infrastructure management.
- Mention usage of custom sync hooks and diff strategies as advanced configuration management techniques.
d. Technologies and Frameworks:
- ArgoCD is central to the GitOps implementation.
- GitHub Actions (as shown in .github/workflows) automate CI/CD operations.
- Kubernetes manifests (YAML files) are used throughout to define deployments, services, and other resources.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Source Control & CI/CD Layer
    subgraph "Source Control & CI/CD"
        GR("Git Repository"):::repo
        CI("CI/CD (GitHub Actions)"):::ci
        GR -->|"triggers"| CI
    end

    %% Management & Deployment Layer
    subgraph "Management & Deployment"
        AC("ArgoCD (No Auth Demo)"):::argo
        CI -->|"deploys"| AC
        K8("Kubernetes Cluster"):::k8s
        AC -->|"manages"| K8
    end

    %% Modular Examples Layer
    subgraph "Modular Examples (GitOps Patterns)"
        direction TB
        AOA("App-of-apps Example"):::example
        AS("Application Sets Example"):::example
        CD("Custom Diff Strategies"):::example
        EP("Environment Promotion"):::example
        IU("Image Updater Functionality"):::example
        N("Notifications Setups"):::example
        SHW("Sync Hooks and Waves"):::example
        SHS("Sync Hooks (Solutions)"):::example
    end

    %% Connecting Kubernetes Cluster to Modular Examples
    K8 ---|"hosts"| AOA
    K8 --- AS
    K8 --- CD
    K8 --- EP
    K8 --- IU
    K8 --- N
    K8 --- SHW
    K8 --- SHS

    %% Click Events
    click GR "https://github.com/flavorplus/gitops-cert-level-2-examples/blob/main/README.md"
    click CI "https://github.com/flavorplus/gitops-cert-level-2-examples/tree/main/.github/workflows"
    click AC "https://github.com/flavorplus/gitops-cert-level-2-examples/blob/main/argocd-noauth/install.yaml"
    click AOA "https://github.com/flavorplus/gitops-cert-level-2-examples/tree/main/app-of-apps"
    click AS "https://github.com/flavorplus/gitops-cert-level-2-examples/tree/main/application-sets"
    click CD "https://github.com/flavorplus/gitops-cert-level-2-examples/tree/main/custom-diff"
    click EP "https://github.com/flavorplus/gitops-cert-level-2-examples/tree/main/environment-promotion"
    click IU "https://github.com/flavorplus/gitops-cert-level-2-examples/tree/main/image-updater"
    click N "https://github.com/flavorplus/gitops-cert-level-2-examples/tree/main/notifications"
    click SHW "https://github.com/flavorplus/gitops-cert-level-2-examples/tree/main/sync-hooks-waves"
    click SHS "https://github.com/flavorplus/gitops-cert-level-2-examples/tree/main/solutions/sync-hooks-waves"

    %% Styles
    classDef repo fill:#FDF6E3,stroke:#333,stroke-width:2px;
    classDef ci fill:#E0FFFF,stroke:#333,stroke-width:2px;
    classDef argo fill:#FFE4E1,stroke:#333,stroke-width:2px;
    classDef k8s fill:#E6FFE6,stroke:#333,stroke-width:2px;
    classDef example fill:#E0F7FA,stroke:#333,stroke-width:2px;
```
