Skip to content

Commit afa5f3c

Browse files
committed
Merge branch 'main' into 16-automate-argocd-deployment
2 parents 60d8407 + 2300ede commit afa5f3c

32 files changed

+1467
-323
lines changed

.gitignore

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,25 @@ sw.*
9292
# yarn.lock
9393
yarn.lock
9494

95-
.terraform
95+
# Terraform
96+
*.tfstate
97+
*.tfstate.backup
98+
*.tfvars
99+
.terraform/
96100
.terraform.lock.hcl
97101

98102

103+
99104
*/charts
100105

101-
*.out
102-
*.json
106+
107+
# Crash logs
108+
crash.log
109+
crash.*.log
110+
111+
# Exclude .terraform directory
112+
.terraform/
113+
114+
# Ignore CLI configuration files
115+
.terraformrc
116+
terraform.rc

Makefile

Lines changed: 0 additions & 64 deletions
This file was deleted.

README.md

Lines changed: 28 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -1,120 +1,33 @@
1-
# Observability Stack with GKE, LGTM, and ArgoCD
1+
# Kubernetes Observability & Operations Platform
22

3-
Complete infrastructure and application stack for observability on Google Kubernetes Engine (GKE).
3+
This repository provisions a comprehensive, production-grade observability and operations platform on **Google Kubernetes Engine (GKE)**. It integrates distinct, modular components to handle **deployment**, **monitoring**, **logging**, **tracing**, and **certificate management**.
44

5-
## Components
5+
## Core Components
66

7-
- **GKE**: Google Kubernetes Engine cluster
8-
- **LGTM Stack**:
9-
- Loki (logs)
10-
- Grafana (visualization)
11-
- Tempo (traces)
12-
- Mimir (metrics)
13-
- **ArgoCD**: GitOps continuous deployment
14-
- **Cert-Manager**: Automated certificate management
15-
- **Ingress Controller**: Nginx ingress controller
7+
* **Observability (LGTM Stack)**:
8+
* **Loki**: Distributed logging.
9+
* **Grafana**: Visualization and dashboards.
10+
* **Tempo**: Distributed tracing.
11+
* **Mimir**: Scalable metrics (Prometheus storage).
12+
* **GitOps (ArgoCD)**:
13+
* **ArgoCD**: Continuous delivery and declarative GitOps workflows.
14+
* **Infrastructure Essentials**:
15+
* **Cert-Manager**: Automated TLS certificate issuance (Let's Encrypt).
16+
* **Ingress Controller**: NGINX Ingress for external traffic management.
1617

17-
## REPO STRUCTURE
18+
## Project Structure
19+
20+
This project is built with **Terraform** and **Helm**, designed for modularity. You can deploy the entire stack or individual components as needed.
21+
22+
* **[`lgtm-stack/`](lgtm-stack/README.md)**: The core internal monitoring platform.
23+
* **[`argocd/`](argocd/README.md)**: The GitOps delivery engine.
24+
* **[`cert-manager/`](cert-manager/README.md)**: Certificate management infrastructure.
25+
* **[`ingress-controller/`](ingress-controller/README.md)**: Ingress routing infrastructure.
26+
27+
## Documentation
28+
29+
* **[Kubernetes Observability Guide](docs/kubernetes-observability.md)**: Deployment and architecture of the LGTM stack.
30+
* **[Cert-Manager Deployment](docs/cert-manager-terraform-deployment.md)**: Terraform guide for Cert-Manager.
31+
* **[Ingress Controller Deployment](docs/ingress-controller-terraform-deployment.md)**: Terraform guide for NGINX Ingress.
32+
* **[ArgoCD Documentation](argocd/README.md)**: Setup and configuration for GitOps.
1833

19-
```
20-
observability/
21-
├── README.md
22-
│ └── USE: Project overview, quick start, and entry point for new users
23-
24-
├── argocd/
25-
│ ├── README.md
26-
│ │ └── USE: ArgoCD component overview and quick reference
27-
│ └── terraform/
28-
│ ├── locals.tf
29-
│ │ └── USE: Local variables and computed values within ArgoCD module
30-
│ ├── main.tf
31-
│ │ └── USE: Deploy ArgoCD using Helm to GKE cluster
32-
│ ├── outputs.tf
33-
│ │ └── USE: Export ArgoCD endpoint URLs and credentials
34-
│ ├── variables.tf
35-
│ │ └── USE: Define input parameters for ArgoCD deployment
36-
│ └── values/
37-
│ ├── argocd-values.yaml
38-
│ │ └── USE: Base Helm chart values for ArgoCD
39-
│ ├── argocd-dev-values.yaml
40-
│ │ └── USE: Development environment overrides (reduced resources)
41-
│ └── argocd-prod-values.yaml
42-
│ └── USE: Production environment overrides (HA, replicas)
43-
44-
├── cert-manager/
45-
│ ├── README.md
46-
│ │ └── USE: Cert-Manager component overview and reference
47-
│ └── terraform/
48-
│ ├── locals.tf
49-
│ │ └── USE: Local variables and computed values
50-
│ ├── main.tf
51-
│ │ └── USE: Deploy Cert-Manager using Helm to manage TLS certificates
52-
│ ├── outputs.tf
53-
│ │ └── USE: Export Cert-Manager service account and configuration details
54-
│ ├── variables.tf
55-
│ │ └── USE: Define customizable parameters for Cert-Manager
56-
57-
├── docs/
58-
│ ├── ARCHITECTURE.md
59-
│ │ └── USE: Explain system design, component interactions, and data flow
60-
│ ├── GETTING_STARTED.md
61-
│ │ └── USE: Step-by-step quick start guide for new users
62-
│ ├── README.md
63-
│ │ └── USE: Documentation index and navigation hub
64-
│ ├── TUTORIAL_ARGOCD.md
65-
│ │ └── USE: Manual ArgoCD installation guide (alternative to Terraform)
66-
│ ├── TUTORIAL_CERT_MANAGER.md
67-
│ │ └── USE: Manual Cert-Manager installation guide
68-
│ ├── TUTORIAL_GKE_SETUP.md
69-
│ │ └── USE: Manual GKE cluster creation using gcloud CLI
70-
│ ├── TUTORIAL_INGRESS.md
71-
│ │ └── USE: Manual Ingress Controller installation guide
72-
│ ├── TUTORIAL_LGTM.md
73-
│ │ └── USE: Manual LGTM stack deployment guide
74-
│ └── images/
75-
│ ├── architecture-diagram.png
76-
│ │ └── USE: Visual system architecture diagram
77-
│ ├── argocd-workflow.png
78-
│ │ └── USE: Visual GitOps deployment workflow diagram
79-
│ └── lgtm-flow.png
80-
│ └── USE: Visual LGTM component data flow diagram
81-
82-
├── ingress-controller/
83-
│ ├── README.md
84-
│ │ └── USE: Ingress Controller component overview
85-
│ └── terraform/
86-
│ ├── locals.tf
87-
│ │ └── USE: Local variables for ingress module
88-
│ ├── main.tf
89-
│ │ └── USE: Deploy Nginx Ingress Controller for HTTP/HTTPS routing
90-
│ ├── outputs.tf
91-
│ │ └── USE: Export load balancer endpoint and service information
92-
│ ├── variables.tf
93-
│ │ └── USE: Define customizable parameters for Ingress
94-
│ └── values.yaml
95-
│ └── USE: Helm chart configuration for Nginx Ingress Controller
96-
97-
└── lgtm-stack/
98-
├── README.md
99-
│ └── USE: LGTM stack component overview and architecture
100-
└── terraform/
101-
├── locals.tf
102-
│ └── USE: Local variables for LGTM module
103-
├── main.tf
104-
│ └── USE: Deploy all LGTM components (Prometheus, Loki, Mimir, Tempo, Grafana)
105-
├── outputs.tf
106-
│ └── USE: Export endpoints and credentials for all LGTM components
107-
├── variables.tf
108-
│ └── USE: Define customizable parameters for LGTM deployment
109-
└── values/
110-
├── grafana-values.yaml
111-
│ └── USE: Helm configuration for Grafana dashboards and datasources
112-
├── loki-values.yaml
113-
│ └── USE: Helm configuration for Loki log storage and retention
114-
├── mimir-values.yaml
115-
│ └── USE: Helm configuration for Mimir long-term metrics storage
116-
├── prometheus-values.yaml
117-
│ └── USE: Helm configuration for Prometheus metrics scraping
118-
└── tempo-values.yaml
119-
└── USE: Helm configuration for Tempo distributed tracing
120-
```

argocd/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Argo CD Deployment Guide
2+
3+
Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes. It automates the deployment of applications by continuously monitoring Git repositories and synchronizing the desired application state with the live state in your Kubernetes cluster.
4+
5+
## Deployment Options
6+
7+
We provide two ways to deploy Argo CD to your Kubernetes cluster:
8+
9+
### 1. Manual Deployment
10+
11+
Deploy Argo CD manually using Helm with customizable values files. This approach gives you full control over the configurations.
12+
13+
**[Manual Deployment Guide](../docs/manual-argocd-deployment.md)**
14+
15+
The manual deployment uses the production-ready values file located at [`argocd/manual/argocd-prod-values.yaml`](manual/argocd-prod-values.yaml),
16+
17+
### 2. Automated Deployment (Terraform)
18+
19+
Deploy Argo CD automatically using Terraform for infrastructure-as-code management
20+
21+
**[Automated Deployment Guide](#)** *(Coming soon)*
22+
23+
The automated deployment is located in the [`argocd/terraform/`](terraform)
24+
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# 1. High Availability (Redis & Components)
2+
# -----------------------------------------
3+
redis-ha:
4+
enabled: true
5+
exporter:
6+
enabled: true
7+
8+
controller:
9+
replicas: 1
10+
resources:
11+
limits:
12+
memory: "2Gi"
13+
cpu: "1"
14+
requests:
15+
memory: "512Mi"
16+
cpu: "250m"
17+
18+
repoServer:
19+
replicas: 2
20+
autoscaling:
21+
enabled: true
22+
minReplicas: 2
23+
maxReplicas: 5
24+
resources:
25+
limits:
26+
memory: "1Gi"
27+
cpu: "500m"
28+
29+
server:
30+
replicas: 2
31+
autoscaling:
32+
enabled: true
33+
minReplicas: 2
34+
maxReplicas: 5
35+
36+
# 2. Ingress & Cert-Manager Integration
37+
# -------------------------------------
38+
ingress:
39+
enabled: true
40+
ingressClassName: nginx # CHANGE THIS TO YOUR INGRESS CLASS NAME
41+
hostname: "YOUR_ARGO-CD_DOMAIN" # CHANGE THIS
42+
annotations:
43+
# Standard Nginx tuning
44+
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
45+
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
46+
47+
# Cert-Manager Configuration
48+
cert-manager.io/cluster-issuer: "letsencrypt-prod" # CHANGE THIS to your Issuer name
49+
# If you were using a ClusterIssuer, you would use:
50+
# cert-manager.io/cluster-issuer: "letsencrypt-prod"
51+
52+
tls:
53+
- secretName: argocd-tls-cert
54+
hosts:
55+
- "YOUR_ARGO-CD_DOMAIN" # CHANGE THIS
56+
57+
# 3. Multi-Tenancy & RBAC
58+
# -----------------------
59+
# This section sets up the foundation for multi-tenancy.
60+
# We disable the admin user eventually and rely on SSO,
61+
# but for now, we define policies.
62+
configs:
63+
params:
64+
server.insecure: true # We terminate TLS at NGINX, so Argo itself runs insecurely internally
65+
66+
# Define RBAC roles for your tenants here or in a separate ConfigMap
67+
rbac:
68+
policy.csv: |
69+
# Example: Grant 'dev-team' access only to 'dev-project'
70+
# p, role:dev-team, applications, *, dev-project/*, allow
71+
# g, dev-user@yourcompany.com, role:dev-team
72+
73+
# Default policy
74+
g, admin, role:admin
75+
g, ArgoCDAdmins, role:admin
76+
77+
cm:
78+
url: https://YOUR_ARGO-CD_DOMAIN
79+
oidc.config: |
80+
name: Keycloak
81+
issuer: https://YOUR_KEYCLOAK_DOMAIN/realms/YOUR_REALM
82+
clientID: YOUR_CLIENT_ID
83+
clientSecret: YOUR_CLIENT_SECRET
84+
requestedScopes: ["openid", "profile", "email", "groups"]
85+
enablePKCEAuthentication: true
86+
# PKCE is handled automatically by the ArgoCD CLI
87+
# when it talks to this OIDC provider.
88+
89+
# 4. GitOps Engine Tuning
90+
# -----------------------
91+
# Important for production to handle many applications
92+
applicationSet:
93+
replicas: 2

0 commit comments

Comments
 (0)