# ggingggang/oci-always-free-k8s architecture

> Architecture diagram of the GitHub repository ggingggang/oci-always-free-k8s, 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/ggingggang/oci-always-free-k8s
- Repository: https://github.com/ggingggang/oci-always-free-k8s

## Overview

This repository provisions and operates an OCI-hosted Kubernetes platform. The main workflow is Terraform provisioning OCI infrastructure and OKE, followed by Kubernetes foundation setup and GitOps-managed platform and application deployment. Application CI runs in Jenkins; its shared-library workflow updates image tags in the separate k8s-gitops repository, which Argo CD synchronizes. The README documents the main deployment and traffic relationships; source excerpts were unavailable, so edges below rely on those documented relationships rather than inspected implementation calls.

Main entry points: [`terraform/main.tf`](https://github.com/ggingggang/oci-always-free-k8s/blob/main/terraform/main.tf) (Terraform stack), [`terraform/modules/oke`](https://github.com/ggingggang/oci-always-free-k8s/tree/main/terraform/modules/oke) (OKE cluster), [`kubernetes/infra/istio`](https://github.com/ggingggang/oci-always-free-k8s/tree/main/kubernetes/infra/istio) (Istio ingress), [`kubernetes/platform/argocd`](https://github.com/ggingggang/oci-always-free-k8s/tree/main/kubernetes/platform/argocd) (Argo CD)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_provisioning["OCI provisioning"]
  node_terraform["Terraform stack<br/>[main.tf]"]
  node_network["VCN and networking"]
  node_oke["OKE cluster"]
  node_database[("HeatWave MySQL")]
  node_iam["IAM and KMS"]
end

subgraph group_foundation["Cluster foundation"]
  node_namespaces["Namespaces and policies"]
  node_istio["Istio ingress"]
  node_certdns["TLS and DNS"]
end

subgraph group_delivery["GitOps delivery"]
  node_argocd["Argo CD"]
  node_appgitops["Application manifests"]
  node_jenkins["Jenkins CI"]
  node_servicecode["Service repositories"]
end

subgraph group_platform["Platform services"]
end

subgraph group_runtime["Application runtime"]
  node_redis[("Redis")]
  node_nats["NATS JetStream"]
  node_openbao["OpenBao secrets"]
  node_monitoring["Prometheus and Alertmanager"]
  node_loki["Loki logging"]
  node_kyverno["Image verification"]
  node_applications["Applications"]
end

node_engineer(("Engineer / administrator"))
node_internet(("Internet and clients"))

node_engineer -->|"configures"| node_terraform
node_terraform -->|"provisions"| node_network
node_terraform -->|"provisions"| node_oke
node_terraform -->|"provisions"| node_database
node_terraform -->|"configures"| node_iam
node_engineer -->|"administers"| node_oke
node_oke -->|"hosts"| node_namespaces
node_namespaces -->|"precedes setup"| node_istio
node_istio -->|"uses TLS and DNS"| node_certdns
node_jenkins -->|"builds and scans"| node_servicecode
node_jenkins -->|"pushes image tags"| node_appgitops
node_argocd -->|"syncs manifests"| node_appgitops
node_argocd -->|"deploys"| node_applications
node_internet -->|"enters via NLB"| node_istio
node_istio -->|"routes requests"| node_applications
node_applications -->|"uses"| node_database
node_applications -->|"uses"| node_redis
node_applications -->|"uses"| node_nats
node_applications -.->|"uses secrets"| node_openbao
node_kyverno -->|"verifies images"| node_applications
node_monitoring -.->|"observes"| node_applications
node_loki -.->|"collects logs"| node_applications
node_oke -->|"runs"| node_argocd

click node_terraform "https://github.com/ggingggang/oci-always-free-k8s/blob/main/terraform/main.tf"
click node_network "https://github.com/ggingggang/oci-always-free-k8s/tree/main/terraform/modules/networking"
click node_oke "https://github.com/ggingggang/oci-always-free-k8s/tree/main/terraform/modules/oke"
click node_database "https://github.com/ggingggang/oci-always-free-k8s/tree/main/terraform/modules/database"
click node_iam "https://github.com/ggingggang/oci-always-free-k8s/tree/main/terraform/modules/iam"
click node_namespaces "https://github.com/ggingggang/oci-always-free-k8s/tree/main/kubernetes/infra/namespaces"
click node_istio "https://github.com/ggingggang/oci-always-free-k8s/tree/main/kubernetes/infra/istio"
click node_certdns "https://github.com/ggingggang/oci-always-free-k8s/tree/main/kubernetes/infra/cert-manager"
click node_argocd "https://github.com/ggingggang/oci-always-free-k8s/tree/main/kubernetes/platform/argocd"
click node_jenkins "https://github.com/ggingggang/oci-always-free-k8s/tree/main/kubernetes/platform/jenkins"
click node_redis "https://github.com/ggingggang/oci-always-free-k8s/tree/main/kubernetes/platform/redis"
click node_nats "https://github.com/ggingggang/oci-always-free-k8s/tree/main/kubernetes/platform/nats"
click node_openbao "https://github.com/ggingggang/oci-always-free-k8s/tree/main/kubernetes/platform/openbao"
click node_monitoring "https://github.com/ggingggang/oci-always-free-k8s/tree/main/kubernetes/platform/monitoring/kps"
click node_loki "https://github.com/ggingggang/oci-always-free-k8s/tree/main/kubernetes/platform/monitoring/loki"
click node_kyverno "https://github.com/ggingggang/oci-always-free-k8s/tree/main/kubernetes/platform/kyverno"

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_terraform,node_network,node_oke,node_database,node_iam,node_internet toneBlue
class node_namespaces,node_istio,node_certdns toneAmber
class node_argocd,node_appgitops,node_jenkins,node_servicecode toneMint
class node_redis,node_nats,node_openbao,node_monitoring,node_loki,node_kyverno,node_applications,node_engineer toneIndigo
```

## Components

### OCI provisioning

- [Terraform stack](https://github.com/ggingggang/oci-always-free-k8s/blob/main/terraform/main.tf): `terraform/main.tf`
- [VCN and networking](https://github.com/ggingggang/oci-always-free-k8s/tree/main/terraform/modules/networking): `terraform/modules/networking`
- [OKE cluster](https://github.com/ggingggang/oci-always-free-k8s/tree/main/terraform/modules/oke): `terraform/modules/oke`
- [HeatWave MySQL](https://github.com/ggingggang/oci-always-free-k8s/tree/main/terraform/modules/database): `terraform/modules/database`
- [IAM and KMS](https://github.com/ggingggang/oci-always-free-k8s/tree/main/terraform/modules/iam): `terraform/modules/iam`

### Cluster foundation

- [Namespaces and policies](https://github.com/ggingggang/oci-always-free-k8s/tree/main/kubernetes/infra/namespaces): `kubernetes/infra/namespaces`
- [Istio ingress](https://github.com/ggingggang/oci-always-free-k8s/tree/main/kubernetes/infra/istio): `kubernetes/infra/istio`
- [TLS and DNS](https://github.com/ggingggang/oci-always-free-k8s/tree/main/kubernetes/infra/cert-manager): `kubernetes/infra/cert-manager`

### GitOps delivery

- [Argo CD](https://github.com/ggingggang/oci-always-free-k8s/tree/main/kubernetes/platform/argocd): `kubernetes/platform/argocd`
- **Application manifests**
- [Jenkins CI](https://github.com/ggingggang/oci-always-free-k8s/tree/main/kubernetes/platform/jenkins): `kubernetes/platform/jenkins`
- **Service repositories**

### Application runtime

- [Redis](https://github.com/ggingggang/oci-always-free-k8s/tree/main/kubernetes/platform/redis): `kubernetes/platform/redis`
- [NATS JetStream](https://github.com/ggingggang/oci-always-free-k8s/tree/main/kubernetes/platform/nats): `kubernetes/platform/nats`
- [OpenBao secrets](https://github.com/ggingggang/oci-always-free-k8s/tree/main/kubernetes/platform/openbao): `kubernetes/platform/openbao`
- [Prometheus and Alertmanager](https://github.com/ggingggang/oci-always-free-k8s/tree/main/kubernetes/platform/monitoring/kps): `kubernetes/platform/monitoring/kps`
- [Loki logging](https://github.com/ggingggang/oci-always-free-k8s/tree/main/kubernetes/platform/monitoring/loki): `kubernetes/platform/monitoring/loki`
- [Image verification](https://github.com/ggingggang/oci-always-free-k8s/tree/main/kubernetes/platform/kyverno): `kubernetes/platform/kyverno`
- **Applications**

### Other components

- **Engineer / administrator**
- **Internet and clients**

## Connections

- Engineer / administrator → Terraform stack: configures (evidence: `README.md`)
- Terraform stack → VCN and networking: provisions (evidence: `README.md`)
- Terraform stack → OKE cluster: provisions (evidence: `README.md`)
- Terraform stack → HeatWave MySQL: provisions (evidence: `README.md`)
- Terraform stack → IAM and KMS: configures (evidence: `README.md`)
- Engineer / administrator → OKE cluster: administers (evidence: `README.md`)
- OKE cluster → Namespaces and policies: hosts (evidence: `README.md`)
- Namespaces and policies → Istio ingress: precedes setup (evidence: `README.md`)
- Istio ingress → TLS and DNS: uses TLS and DNS (evidence: `README.md`)
- Jenkins CI → Service repositories: builds and scans (evidence: `README.md`)
- Jenkins CI → Application manifests: pushes image tags (evidence: `README.md`)
- Argo CD → Application manifests: syncs manifests (evidence: `README.md`)
- Argo CD → Applications: deploys (evidence: `README.md`)
- Internet and clients → Istio ingress: enters via NLB (evidence: `README.md`)
- Istio ingress → Applications: routes requests (evidence: `README.md`)
- Applications → HeatWave MySQL: uses (evidence: `README.md`)
- Applications → Redis: uses (evidence: `README.md`)
- Applications → NATS JetStream: uses (evidence: `README.md`)
- Applications → OpenBao secrets: uses secrets
- Image verification → Applications: verifies images (evidence: `README.md`)
- Prometheus and Alertmanager → Applications: observes
- Loki logging → Applications: collects logs
- OKE cluster → Argo CD: runs (evidence: `README.md`)
