# samirpanday/monitoring_argocd architecture

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

- Interactive diagram: https://gitdiagram.com/samirpanday/monitoring_argocd
- Repository: https://github.com/samirpanday/monitoring_argocd

## Overview

This is a GitOps desired-state repository for a shared monitoring platform and Kubernetes tenants. The workflow starts when Argo CD watches the repository: a root Application loads cluster configuration, the platform ApplicationSet installs shared monitoring charts, and the tenant ApplicationSet turns tenant directories into Applications that render and apply common Kubernetes resources. Tenant configuration and platform values are distinct inputs. The README also documents separate platform policies and that Grafana organizations and users are not provisioned. Relationships below are based on README documentation; no source excerpts were supplied.

Main entry points: [`charts/tenant/values.yaml`](https://github.com/samirpanday/monitoring_argocd/blob/main/charts/tenant/values.yaml) (Tenant chart defaults), [`clusters/rke2-prod/applicationsets/platform-applicationset.yaml`](https://github.com/samirpanday/monitoring_argocd/blob/main/clusters/rke2-prod/applicationsets/platform-applicationset.yaml) (Platform ApplicationSet), [`clusters/rke2-prod/applicationsets/tenant-applicationset.yaml`](https://github.com/samirpanday/monitoring_argocd/blob/main/clusters/rke2-prod/applicationsets/tenant-applicationset.yaml) (Tenant ApplicationSet), [`clusters/rke2-prod/root-application.yaml`](https://github.com/samirpanday/monitoring_argocd/blob/main/clusters/rke2-prod/root-application.yaml) (Root Application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Argo CD orchestration"]
  node_root["Root Application"]
  node_platform_as["Platform ApplicationSet"]
  node_tenant_as["Tenant ApplicationSet"]
  node_platform_project["Platform AppProject"]
  node_tenant_project["Tenant AppProject"]
  node_tenant_app["Generated tenant Application"]
end

subgraph group_platform["Shared monitoring"]
  node_prom_values["Prometheus values<br/>[values.yaml]"]
  node_loki_values["Loki values<br/>[values.yaml]"]
  node_alloy_values["Alloy values<br/>[values.yaml]"]
  node_upstream_charts["Upstream charts"]
end

subgraph group_tenant["Tenant provisioning"]
  node_tenant_inputs["Tenant definitions"]
  node_tenant_chart["Tenant chart defaults<br/>[values.yaml]"]
  node_tenant_helpers["Tenant naming helper<br/>[_helpers.tpl]"]
  node_namespaces["Namespace templates<br/>[namespaces.yaml]"]
  node_quotas["Resource quota templates"]
  node_limits["Limit range templates<br/>[limit-range.yaml]"]
  node_service_accounts["Service account templates"]
  node_tenant_network["Tenant network policies"]
  node_tenant_example["Example tenant input<br/>[tenant.yaml]"]
  node_tenant_template["Tenant input template<br/>[tenant.yaml]"]
end

subgraph group_policy["Cluster policies"]
  node_platform_policy["Platform default-deny policy"]
end

node_git(("Git repository"))
node_argocd["Argo CD"]
node_cluster["Kubernetes cluster"]

node_git -->|"notifies changes"| node_argocd
node_argocd -->|"runs"| node_root
node_root -->|"applies config"| node_platform_as
node_root -->|"applies config"| node_tenant_as
node_platform_as -->|"installs"| node_upstream_charts
node_platform_as -->|"passes values"| node_prom_values
node_platform_as -->|"passes values"| node_loki_values
node_platform_as -->|"passes values"| node_alloy_values
node_tenant_as -->|"scans"| node_tenant_inputs
node_tenant_as -->|"generates"| node_tenant_app
node_tenant_app -->|"runs chart"| node_tenant_chart
node_tenant_app -->|"uses values"| node_tenant_example
node_tenant_chart -->|"uses helper"| node_tenant_helpers
node_tenant_chart -->|"renders"| node_namespaces
node_tenant_chart -->|"renders"| node_quotas
node_tenant_chart -->|"renders"| node_limits
node_tenant_chart -->|"renders"| node_service_accounts
node_tenant_chart -->|"renders"| node_tenant_network
node_tenant_app -->|"applies resources"| node_cluster
node_tenant_as -->|"uses permissions"| node_tenant_project
node_platform_as -->|"uses permissions"| node_platform_project

click node_root "https://github.com/samirpanday/monitoring_argocd/blob/main/clusters/rke2-prod/root-application.yaml"
click node_platform_as "https://github.com/samirpanday/monitoring_argocd/blob/main/clusters/rke2-prod/applicationsets/platform-applicationset.yaml"
click node_tenant_as "https://github.com/samirpanday/monitoring_argocd/blob/main/clusters/rke2-prod/applicationsets/tenant-applicationset.yaml"
click node_platform_project "https://github.com/samirpanday/monitoring_argocd/blob/main/clusters/rke2-prod/platform-project.yaml"
click node_tenant_project "https://github.com/samirpanday/monitoring_argocd/blob/main/clusters/rke2-prod/tenant-project.yaml"
click node_prom_values "https://github.com/samirpanday/monitoring_argocd/blob/main/apps/platform/kube-prometheus-stack/values.yaml"
click node_loki_values "https://github.com/samirpanday/monitoring_argocd/blob/main/apps/platform/loki/values.yaml"
click node_alloy_values "https://github.com/samirpanday/monitoring_argocd/blob/main/apps/platform/alloy/values.yaml"
click node_tenant_inputs "https://github.com/samirpanday/monitoring_argocd/tree/main/tenants"
click node_tenant_app "https://github.com/samirpanday/monitoring_argocd/blob/main/clusters/rke2-prod/applicationsets/tenant-applicationset.yaml"
click node_tenant_chart "https://github.com/samirpanday/monitoring_argocd/blob/main/charts/tenant/values.yaml"
click node_tenant_helpers "https://github.com/samirpanday/monitoring_argocd/blob/main/charts/tenant/templates/_helpers.tpl"
click node_namespaces "https://github.com/samirpanday/monitoring_argocd/blob/main/charts/tenant/templates/namespaces.yaml"
click node_quotas "https://github.com/samirpanday/monitoring_argocd/blob/main/charts/tenant/templates/resource-quota.yaml"
click node_limits "https://github.com/samirpanday/monitoring_argocd/blob/main/charts/tenant/templates/limit-range.yaml"
click node_service_accounts "https://github.com/samirpanday/monitoring_argocd/blob/main/charts/tenant/templates/service-accounts.yaml"
click node_tenant_network "https://github.com/samirpanday/monitoring_argocd/blob/main/charts/tenant/templates/network-policies.yaml"
click node_platform_policy "https://github.com/samirpanday/monitoring_argocd/blob/main/policies/network/platform-default-deny.yaml"
click node_tenant_example "https://github.com/samirpanday/monitoring_argocd/blob/main/tenants/example/tenant.yaml"
click node_tenant_template "https://github.com/samirpanday/monitoring_argocd/blob/main/tenants/_template/tenant.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_root,node_platform_as,node_tenant_as,node_platform_project,node_tenant_project,node_tenant_app toneBlue
class node_prom_values,node_loki_values,node_alloy_values,node_upstream_charts toneAmber
class node_tenant_inputs,node_tenant_chart,node_tenant_helpers,node_namespaces,node_quotas,node_limits,node_service_accounts,node_tenant_network,node_tenant_example,node_tenant_template toneMint
class node_platform_policy toneRose
class node_git,node_argocd,node_cluster toneIndigo
```

## Components

### Argo CD orchestration

- [Root Application](https://github.com/samirpanday/monitoring_argocd/blob/main/clusters/rke2-prod/root-application.yaml): `clusters/rke2-prod/root-application.yaml`
- [Platform ApplicationSet](https://github.com/samirpanday/monitoring_argocd/blob/main/clusters/rke2-prod/applicationsets/platform-applicationset.yaml): `clusters/rke2-prod/applicationsets/platform-applicationset.yaml`
- [Tenant ApplicationSet](https://github.com/samirpanday/monitoring_argocd/blob/main/clusters/rke2-prod/applicationsets/tenant-applicationset.yaml): `clusters/rke2-prod/applicationsets/tenant-applicationset.yaml`
- [Platform AppProject](https://github.com/samirpanday/monitoring_argocd/blob/main/clusters/rke2-prod/platform-project.yaml): `clusters/rke2-prod/platform-project.yaml`
- [Tenant AppProject](https://github.com/samirpanday/monitoring_argocd/blob/main/clusters/rke2-prod/tenant-project.yaml): `clusters/rke2-prod/tenant-project.yaml`
- [Generated tenant Application](https://github.com/samirpanday/monitoring_argocd/blob/main/clusters/rke2-prod/applicationsets/tenant-applicationset.yaml): `clusters/rke2-prod/applicationsets/tenant-applicationset.yaml`

### Shared monitoring

- [Prometheus values](https://github.com/samirpanday/monitoring_argocd/blob/main/apps/platform/kube-prometheus-stack/values.yaml): `apps/platform/kube-prometheus-stack/values.yaml`
- [Loki values](https://github.com/samirpanday/monitoring_argocd/blob/main/apps/platform/loki/values.yaml): `apps/platform/loki/values.yaml`
- [Alloy values](https://github.com/samirpanday/monitoring_argocd/blob/main/apps/platform/alloy/values.yaml): `apps/platform/alloy/values.yaml`
- **Upstream charts**

### Tenant provisioning

- [Tenant definitions](https://github.com/samirpanday/monitoring_argocd/tree/main/tenants): `tenants`
- [Tenant chart defaults](https://github.com/samirpanday/monitoring_argocd/blob/main/charts/tenant/values.yaml): `charts/tenant/values.yaml`
- [Tenant naming helper](https://github.com/samirpanday/monitoring_argocd/blob/main/charts/tenant/templates/_helpers.tpl): `charts/tenant/templates/_helpers.tpl`
- [Namespace templates](https://github.com/samirpanday/monitoring_argocd/blob/main/charts/tenant/templates/namespaces.yaml): `charts/tenant/templates/namespaces.yaml`
- [Resource quota templates](https://github.com/samirpanday/monitoring_argocd/blob/main/charts/tenant/templates/resource-quota.yaml): `charts/tenant/templates/resource-quota.yaml`
- [Limit range templates](https://github.com/samirpanday/monitoring_argocd/blob/main/charts/tenant/templates/limit-range.yaml): `charts/tenant/templates/limit-range.yaml`
- [Service account templates](https://github.com/samirpanday/monitoring_argocd/blob/main/charts/tenant/templates/service-accounts.yaml): `charts/tenant/templates/service-accounts.yaml`
- [Tenant network policies](https://github.com/samirpanday/monitoring_argocd/blob/main/charts/tenant/templates/network-policies.yaml): `charts/tenant/templates/network-policies.yaml`
- [Example tenant input](https://github.com/samirpanday/monitoring_argocd/blob/main/tenants/example/tenant.yaml): `tenants/example/tenant.yaml`
- [Tenant input template](https://github.com/samirpanday/monitoring_argocd/blob/main/tenants/_template/tenant.yaml): `tenants/_template/tenant.yaml`

### Cluster policies

- [Platform default-deny policy](https://github.com/samirpanday/monitoring_argocd/blob/main/policies/network/platform-default-deny.yaml): `policies/network/platform-default-deny.yaml`

### Other components

- **Git repository**
- **Argo CD**
- **Kubernetes cluster**

## Connections

- Git repository → Argo CD: notifies changes (evidence: `README.md`)
- Argo CD → Root Application: runs (evidence: `README.md`)
- Root Application → Platform ApplicationSet: applies config (evidence: `README.md`)
- Root Application → Tenant ApplicationSet: applies config (evidence: `README.md`)
- Platform ApplicationSet → Upstream charts: installs (evidence: `README.md`)
- Platform ApplicationSet → Prometheus values: passes values (evidence: `README.md`)
- Platform ApplicationSet → Loki values: passes values (evidence: `README.md`)
- Platform ApplicationSet → Alloy values: passes values (evidence: `README.md`)
- Tenant ApplicationSet → Tenant definitions: scans (evidence: `README.md`)
- Tenant ApplicationSet → Generated tenant Application: generates (evidence: `README.md`)
- Generated tenant Application → Tenant chart defaults: runs chart (evidence: `README.md`)
- Generated tenant Application → Example tenant input: uses values (evidence: `README.md`)
- Tenant chart defaults → Tenant naming helper: uses helper (evidence: `README.md`)
- Tenant chart defaults → Namespace templates: renders (evidence: `README.md`)
- Tenant chart defaults → Resource quota templates: renders (evidence: `README.md`)
- Tenant chart defaults → Limit range templates: renders (evidence: `README.md`)
- Tenant chart defaults → Service account templates: renders (evidence: `README.md`)
- Tenant chart defaults → Tenant network policies: renders (evidence: `README.md`)
- Generated tenant Application → Kubernetes cluster: applies resources (evidence: `README.md`)
- Tenant ApplicationSet → Tenant AppProject: uses permissions (evidence: `README.md`)
- Platform ApplicationSet → Platform AppProject: uses permissions (evidence: `README.md`)
