diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..a5adbde --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,181 @@ +# CLAUDE.md — `devops-infra-argo-config` + +> **Layer 1-T (Tool-Mediated GitOps).** This repo is the ArgoCD control plane for infrastructure tooling across Meesho's Kubernetes fleet. Agent generates diffs and opens PRs. **Merge to the env branch is an immediate deploy — auto-sync has no staging gate.** +> +> | Environment | Branch | ArgoCD namespace | Values dir | +> | ----------- | ------ | ---------------- | ---------- | +> | Production (prd) | `main` | `argocd-prd` | `values/prd/` | +> | Staging (stg) + Dev (dev) | `develop` | `argocd-dev` | `values/dev/` | +> | Integration (int) | `pre-prod` | `argocd-shared-int` | `values/int/` | +> +> Per [AI Blitz Plan §4.2 + §5.2](docs/global/AGENT_BOUNDARIES.md). Layer: **1-T**. + +--- + +## What this repo controls + +`devops-infra-argo-config` is the **GitOps source of truth** for every ArgoCD `Application` that deploys **infrastructure tooling** (Contour, VictoriaMetrics, Grafana, Kyverno, KEDA, external-secrets, Vault, etc.) across ~19 Kubernetes clusters. + +It does **not** manage service/application workloads — that's `devops-argo-config`. + +### App-of-Applications pattern + +```text +incubator//.yaml ← Parent Application (one per cluster, in ArgoCD) + └── points at generic-argo-apps-chart/ + values//-values.yaml + └── renders one child Application per appSpec[] entry + └── each child sources charts + overrides from devops-infra-helm-charts +``` + +### Key directories + +| Directory | Purpose | +| --------- | ------- | +| `incubator//` | Parent ArgoCD Application YAML, one per cluster | +| `values//` | Values files: `clusterSpec`, `teamSpec`, `argocdSpec`, `appSpec[]` | +| `generic-argo-apps-chart/` | Helm chart that renders child Applications from `appSpec` | +| `projects/` | ArgoCD `AppProject` definitions (`sre`, `sec`) | +| `external-name-service-*/` | Cross-cluster DNS routing (ExternalName / MCS topology) | + +--- + +## Build / test / run / validate + +There is no build step. Validation is done via Helm dry-run and pre-commit hooks. + +```bash +# Render a values file through the generic chart (dry-run): +helm template generic-argo-apps-chart/ -f values/prd/-values.yaml + +# Lint a values file: +yamllint values/prd/-values.yaml + +# Run all pre-commit hooks: +pre-commit run --all-files + +# Check which clusters have a specific tool: +grep -rl 'name: ' values/ +``` + +**Never use `--no-verify`** to skip pre-commit hooks. The hooks are: TruffleHog (secrets scan), CAC validate, Yaak. + +--- + +## Naming conventions + +### Values file filename + +```text +values//incubator-infra--values.yaml +``` + +Example: `values/prd/incubator-infra-k8s-central-prd-ase1-values.yaml` + +### Incubator file filename + +```text +incubator//incubator-infra-.yaml +``` + +The incubator filename (without `.yaml`) must equal `metadata.name` of the ArgoCD Application inside it. + +### appSpec `name` field + +Short, lowercase, hyphen-separated tool identifier. Used in generated Application name: + +```text +-- +``` + +**Cluster munging rules** (strips environment/region noise): +- Strip: `k8s-`, `prd-`, `int-`, `dev-`, `-ase1` +- Replace: `-ase1c` → `-c` +- Example: `k8s-central-prd-ase1` → `central-prd` + +Result: `keda` on `k8s-central-prd-ase1` → Application name `keda-central-prd`. + +### `namespace` convention + +| Pattern | When | +| ------- | ---- | +| `-` | Default (e.g., `keda-central-prd`) | +| Shared namespace | Multi-component tools (e.g., `victoriametrics` for all VM stack apps) | +| `-role-` | Multi-instance (e.g., `contour-internal-0-central-prd`) | + +--- + +## Common tasks + +### Add a tool to a cluster +→ See [docs/platform/procedures/add-tool-to-cluster.md](docs/platform/procedures/add-tool-to-cluster.md) +→ Skill: [skills/infra/add-tool.md](skills/infra/add-tool.md) + +### Upgrade a chart version +→ See [docs/platform/procedures/upgrade-chart-version.md](docs/platform/procedures/upgrade-chart-version.md) +→ Skill: [skills/infra/upgrade-chart-version.md](skills/infra/upgrade-chart-version.md) + +### Onboard a new cluster +→ See [docs/platform/procedures/add-new-cluster.md](docs/platform/procedures/add-new-cluster.md) +→ Skill: [skills/infra/onboard-cluster.md](skills/infra/onboard-cluster.md) + +### Remove a tool from a cluster +→ See [docs/platform/procedures/deboard-tool-from-cluster.md](docs/platform/procedures/deboard-tool-from-cluster.md) +→ Skill: [skills/infra/add-tool.md](skills/infra/add-tool.md) (covers removal) + +### Roll out a tool across all clusters +→ See [docs/platform/procedures/fleet-wide-tool-rollout.md](docs/platform/procedures/fleet-wide-tool-rollout.md) +→ Skill: [skills/infra/fleet-wide-rollout.md](skills/infra/fleet-wide-rollout.md) + +### Debug ArgoCD sync failure +→ See [docs/platform/runbooks/argocd-sync-failure.md](docs/platform/runbooks/argocd-sync-failure.md) + +### Debug Helm render failure +→ See [docs/platform/runbooks/render-failure.md](docs/platform/runbooks/render-failure.md) + +--- + +## Forbidden actions + +These are hard stops — not warnings. Attempting them will be blocked by hooks, branch protection, or agent halt. + +| Action | Why forbidden | Rule | +| ------ | ------------- | ---- | +| Edit `repository.yaml` | Owned by `registry-bootstrap` automation | R5 | +| Push directly to `main`, `develop`, or `pre-prod` | Auto-sync = immediate deploy to that env; branch protection enforced | R1, R11 | +| Run `argocd app sync` / `kubectl apply` | Out of scope; this repo is GitOps-only | AGENT_BOUNDARIES.md Layer 3 | +| Delete an incubator file without confirming cluster is decommissioned | Orphans tooling fleet-wide | AGENT_BOUNDARIES.md Layer 3 | +| Use `--no-verify` to skip pre-commit hooks | Bypasses TruffleHog; may commit secrets | R10 | +| Add secrets/credentials to YAML | TruffleHog blocks commit; accidental commit requires history purge | R6 | +| Add `nameOverride` without justification | Breaks naming consistency | R7 | +| Edit `generic-argo-apps-chart/` without platform-team sign-off | Template change breaks ALL clusters immediately | AGENT_BOUNDARIES.md Layer 1-T HIGH RISK | +| Modify `clusterSpec.destination.name` or `teamSpec.source.repoURL` | Redirects all tools to wrong cluster/repo | AGENT_BOUNDARIES.md Layer 1-T HIGH RISK | + +--- + +## Layer constraint summary + +| Layer | Applies to | Agent action | +| ----- | ---------- | ------------ | +| **Layer 1-T** | `appSpec` edits, new cluster onboarding, chart upgrades | Generate diff via tool or direct edit → open PR | +| **Layer 1-T HIGH RISK** | `generic-argo-apps-chart/` edits, `clusterSpec.destination`, `repoURL` changes | PR only, with explicit platform-team sign-off in body | +| **Layer 2** | ArgoCD sync commands, `argocd app diff` | Advisory only — suggest, do not execute | +| **Layer 3** | `repository.yaml`, `kubectl apply`, direct push to `main`/`develop`/`pre-prod`, incubator deletion | Hard stop — refuse and explain | + +Full classification: [docs/global/AGENT_BOUNDARIES.md](docs/global/AGENT_BOUNDARIES.md) + +--- + +## Key reference docs + +| Document | Purpose | +| -------- | ------- | +| [docs/global/AGENT_BOUNDARIES.md](docs/global/AGENT_BOUNDARIES.md) | Complete Layer 1/2/3 operation map with blast radii | +| [docs/global/SANCTITY_RULES.md](docs/global/SANCTITY_RULES.md) | R1–R12 non-negotiable rules | +| [docs/global/escalation-matrix.md](docs/global/escalation-matrix.md) | When to page a human | +| [docs/global/coding-guidelines/infra-argo.md](docs/global/coding-guidelines/infra-argo.md) | YAML authoring conventions (combined reference) | +| [docs/global/coding-guidelines/argocd.md](docs/global/coding-guidelines/argocd.md) | ArgoCD Application manifest conventions (incubator files) | +| [docs/global/coding-guidelines/helm.md](docs/global/coding-guidelines/helm.md) | Helm values file conventions (clusterSpec, teamSpec, appSpec) | +| [docs/platform/schemas/values-file-schema.md](docs/platform/schemas/values-file-schema.md) | appSpec field reference | +| [docs/platform/schemas/incubator-values-schema.md](docs/platform/schemas/incubator-values-schema.md) | Incubator Application YAML reference | +| [index.md](index.md) | Full doc tree navigation | +| [wiki/entities/DevOps Infra ArgoCD Config.md](wiki/entities/DevOps%20Infra%20ArgoCD%20Config.md) | Architecture + scale overview | diff --git a/README.md b/README.md index 4084cb6..57cd299 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,59 @@ # devops-infra-argo-config +GitOps control plane for infrastructure tooling across Meesho's Kubernetes fleet. + +This repo manages ArgoCD `Application` resources for every infrastructure tool (Contour, VictoriaMetrics, Grafana, Kyverno, KEDA, external-secrets, Vault, etc.) deployed across ~19 clusters. It uses an **App-of-Applications** pattern: one parent Application per cluster renders child Applications from a `appSpec[]` list via a generic Helm chart. + +Each environment tracks a dedicated branch — merging to that branch triggers immediate ArgoCD auto-sync with no staging gate: + +| Environment | Branch | +| ----------- | ------ | +| Production (prd) | `main` | +| Staging (stg) | `develop` | +| Integration (int) | `pre-prod` | + +## How it works + +```text +incubator//.yaml ← Parent Application (one per cluster) + └── points at generic-argo-apps-chart/ + values//-values.yaml + └── renders one child Application per appSpec[] entry + └── sources charts + overrides from devops-infra-helm-charts +``` + +## Directory structure + +| Directory | Purpose | +| --------- | ------- | +| `incubator//` | Parent ArgoCD Application YAML, one per cluster | +| `values//` | Values files defining which tools deploy per cluster | +| `generic-argo-apps-chart/` | Helm chart that renders child Applications from `appSpec[]` | +| `projects/` | ArgoCD `AppProject` definitions (`sre`, `sec`) | +| `external-name-service-*/` | Cross-cluster DNS routing (ExternalName / MCS topology) | +| `docs/` | Agent-facing operational documentation | +| `skills/` | Parameterized agent tasks for common operations | +| `wiki/` | Architecture decisions and entity pages | + +## Getting started + +- **Agents:** Read [CLAUDE.md](CLAUDE.md) first. +- **New team members:** Read [index.md](index.md) for full navigation. +- **PR reviewers:** Check [docs/global/coding-guidelines/infra-argo.md](docs/global/coding-guidelines/infra-argo.md). + +## Common operations + +| Task | Procedure | +| ---- | --------- | +| Add a tool to a cluster | [docs/platform/procedures/add-tool-to-cluster.md](docs/platform/procedures/add-tool-to-cluster.md) | +| Upgrade a chart version | [docs/platform/procedures/upgrade-chart-version.md](docs/platform/procedures/upgrade-chart-version.md) | +| Onboard a new cluster | [docs/platform/procedures/add-new-cluster.md](docs/platform/procedures/add-new-cluster.md) | +| Roll out a tool fleet-wide | [docs/platform/procedures/fleet-wide-tool-rollout.md](docs/platform/procedures/fleet-wide-tool-rollout.md) | +| Debug sync failure | [docs/platform/runbooks/argocd-sync-failure.md](docs/platform/runbooks/argocd-sync-failure.md) | +| Debug Helm render error | [docs/platform/runbooks/render-failure.md](docs/platform/runbooks/render-failure.md) | +| Find values inconsistencies across clusters | [docs/platform/runbooks/values-drift.md](docs/platform/runbooks/values-drift.md) | +| Debug stuck deployment | [docs/platform/runbooks/deployment-stuck.md](docs/platform/runbooks/deployment-stuck.md) | + +## Sister repos + +- [`devops-infra-helm-charts`](https://github.com/Meesho/devops-infra-helm-charts) — Helm charts and `custom-values.yaml` overrides. Every `appSpec[].chartDir` and `valuesDir` must exist here. +- [`devops-argo-config`](https://github.com/Meesho/devops-argo-config) — Same pattern for service/application workloads (not infra tooling). diff --git a/claude/00-overview.md b/claude/00-overview.md new file mode 100644 index 0000000..e63c922 --- /dev/null +++ b/claude/00-overview.md @@ -0,0 +1,33 @@ +> Per [AI Blitz Plan §6](../docs/global/AGENT_BOUNDARIES.md). Layer: 1-T. + +# 00 — Overview + +`devops-infra-argo-config` is the **infrastructure GitOps control plane** for Meesho's Kubernetes fleet. It defines which infrastructure tools run on which clusters using ArgoCD's App-of-Applications pattern. + +## Role in the ecosystem + +```text +devops-infra-argo-config (this repo) devops-infra-helm-charts +├── incubator//.yaml ─────────► helm-templates// +├── values//-values.yaml ─────► helm-overrides/// +├── generic-argo-apps-chart/ │ └── custom-values.yaml +└── projects/ └── ... +``` + +This repo tells ArgoCD **what to deploy and where**. The helm-charts repo provides **how to deploy it** (charts + override values). + +## Key characteristics + +- **Layer 1-T** — Agent-Writable (Tool-Mediated). Changes are PRs reviewed by the platform team. +- **App-of-Applications pattern** — One parent Application per cluster renders all child tool Applications via a single generic Helm chart. +- **~19 clusters** managed across `prd`, `int`, and `admin` environments. +- **20–50 infrastructure tools** per cluster (monitoring, ingress, secrets, CI/CD, policy, etc.). +- **Auto-sync** — Merge to the env branch deploys immediately with no staging gate. + +## Branch → environment mapping + +| Branch | Environment | ArgoCD namespace | Values dir | +| ------ | ----------- | ---------------- | ---------- | +| `main` | Production (prd) | `argocd-prd` | `values/prd/` | +| `develop` | Staging (stg) + Dev (dev) | `argocd-dev` | `values/dev/` | +| `pre-prod` | Integration (int) | `argocd-shared-int` | `values/int/` | diff --git a/claude/01-repo-structure.md b/claude/01-repo-structure.md new file mode 100644 index 0000000..2f2b9e3 --- /dev/null +++ b/claude/01-repo-structure.md @@ -0,0 +1,54 @@ +> Per [AI Blitz Plan §6](../docs/global/AGENT_BOUNDARIES.md). Layer: 1-T. + +# 01 — Repository Structure + +```text +devops-infra-argo-config/ +├── incubator/ # Parent ArgoCD Applications (one per cluster) +│ │ # Structure varies by branch: +│ │ # main: prd/ + admin/ +│ │ # develop: infra/ + apps/ (stg+dev clusters) +│ │ # pre-prod: prd/ + admin/ (int values in values/int/) +│ ├── prd/ # Production clusters (main branch) +│ │ ├── incubator-infra-k8s-central-prd-ase1.yaml +│ │ ├── incubator-infra-k8s-demand-prd-ase1.yaml +│ │ └── ... # ~15+ prd clusters +│ └── admin/ # Admin clusters (k8s-admin-prd, k8s-devops-admin, k8s-sec-admin) +│ └── ... +├── values/ # Per-cluster tool lists +│ ├── prd/ +│ │ ├── incubator-infra-k8s-central-prd-ase1-values.yaml +│ │ └── ... # Mirrors incubator/prd/ 1:1 +│ ├── int/ # Integration clusters (pre-prod branch only) +│ │ └── incubator-infra-k8s-shared-int-ase1-values.yaml +│ ├── dev/ # Stg+dev clusters (develop branch) — dir is named "dev" +│ │ ├── incubator-infra-k8s-central-stg-ase1-values.yaml +│ │ ├── incubator-infra-k8s-central-dev-ase1-values.yaml +│ │ └── ... # Both stg and dev cluster values +│ └── admin/ +├── generic-argo-apps-chart/ # Single Helm chart that renders child Applications +│ ├── Chart.yaml # meesho-generic-argo-apps-chart v0.1.0 +│ └── templates/ +│ └── genericTemplate.yaml # Iterates appSpec[] → Application CRDs +├── projects/ # ArgoCD AppProject definitions +│ ├── sre-project.yaml # sre project (all namespaces/clusters) +│ └── sec-project.yaml # sec project (security-scoped) +├── external-name-service-incubator/ # Cross-cluster DNS routing Applications +├── external-name-service-template/ # Helm chart for ExternalName services +├── external-name-service-values/ # MCS topology values per zone +├── pre-commit-scripts/ # Git hooks (TruffleHog, CAC validate, Yaak) +├── post-commit-scripts/ # Metrics hooks +└── repository.yaml # Repo metadata (automation-owned, DO NOT EDIT) +``` + +## Directory editability by layer + +| Directory | Purpose | Agent editable? | +| --------- | ------- | --------------- | +| `incubator//` | Parent Application YAMLs | Layer 1-T (new clusters only) | +| `values//` | Per-cluster tool lists (`appSpec[]`) | Layer 1-T ✓ | +| `generic-argo-apps-chart/` | Helm chart template | Layer 1-T HIGH RISK | +| `projects/` | ArgoCD AppProject RBAC | Layer 2 (advisory) | +| `external-name-service-*/` | Cross-cluster DNS | Layer 1-T (manual) | +| `pre-commit-scripts/` | Git hooks | Layer 3 (blocked) | +| `repository.yaml` | Automation-owned metadata | Layer 3 (blocked) | diff --git a/claude/02-app-of-apps-pattern.md b/claude/02-app-of-apps-pattern.md new file mode 100644 index 0000000..4ad98f4 --- /dev/null +++ b/claude/02-app-of-apps-pattern.md @@ -0,0 +1,46 @@ +> Per [AI Blitz Plan §6](../docs/global/AGENT_BOUNDARIES.md). Layer: 1-T. + +# 02 — App-of-Applications Pattern + +## The chain + +```text +incubator//.yaml ← Parent Application (managed by ArgoCD on admin cluster) + │ + │ source: this repo / generic-argo-apps-chart/ + │ valueFiles: ../values//-values.yaml + ▼ +generic-argo-apps-chart/templates/genericTemplate.yaml + │ + │ iterates appSpec[] array + ▼ +One child ArgoCD Application per appSpec entry + │ + │ source: devops-infra-helm-charts / helm-templates// + │ valueFiles: helm-overrides///custom-values.yaml + ▼ +Deployed tool on target cluster (Contour, Kyverno, VictoriaMetrics, etc.) +``` + +## How it works + +1. **Incubator Application** lives on the admin cluster's ArgoCD. It points at `generic-argo-apps-chart/` in this repo, using the cluster's values file. +2. **Generic chart** (`genericTemplate.yaml`) iterates over `appSpec[]` and renders one full ArgoCD Application manifest per entry. +3. **Child Applications** appear in ArgoCD, each pointing at a specific chart + override values in `devops-infra-helm-charts`. +4. **Auto-sync** is enabled — ArgoCD syncs child Applications immediately when the parent renders new manifests. + +## Adding a new tool + +Add one entry to `appSpec[]` in the cluster's values file. The generic chart renders the Application on the next sync — no YAML boilerplate needed. + +## Key invariant (R2) + +Each cluster requires exactly three things working together: + +| File | Location | Role | +| ---- | -------- | ---- | +| Incubator Application | `incubator//.yaml` | Parent — scans values file | +| Values file | `values//-values.yaml` | Tool list (`appSpec[]`) | +| Generic chart | `generic-argo-apps-chart/` | Renderer — produces child Applications | + +Breaking any leg of this triangle breaks the cluster's entire tooling. See [SANCTITY_RULES.md R2](../docs/global/SANCTITY_RULES.md). diff --git a/claude/03-generic-chart-template.md b/claude/03-generic-chart-template.md new file mode 100644 index 0000000..1a41331 --- /dev/null +++ b/claude/03-generic-chart-template.md @@ -0,0 +1,41 @@ +> Per [AI Blitz Plan §6](../docs/global/AGENT_BOUNDARIES.md). Layer: 1-T. + +# 03 — Generic Chart Template + +## Purpose + +Instead of maintaining one Application YAML per tool per cluster, `generic-argo-apps-chart/templates/genericTemplate.yaml` generates all Application CRDs dynamically from a single values file. Adding a tool = adding 4 lines to `appSpec[]`. + +## Variable flow + +```text +values file rendered Application +─────────── ──────────────────── +appSpec[].name ──────────────────────────────► metadata.name: -- +appSpec[].namespace ─────────────────────────► spec.destination.namespace +appSpec[].nameOverride (optional) ───────────► metadata.name (overrides auto-generated) +appSpec[].chartDir ──────────────────────────► spec.source.path: helm-templates/ +appSpec[].valuesDir ─────────────────────────► spec.source.helm.valueFiles: .../helm-overrides///custom-values.yaml +appSpec[].additionalValueFiles (optional) ───► extra helm valueFiles entries +teamSpec.devops.labels ──────────────────────► metadata.labels (bu, team, env, cluster) +teamSpec.devops.source.repoURL ──────────────► spec.source.repoURL +argocdSpec.namespace ────────────────────────► metadata.namespace (where Application CRD lives) +clusterSpec.destination.name ────────────────► spec.destination.name +``` + +## Cluster name munging + +The template strips environment/region noise from the cluster name to produce a short Application name segment: + +| Step | Transformation | +| ---- | -------------- | +| Strip | `k8s-`, `prd-`, `int-`, `dev-`, `-ase1` | +| Replace | `-ase1c` → `-c` | + +Example: `k8s-central-prd-ase1` → `central-prd` → Application name: `keda-central-prd` + +## Why this matters for agents + +- Template changes are **fleet-wide** — a bug breaks every tool on every cluster simultaneously. +- `generic-argo-apps-chart/` edits are classified as **Layer 1-T HIGH RISK** — requires explicit platform-team sign-off and must be tested with `helm template` against multiple values files before merging. +- See [AGENT_BOUNDARIES.md](../docs/global/AGENT_BOUNDARIES.md) for the full classification. diff --git a/claude/04-values-hierarchy.md b/claude/04-values-hierarchy.md new file mode 100644 index 0000000..5c5c4b1 --- /dev/null +++ b/claude/04-values-hierarchy.md @@ -0,0 +1,68 @@ +> Per [AI Blitz Plan §6](../docs/global/AGENT_BOUNDARIES.md). Layer: 1-T. + +# 04 — Values Hierarchy + +Each cluster values file (`values//incubator-infra--values.yaml`) has exactly four top-level keys in this order: + +## 1. clusterSpec — where to deploy + +```yaml +clusterSpec: + destination: + server: "" # Always empty — use name-based routing + name: "k8s-central-prd-ase1" # GKE cluster name (must match incubator filename and helm-overrides/ folder) +``` + +## 2. argocdSpec — ArgoCD context + +```yaml +argocdSpec: + namespace: argocd-prd # ArgoCD namespace where child Application CRDs are created + # prd → argocd-prd, stg → argocd-dev, int → argocd-shared-int +``` + +## 3. teamSpec — chart source and labels + +```yaml +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts # Allow-listed; do not change + targetRevision: main # prd=main, stg=develop, int=pre-prod + path: helm-templates # Chart root in the helm-charts repo + valueFiles: ../../helm-overrides/k8s-central-prd-ase1 # Relative path to cluster overrides + labels: + bu: infra # Always "infra" for this repo + team: devops # Maps to ArgoCD AppProject (sre or sec) + env: prd # Environment: prd, int, dev, admin + cluster: k8s-central-prd-ase1 # Must match clusterSpec.destination.name +``` + +## 4. appSpec — the editing surface + +```yaml +appSpec: + - name: keda # Short tool name — used in Application name generation + namespace: keda-central-prd # Target Kubernetes namespace + chartDir: keda # Directory under helm-templates/ in helm-charts repo + valuesDir: keda # Directory under helm-overrides// in helm-charts repo + # Optional fields: + - name: coredns + namespace: kube-system + chartDir: coredns + valuesDir: coredns + nameOverride: coredns-central-prd # Only for name collisions or >253 char names + additionalValueFiles: + - ../../helm-templates/coredns/gcp-ase1a-values.yaml # Region-shared overlay +``` + +## Cross-repo dependency + +Every `appSpec` entry creates a dependency on `devops-infra-helm-charts`: + +| appSpec field | Must exist in devops-infra-helm-charts | +| ------------- | -------------------------------------- | +| `chartDir` | `helm-templates//` | +| `valuesDir` | `helm-overrides///custom-values.yaml` | + +If either is missing, ArgoCD will fail to render the Application. Always verify in the sister repo before adding an appSpec entry. See [SANCTITY_RULES.md R3](../docs/global/SANCTITY_RULES.md). diff --git a/claude/05-naming-conventions.md b/claude/05-naming-conventions.md new file mode 100644 index 0000000..82c35bc --- /dev/null +++ b/claude/05-naming-conventions.md @@ -0,0 +1,86 @@ +> Per [AI Blitz Plan §6](../docs/global/AGENT_BOUNDARIES.md). Layer: 1-T. + +# 05 — Naming Conventions + +Naming in this repo is **structural** — names are routing identifiers used by ArgoCD, not cosmetic labels. A mismatch between a filename, `metadata.name`, and `clusterSpec.destination.name` can cause silent misrouting. See [SANCTITY_RULES.md R9](../docs/global/SANCTITY_RULES.md). + +## File naming + +File naming and directory layout differ by environment: + +| Env | Branch | Incubator dir | Incubator file prefix | Values dir | +| --- | ------ | ------------- | --------------------- | ---------- | +| prd | `main` | `incubator/prd/` | `incubator-infra-` | `values/prd/` | +| stg / dev (infra) | `develop` | `incubator/infra/` | `incubator-infra-` | `values/dev/` | +| stg / dev (apps) | `develop` | `incubator/apps/` | `incubator-apps-` | `values/dev/` | +| int | `pre-prod` | *(no incubator file — values only)* | `incubator-infra-` | `values/int/` | +| admin | `main` / `pre-prod` | `incubator/admin/` | `incubator-infra-` | `values/admin/` | + +**Full filename patterns:** + +| File type | Pattern | Example (prd) | Example (stg) | +| --------- | ------- | ------------- | ------------- | +| Incubator Application (infra) | `incubator-infra-.yaml` | `incubator-infra-k8s-central-prd-ase1.yaml` | `incubator-infra-k8s-central-stg-ase1.yaml` | +| Incubator Application (apps) | `incubator-apps-.yaml` | *(prd uses infra only)* | `incubator-apps-k8s-central-stg-ase1.yaml` | +| Values file | `incubator-infra--values.yaml` | `values/prd/incubator-infra-k8s-central-prd-ase1-values.yaml` | `values/dev/incubator-infra-k8s-central-stg-ase1-values.yaml` | +| AppProject | `-project.yaml` | `sre-project.yaml` | — | + +## Incubator ↔ values file invariant + +The incubator filename (without `.yaml`) **must equal** `metadata.name` inside it, and must have a matching values file. Directory prefix and env segment both vary by branch: + +```text +prd (main): + incubator/prd/incubator-infra-k8s-central-prd-ase1.yaml + metadata.name: incubator-infra-k8s-central-prd-ase1 + valueFiles: ../values/prd/incubator-infra-k8s-central-prd-ase1-values.yaml + +stg (develop): + incubator/infra/incubator-infra-k8s-central-stg-ase1.yaml + metadata.name: incubator-infra-k8s-central-stg-ase1 + valueFiles: ../values/dev/incubator-infra-k8s-central-stg-ase1-values.yaml + +int (pre-prod): + (no incubator file — values/int/incubator-infra-k8s-shared-int-ase1-values.yaml only) +``` + +## ArgoCD Application name generation + +Child Applications are named by the generic chart template: + +```text +-- +``` + +**Munging rules** (applied in order): + +| Input | Output | +| ----- | ------ | +| Strip `k8s-` | `k8s-central-prd-ase1` → `central-prd-ase1` | +| Strip `-ase1` | `central-prd-ase1` → `central-prd` | +| Replace `-ase1c` → `-c` | `central-prd-ase1c` → `central-prd-c` | +| Strip `prd-`, `int-`, `dev-` | `prd-central` → `central` | + +Result: `keda` on `k8s-central-prd-ase1` → **`keda-central-prd`** + +## Namespace convention + +| Pattern | When | Example | +| ------- | ---- | ------- | +| `-` | Default | `keda-central-prd` | +| Shared namespace | Multi-component tools | `victoriametrics` (all VM stack apps) | +| `kube-system` | System-level tools | CoreDNS, kube-dns | +| `-role-` | Multi-instance | `contour-internal-0-central-prd` | + +## GKE cluster naming pattern + +```text +k8s--- +k8s--- +``` + +prd examples: `k8s-central-prd-ase1`, `k8s-demand-prd-ase1`, `k8s-datascience-prd-ase1` +stg examples: `k8s-central-stg-ase1`, `k8s-demand-stg-ase1`, `k8s-farmiso-stg-ase1` +dev examples: `k8s-central-dev-ase1`, `k8s-demand-dev-ase1`, `k8s-dengspark-dev-ase1` +int examples: `k8s-shared-int-ase1` +admin examples: `k8s-admin-prd-ase1`, `k8s-devops-admin-ase1`, `k8s-sec-admin-ase1` diff --git a/claude/06-glossary.md b/claude/06-glossary.md new file mode 100644 index 0000000..258c807 --- /dev/null +++ b/claude/06-glossary.md @@ -0,0 +1,39 @@ +> Per [AI Blitz Plan §6](../docs/global/AGENT_BOUNDARIES.md). Layer: 1-T. + +# 06 — Glossary and References + +## Terms + +| Term | Definition | +| ---- | ---------- | +| **Application** | ArgoCD custom resource defining a deployment: source repo, chart path, values, destination cluster/namespace. | +| **AppProject** | ArgoCD custom resource defining RBAC: which repos and namespaces a team's Applications may use. `sre` and `sec` are the two projects in this repo. | +| **App-of-Applications** | Pattern where a parent Application renders child Applications via a Helm chart. Used throughout this repo. | +| **Incubator** | The parent Application YAML (`incubator//.yaml`) that points at the generic chart + values file. One per cluster. | +| **Generic chart** | `generic-argo-apps-chart/` — Helm chart whose template generates one ArgoCD Application per `appSpec[]` entry. | +| **Values file** | `values//-values.yaml` — defines `clusterSpec`, `argocdSpec`, `teamSpec`, and `appSpec[]` for a cluster. | +| **appSpec** | The list of tools to deploy on a cluster. The primary editing surface in this repo. | +| **chartDir** | The chart directory name under `devops-infra-helm-charts/helm-templates/`. Must exist before referencing. | +| **valuesDir** | The override directory name under `devops-infra-helm-charts/helm-overrides//`. Must contain `custom-values.yaml`. | +| **mungedCluster** | The shortened cluster name segment used in Application names (e.g. `k8s-central-prd-ase1` → `central-prd`). | +| **nameOverride** | Optional `appSpec` field to override the auto-generated Application name. Use only for collisions or >253-char names. | +| **ExternalName service** | Kubernetes service type used for cross-cluster DNS routing in the `external-name-service-*` directories (MCS topology). | +| **Layer 1-T** | Tool-Mediated: agent generates YAML diff and opens PR; human reviews and merges. | +| **Layer 3** | Blocked: agent must refuse and explain why. | + +## Key files + +| File | Purpose | +| ---- | ------- | +| [CLAUDE.md](../CLAUDE.md) | Agent entry point — read first | +| [docs/global/AGENT_BOUNDARIES.md](../docs/global/AGENT_BOUNDARIES.md) | Complete Layer 1/2/3 operation map | +| [docs/global/SANCTITY_RULES.md](../docs/global/SANCTITY_RULES.md) | R1–R12 non-negotiable rules | +| [docs/platform/schemas/values-file-schema.md](../docs/platform/schemas/values-file-schema.md) | appSpec field reference | +| [docs/platform/schemas/incubator-values-schema.md](../docs/platform/schemas/incubator-values-schema.md) | Incubator Application YAML reference | + +## Sister repos + +| Repo | Relationship | +| ---- | ------------ | +| `devops-infra-helm-charts` | Helm charts and `custom-values.yaml` overrides. Every `chartDir` and `valuesDir` must exist here. | +| `devops-argo-config` | Same App-of-Applications pattern but for service/application workloads, not infrastructure tooling. | diff --git a/docs/global/AGENT_BOUNDARIES.md b/docs/global/AGENT_BOUNDARIES.md new file mode 100644 index 0000000..b8756c0 --- /dev/null +++ b/docs/global/AGENT_BOUNDARIES.md @@ -0,0 +1,94 @@ +# Agent Boundaries — `devops-infra-argo-config` + +> Authoritative document defining which operations agents can perform in this repository. +> +> **Audience:** Claude Code agents, human reviewers of agent-generated PRs. +> +> **Model:** 3-Layer Operating Model per AI Blitz Plan §4.2. + +--- + +## The 3-Layer Model + +| Layer | What agents do | Safety gate | +| ----- | -------------- | ----------- | +| **Layer 1-T** (Tool-Mediated) | Generate YAML diff via tools, open PR. No direct YAML edits. | PR review by platform team. | +| **Layer 2** (Agent-Readable Advisory) | Research, analyze, suggest. Human executes. | Human judgment. | +| **Layer 3** (Agent-Blocked) | Refuse the write. Direct user to correct owner. | Hard stop. | + +**This repo is Layer 1-T.** All YAML changes should go through `incubator-tool` or `argo-app-tool` where available. Direct YAML edits bypass tool validation but are acceptable when tools are not available, provided the PR checklist is followed. + +--- + +## Per-operation classification + +### Layer 1-T — Standard operations + +| Operation | Files affected | Blast radius | Tool | Approval | +| --------- | ------------- | ------------ | ---- | -------- | +| Add appSpec entry to values file | `values//-values.yaml` | Single cluster, single tool | `argo-app-tool` | Platform team PR review | +| Remove appSpec entry from values file | `values//-values.yaml` | Single cluster, single tool | `argo-app-tool` | Platform team PR review | +| Update appSpec entry (chartDir, valuesDir, namespace) | `values//-values.yaml` | Single cluster, single tool | `argo-app-tool` | Platform team PR review | +| Add `nameOverride` to appSpec entry | `values//-values.yaml` | Single cluster, single tool | `argo-app-tool` | Requires justification in PR | +| Create incubator file for new cluster | `incubator//.yaml` | New cluster bootstrap | `incubator-tool` | Platform team PR review | +| Create values file for new cluster | `values//-values.yaml` | New cluster bootstrap | `argo-app-tool` | Platform team PR review | +| Add external-name-service files | `external-name-service-*/**` | Cross-cluster DNS routing | Manual | Platform team PR review | +| Modify AppProject | `projects/*.yaml` | All Applications referencing the project | Manual | Platform team + security review | + +### Layer 1-T — HIGH RISK operations + +These are Layer 1-T (agent may generate the diff + open PR) but carry elevated risk: + +| Operation | Why high risk | Extra requirement | +| --------- | ------------- | ----------------- | +| Edit `generic-argo-apps-chart/` | Auto-sync means a bad template change breaks ALL clusters immediately | Explicit platform-team sign-off; test with `helm template` against multiple values files | +| Modify `clusterSpec.destination` in values file | Redirects all tools to a different cluster | Verify cluster name exists in GKE | +| Change `teamSpec.source.targetRevision` | Switches chart source branch — affects all tools on the cluster | Must match env branch: `main` (prd), `develop` (stg/dev), `pre-prod` (int) | +| Change `teamSpec.source.repoURL` | Switches chart source repo entirely | Requires platform-team approval | +| Bulk-add appSpec entries to multiple clusters | Fleet-wide tool rollout | Each cluster's entry must be individually verified | + +### Layer 2 — Advisory only (no agent write) + +| Operation | Agent action | +| --------- | ------------ | +| Run `argocd app sync ` | Suggest the command; do not execute. Infra apps auto-sync from `main`. | +| Run `argocd app diff ` | Suggest the command if cluster access is available. | +| Investigate sync failure | Read logs, analyze values, suggest fix. See [runbooks/argocd-sync-failure.md](../platform/runbooks/argocd-sync-failure.md). | +| Check which clusters have a tool | Run `grep -rl 'name: ' values/` — read-only. | +| Audit AppProject scope | Read `projects/` and list dependent Applications — advisory only. | + +### Layer 3 — Hard stops (agent must refuse) + +| Operation | Why blocked | Redirect | +| --------- | ----------- | -------- | +| Edit `repository.yaml` | Owned by `registry-bootstrap` automation | Direct user to upstream automation | +| Run `kubectl apply` against a cluster | Out of scope — this repo is GitOps, not in-cluster mutation | Direct to incident response procedures | +| Push directly to `main` | Branch protection enforced at org level | Open PR instead | +| Delete an incubator file | Orphans the cluster's tooling | Require confirmation that cluster is decommissioned | +| Force-push to any branch | Destructive, irreversible | Never do this | +| Skip pre-commit hooks (`--no-verify`) | Bypasses TruffleHog, CAC, Yaak | Fix the hook failure instead | +| Add secrets to YAML | TruffleHog will block; if bypassed, requires history purge | Use external-secrets operator | + +--- + +## Cross-cut verification checklist (every Layer 1-T PR) + +Before merging any agent-generated PR: + +1. Tool was used (or manual edit follows tool conventions). +2. `chartDir` exists in `devops-infra-helm-charts/helm-templates/`. +3. `valuesDir` exists in `devops-infra-helm-charts/helm-overrides//`. +4. Auto-generated Application name is <= 253 characters. +5. No name collision with existing appSpec entries in the same values file. +6. `nameOverride` is used only when justified (R7). +7. `spec.project` references an existing AppProject (`sre` or `sec`). + +--- + +## Escalation procedure + +When an operation falls outside Layer 1-T boundaries: + +1. Refuse the write. +2. Cite this document and the specific layer/operation. +3. Suggest the human ask the platform team or file a CMR (Change Management Request). diff --git a/docs/global/SANCTITY_RULES.md b/docs/global/SANCTITY_RULES.md new file mode 100644 index 0000000..cbcd530 --- /dev/null +++ b/docs/global/SANCTITY_RULES.md @@ -0,0 +1,118 @@ +# Sanctity Rules — `devops-infra-argo-config` + +> Non-negotiable rules for this repository. Violations are hard stops — not warnings, not suggestions. +> +> **Audience:** Every agent and human who opens a PR against this repo. +> +> **Enforcement:** Pre-commit hooks (TruffleHog, CAC validate, Yaak) + branch protection on `main`. A merge to `main` **immediately deploys** — infra apps are auto-sync. + +--- + +## R1: `main` is production + +A merge to `main` triggers immediate ArgoCD auto-sync across all managed clusters. There is no staging gate between merge and deploy. + +- No experiments on `main`. +- No force-pushes to `main`. +- Every PR must pass pre-commit hooks and receive platform-team review before merge. + +--- + +## R2: The incubator ↔ values ↔ generic-chart contract is sacred + +Each cluster is bootstrapped by exactly three things working together: + +1. **Incubator file** (`incubator//.yaml`) — parent ArgoCD Application that points at the generic chart + the cluster's values file. +2. **Values file** (`values//-values.yaml`) — defines `clusterSpec`, `teamSpec`, `argocdSpec`, and the `appSpec[]` list. +3. **Generic chart** (`generic-argo-apps-chart/`) — renders one child ArgoCD Application per `appSpec` entry. + +Breaking any leg of this triangle breaks the cluster's tooling. The naming conventions in CLAUDE.md are load-bearing — they are identifiers, not cosmetic. + +--- + +## R3: `appSpec` entries must reference existing chart and values in `devops-infra-helm-charts` + +Every `appSpec[].chartDir` must correspond to a directory under `devops-infra-helm-charts/helm-templates/`. Every `appSpec[].valuesDir` must correspond to a directory under `devops-infra-helm-charts/helm-overrides//`. If either doesn't exist, the ArgoCD Application will fail to render. + +**Verify before adding:** +```bash +# chartDir exists? +ls devops-infra-helm-charts/helm-templates// + +# valuesDir exists? +ls devops-infra-helm-charts/helm-overrides///custom-values.yaml +``` + +--- + +## R4: Child Application names are auto-generated — do not invent names + +The generic chart template generates Application names as: + +``` +-- +``` + +Where cluster munging strips: `k8s-`, `prd-`, `int-`, `dev-`, `-ase1`; maps `-ase1c` to `-c`. + +Example: `keda` on `k8s-central-prd-ase1` becomes `keda-central-prd`. + +Only use `nameOverride` when: +- The auto-generated name would exceed 253 characters (Kubernetes limit). +- There is a genuine name collision between two appSpec entries. + +--- + +## R5: `repository.yaml` is automation-owned + +Owned by `registry-bootstrap`. Direct edits will be overwritten. To change ownership metadata, go to the upstream automation. + +--- + +## R6: Secrets stay out of git + +No credentials, tokens, API keys, or passwords in any YAML file. The TruffleHog pre-commit hook will block the commit. If a secret is accidentally committed, it must be force-purged from history — this requires platform-team involvement. + +--- + +## R7: `nameOverride` is exceptional, not routine + +Most PRs should not include `nameOverride`. When reviewing, flag any `nameOverride` that lacks a comment explaining why the auto-generated name was insufficient. + +--- + +## R8: One incubator file per cluster, one values file per cluster + +The 1:1 mapping between incubator files and values files is structural. Do not create multiple incubator files for the same cluster or share a values file across clusters. + +--- + +## R9: Cluster folder/file names are routing keys + +The cluster name in the values file (`clusterSpec.destination.name`) must match the incubator file name and the `helm-overrides/` folder name in the sister repo. These names are used by ArgoCD for cluster routing — a mismatch means tools deploy to the wrong cluster or fail silently. + +--- + +## R10: Pre-commit hooks must pass + +Run `pre-commit run --all-files` before pushing. Never use `--no-verify` to skip hooks. If a hook fails, fix the root cause. + +The hooks are: TruffleHog (secrets scan), CAC validate (config validation), Yaak (additional linting). + +--- + +## R11: Branch protection trumps everything + +All changes go via PR with required review. Direct pushes to `main` are blocked at the GitHub org level. No exceptions for "quick fixes" — the blast radius of a bad merge is immediate cluster-wide impact. + +--- + +## R12: AppProject wildcards are dangerous + +The `sre` and `sec` projects currently allow `*` for source repos and destinations. Widening or modifying AppProject scope requires auditing every Application that references the project. A misconfigured project could allow unauthorized deployments. + +--- + +## How to cite these rules + +In PR reviews or agent halt messages, cite as: *"Blocked by R3 (SANCTITY_RULES.md) — chartDir must exist in devops-infra-helm-charts before adding appSpec."* diff --git a/docs/global/coding-guidelines/argocd.md b/docs/global/coding-guidelines/argocd.md new file mode 100644 index 0000000..55bf87c --- /dev/null +++ b/docs/global/coding-guidelines/argocd.md @@ -0,0 +1,135 @@ +> Per [AI Blitz Plan §6](../AGENT_BOUNDARIES.md). Layer: 1-T. + +# Coding Guidelines — ArgoCD Application Manifests + +Conventions for ArgoCD `Application` YAML files in `incubator//`. + +--- + +## Required fields + +Every incubator Application must have all of these: + +```yaml +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra- # Must match filename without .yaml + namespace: # argocd-prd | argocd-dev | argocd-shared-int + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: # main | develop | pre-prod + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values//incubator-infra--values.yaml + destination: + name: in-cluster + namespace: +``` + +--- + +## `metadata.name` rules + +- Must equal the filename without `.yaml` — this is ArgoCD's tracking key (R9). +- Convention: `incubator-infra-` (e.g. `incubator-infra-k8s-central-prd-ase1`). +- Changing this after the Application is registered breaks ArgoCD tracking; treat as immutable. + +--- + +## `metadata.namespace` (ArgoCD namespace) + +| Environment | Namespace | +| ----------- | --------- | +| prd | `argocd-prd` | +| stg / dev | `argocd-dev` | +| int | `argocd-shared-int` | + +The `metadata.namespace` and `spec.destination.namespace` must be the same value. + +--- + +## `spec.source.repoURL` allow-list + +Only one value is permitted: + +```text +https://github.com/Meesho/devops-infra-argo-config +``` + +Changing this is a **Layer 3** operation. See [AGENT_BOUNDARIES.md](../AGENT_BOUNDARIES.md). + +--- + +## `spec.source.targetRevision` + +Must match the environment branch: + +| Environment | `targetRevision` | +| ----------- | ---------------- | +| prd | `main` | +| stg / dev | `develop` | +| int | `pre-prod` | + +Never pin to a feature branch. Feature branches are not monitored by auto-sync. + +--- + +## `spec.source.path` + +Always `generic-argo-apps-chart`. This is the Helm chart that renders child Applications from the values file. + +--- + +## `spec.destination.name` + +Always `in-cluster`. Incubator Applications run on the ArgoCD admin cluster itself, not on the target GKE cluster. + +--- + +## `spec.destination.namespace` + +Must match `metadata.namespace` — same ArgoCD namespace. + +--- + +## Finalizer + +The finalizer `resources-finalizer.argocd.argoproj.io` must be present. It causes ArgoCD to cascade-delete child Applications when the parent incubator is deleted. Removing it creates orphaned child Applications. + +--- + +## `helm.valueFiles` path convention + +Paths are relative to the chart root (`generic-argo-apps-chart/`), so `..` is required to reach the repo root: + +```text +generic-argo-apps-chart/ (chart root = ArgoCD's working dir for this source) + ../values//incubator-infra--values.yaml + └── resolves to: values//incubator-infra--values.yaml at repo root +``` + +--- + +## Naming invariant + +Directory and values path vary by env — but the invariant itself is universal: + +```text +prd (main): + Filename: incubator/prd/incubator-infra-k8s-central-prd-ase1.yaml + metadata.name: incubator-infra-k8s-central-prd-ase1 + helm.valueFiles: ../values/prd/incubator-infra-k8s-central-prd-ase1-values.yaml + +stg (develop): + Filename: incubator/infra/incubator-infra-k8s-central-stg-ase1.yaml + metadata.name: incubator-infra-k8s-central-stg-ase1 + helm.valueFiles: ../values/dev/ incubator-infra-k8s-central-stg-ase1-values.yaml +``` + +All three must be consistent. Any mismatch causes a routing failure. diff --git a/docs/global/coding-guidelines/helm.md b/docs/global/coding-guidelines/helm.md new file mode 100644 index 0000000..b808bb6 --- /dev/null +++ b/docs/global/coding-guidelines/helm.md @@ -0,0 +1,141 @@ +> Per [AI Blitz Plan §6](../AGENT_BOUNDARIES.md). Layer: 1-T. + +# Coding Guidelines — Helm Values Files + +Conventions for cluster values files (`values//incubator-infra--values.yaml`). + +--- + +## File naming + +```text +values//incubator-infra--values.yaml +``` + +The values directory name does **not** always match the environment name: + +| Environment | Branch | Values dir | Example | +| ----------- | ------ | ---------- | ------- | +| prd | `main` | `values/prd/` | `values/prd/incubator-infra-k8s-central-prd-ase1-values.yaml` | +| stg | `develop` | `values/dev/` | `values/dev/incubator-infra-k8s-central-stg-ase1-values.yaml` | +| dev | `develop` | `values/dev/` | `values/dev/incubator-infra-k8s-central-dev-ase1-values.yaml` | +| int | `pre-prod` | `values/int/` | `values/int/incubator-infra-k8s-shared-int-ase1-values.yaml` | +| admin | `main` / `pre-prod` | `values/admin/` | `values/admin/incubator-infra-k8s-devops-admin-ase1-values.yaml` | + +Note: stg and dev clusters both live under `values/dev/` on the `develop` branch. + +--- + +## Top-level structure + +Four keys in this exact order — no additions, no reordering: + +```yaml +clusterSpec: +argocdSpec: +teamSpec: +appSpec: +``` + +--- + +## `clusterSpec` + +```yaml +clusterSpec: + destination: + server: "" # Always empty string — name-based routing only + name: "k8s-central-prd-ase1" # Must match GKE cluster name and helm-overrides/ folder +``` + +- `server` is always `""`. Never set a URL here. +- `name` is immutable after cluster registration. Changing it redirects all tooling. + +--- + +## `argocdSpec` + +```yaml +argocdSpec: + namespace: argocd-prd # argocd-prd | argocd-dev | argocd-shared-int +``` + +| Environment | Namespace | +| ----------- | --------- | +| prd | `argocd-prd` | +| stg / dev | `argocd-dev` | +| int | `argocd-shared-int` | + +--- + +## `teamSpec` + +```yaml +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main # main | develop | pre-prod + path: helm-templates + valueFiles: ../../helm-overrides/ + labels: + bu: infra + team: devops + env: prd # prd | stg | dev | int | admin + cluster: k8s-central-prd-ase1 # Must match clusterSpec.destination.name +``` + +**`repoURL` allow-list:** Only `https://github.com/Meesho/devops-infra-helm-charts` is permitted. + +**`targetRevision`** must match the environment: + +| Environment | `targetRevision` | +| ----------- | ---------------- | +| prd | `main` | +| stg / dev | `develop` | +| int | `pre-prod` | + +**`valueFiles` path:** Relative from `helm-templates/` root (two levels up) to the cluster's override directory. Always `../../helm-overrides/`. + +**`labels.cluster`** must equal `clusterSpec.destination.name` exactly — it is used in Application name generation. + +--- + +## `appSpec` + +```yaml +appSpec: + - name: keda # Short, lowercase, hyphen-separated tool name + namespace: keda-central-prd # Target K8s namespace + chartDir: keda # Directory under helm-templates/ in helm-charts repo + valuesDir: keda # Directory under helm-overrides// in helm-charts repo +``` + +- One entry = one ArgoCD child Application. +- Generated name: `--` (e.g. `keda-central-prd`). +- `chartDir` and `valuesDir` **must exist** in `devops-infra-helm-charts` before adding the entry (R3). + +### Optional fields + +```yaml + - name: coredns + namespace: kube-system + chartDir: coredns + valuesDir: coredns + nameOverride: coredns-central-prd # Only for name collisions or >253 char names (R7) + additionalValueFiles: + - ../../helm-templates/coredns/gcp-ase1a-values.yaml +``` + +--- + +## Common mistakes + +| Mistake | Impact | Fix | +| ------- | ------ | --- | +| `server: ` instead of `""` | May route to wrong cluster | Always use `""` | +| Wrong `targetRevision` for env | Tools pull from wrong chart branch | Use `main`/`develop`/`pre-prod` per env | +| `chartDir` not in `helm-templates/` | ArgoCD render failure | Verify in `devops-infra-helm-charts` first | +| `valuesDir` missing `custom-values.yaml` | ArgoCD render failure | Add `custom-values.yaml` to the override dir | +| `labels.cluster` ≠ `clusterSpec.destination.name` | Application name munging uses wrong cluster | Keep them identical | +| Duplicate `name` in `appSpec` | Application name collision | Use `nameOverride` for multi-instance tools | diff --git a/docs/global/coding-guidelines/infra-argo.md b/docs/global/coding-guidelines/infra-argo.md new file mode 100644 index 0000000..34d27b1 --- /dev/null +++ b/docs/global/coding-guidelines/infra-argo.md @@ -0,0 +1,149 @@ +# Coding Guidelines — Values Files and appSpec Entries + +> YAML authoring conventions for `devops-infra-argo-config`. +> +> **Scope:** `values//-values.yaml` files and `appSpec` entries within them. + +--- + +## Values file structure + +Every values file has exactly four top-level keys in this order: + +```yaml +clusterSpec: # Cluster identity — destination for ArgoCD +argocdSpec: # ArgoCD namespace +teamSpec: # Source repo, labels, team identity +appSpec: # List of tools to deploy to this cluster +``` + +Do not add other top-level keys. Do not reorder these keys. + +--- + +## `clusterSpec` conventions + +```yaml +clusterSpec: + destination: + server: "" # Leave empty — use name-based routing + name: "k8s-central-prd-ase1" # Must match the cluster name in GKE +``` + +- `server` is always empty string `""` — name-based routing is the standard. +- `name` must exactly match the GKE cluster name and the `helm-overrides/` folder in the sister repo. + +--- + +## `argocdSpec` conventions + +```yaml +argocdSpec: + namespace: argocd-prd # prd → argocd-prd | stg/dev → argocd-dev | int → argocd-shared-int +``` + +--- + +## `teamSpec` conventions + +```yaml +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main # Env-specific: prd=main, stg/dev=develop, int=pre-prod + path: helm-templates # Chart root in the helm-charts repo + valueFiles: ../../helm-overrides/k8s-central-prd-ase1 # Relative path to overrides + labels: + bu: infra # Always "infra" for this repo + team: devops # Always "devops" — maps to sre AppProject + env: prd # prd, int, dev, or admin + cluster: k8s-central-prd-ase1 # Must match clusterSpec.destination.name +``` + +- `targetRevision` must match the environment branch: `main` (prd), `develop` (stg/dev), `pre-prod` (int). Deviating from this requires explicit justification. +- `valueFiles` is a relative path from the chart source to the cluster's override directory in `devops-infra-helm-charts`. +- Labels are used by the generic chart template for Application naming and metadata. + +--- + +## `appSpec` entry conventions + +Each entry in `appSpec` defines one ArgoCD child Application: + +```yaml +appSpec: + - name: keda # Short tool name (used in Application name generation) + namespace: keda-central-prd # Target namespace (auto-created by ArgoCD) + chartDir: keda # Directory under helm-templates/ in helm-charts repo + valuesDir: keda # Directory under helm-overrides// in helm-charts repo +``` + +### Required fields + +| Field | Description | Convention | +| ----- | ----------- | ---------- | +| `name` | Short tool identifier | Lowercase, hyphen-separated. Used in rendered Application name. | +| `namespace` | Kubernetes namespace for the tool | Pattern: `-` or shared namespace (e.g., `victoriametrics`, `kube-system`) | +| `chartDir` | Chart directory name in `helm-templates/` | Must exist in `devops-infra-helm-charts` | +| `valuesDir` | Override directory name in `helm-overrides//` | Must exist in `devops-infra-helm-charts` | + +### Optional fields + +| Field | When to use | +| ----- | ----------- | +| `nameOverride` | Only when the auto-generated name exceeds 253 chars or collides with another entry | +| `additionalValueFiles` | When a tool needs region-shared overlays (e.g., CoreDNS GCP zone values) | + +### Ordering + +New appSpec entries should be appended at the end of the list. Do not sort alphabetically — the order reflects deployment history and makes diffs cleaner. + +--- + +## Namespace naming patterns + +| Pattern | When | +| ------- | ---- | +| `-` | Default. Example: `keda-central-prd`, `contour-external-central-prd` | +| Shared namespace | When multiple tools share a namespace. Example: `victoriametrics` for all VM tools, `kube-system` for system tools | +| Tool-specific with role | Multi-instance tools. Example: `contour-internal-0-central-prd`, `contour-internal-1-central-prd` | + +--- + +## Application name generation + +The generic chart template generates names as: + +``` +-- +``` + +**Cluster munging rules** (applied in order by the Helm template): +1. Replace `dp-` with placeholder, `backup` with placeholder +2. Strip: `p-`, `prd-`, `int-`, `dev-`, `-cluster` +3. Replace: `prod-ops` → `infra`, `-ase1c` → `-c`, `-ase1` → (empty), `k8s-` → (empty) +4. Restore placeholders + +**Example:** `k8s-central-prd-ase1` → `central-prd` → Application name: `keda-central-prd` + +--- + +## YAML formatting + +- 2-space indentation (no tabs). +- No trailing whitespace. +- Single newline at end of file. +- Quote strings only when YAML requires it (e.g., empty strings `""`). +- Use block style for lists (one `- ` per line), not flow style. + +--- + +## Common mistakes + +| Mistake | Why it's wrong | Fix | +| ------- | -------------- | --- | +| Adding `nameOverride` without justification | Breaks naming consistency; see R7 | Remove unless name > 253 chars or collision | +| `chartDir` that doesn't exist in helm-charts | ArgoCD will fail to render the Application | Verify with `ls helm-templates//` | +| Duplicate `name` in same appSpec list | Two Applications will have the same name → conflict | Use unique tool names or `nameOverride` for multi-instance | +| Changing `targetRevision` away from env branch | All tools on the cluster pull from the wrong branch | Must match env: `main` (prd), `develop` (stg/dev), `pre-prod` (int) | diff --git a/docs/global/escalation-matrix.md b/docs/global/escalation-matrix.md new file mode 100644 index 0000000..f71d77c --- /dev/null +++ b/docs/global/escalation-matrix.md @@ -0,0 +1,60 @@ +# Escalation Matrix — `devops-infra-argo-config` + +> When an agent or human hits a boundary, blocker, or incident in this repo, use this matrix to determine who to contact and how fast. +> +> **Audience:** Agents (to know when to halt and hand off), on-call humans (to know who owns what). +> +> Per [AI Blitz Plan §5.2](AGENT_BOUNDARIES.md). Layer: **1-T**. + +--- + +## Escalation triggers + +| Situation | Urgency | Who | How | +| --------- | ------- | --- | --- | +| Agent would need to edit `repository.yaml` | Non-urgent | Platform team | Slack `#devops-tech` — this is automation-owned | +| Agent would need to push to `main`/`develop`/`pre-prod` directly | Non-urgent | Platform team | Open PR instead; if truly urgent, page on-call | +| `generic-argo-apps-chart/` change needed | Non-urgent | Platform team senior review | PR + explicit sign-off from two platform team members | +| Helm render failure after PR merge, tools broken | **Urgent** | On-call platform engineer | PagerDuty `Devops` + Slack `#devops-tech` | +| ArgoCD sync stuck on a cluster > 10 minutes | **Urgent** | On-call platform engineer | PagerDuty `Devops` + Slack `#devops-tech` | +| Accidental secret committed to git | **Critical** | Platform team lead + security | Slack `#devops-tech` immediately; do NOT merge; requires history purge | +| Incubator file deleted, cluster tooling orphaned | **Critical** | On-call platform engineer | PagerDuty `Devops` + Slack `#devops-tech` — restore file immediately | +| `clusterSpec.destination.name` changed to wrong cluster | **Critical** | On-call platform engineer | Revert PR immediately; tools may be deploying to wrong cluster | +| `teamSpec.source.repoURL` changed | **Critical** | On-call platform engineer | Revert PR immediately; all cluster tools affected | +| AppProject (`sre`/`sec`) modified | **Urgent** | Platform team + security | Security review required before merge | +| Pre-commit hooks consistently failing on valid YAML | Non-urgent | Platform team | Slack `#devops-tech` — may be hook version issue | +| Cluster decommission requested | Non-urgent | Platform team + cluster owner | Coordinated removal: incubator + values files + helm-overrides cleanup | + +--- + +## Urgency definitions + +| Level | Meaning | Response time | +| ----- | ------- | ------------- | +| **Critical** | Production tooling broken or security incident | Page immediately; respond in < 15 min | +| **Urgent** | Cluster sync stuck, tools not deploying | Page if outside business hours; Slack if in-hours; respond in < 1 hour | +| **Non-urgent** | Question, blocked agent, process clarification | Slack message; respond in same business day | + +--- + +## Contact channels + +| Channel | Purpose | +| ------- | ------- | +| Slack `#devops-tech` | Day-to-day questions, production incidents, and security-sensitive issues (secret exposure, AppProject changes) | +| PagerDuty `Devops` | On-call page for critical/urgent issues outside business hours | + +--- + +## Agent halt protocol + +When an agent reaches a Layer 3 boundary or an unresolvable blocker: + +1. **Stop** — do not attempt a workaround. +2. **State** what operation was attempted and why it's blocked (cite rule from [SANCTITY_RULES.md](SANCTITY_RULES.md) or [AGENT_BOUNDARIES.md](AGENT_BOUNDARIES.md)). +3. **Recommend** the correct human path (e.g., "Open a PR targeting platform team review" or "Page on-call via PagerDuty"). +4. **Do not retry** the blocked operation with slightly different parameters. + +Example halt message: + +> Blocked by R5 (SANCTITY_RULES.md): `repository.yaml` is owned by `registry-bootstrap` automation and must not be hand-edited. To change ownership metadata, the request must go to the upstream automation team via Slack `#devops-tech`. diff --git a/docs/platform/procedures/add-new-cluster.md b/docs/platform/procedures/add-new-cluster.md new file mode 100644 index 0000000..b2eaded --- /dev/null +++ b/docs/platform/procedures/add-new-cluster.md @@ -0,0 +1,168 @@ +# Procedure: Onboard a New Cluster + +> Step-by-step guide for adding a new Kubernetes cluster to the ArgoCD infrastructure GitOps control plane. +> +> **Layer:** 1-T (Tool-Mediated). Two files must be created: one incubator file and one values file. +> +> **Blast radius:** New cluster only. Existing clusters are unaffected. +> +> **Prerequisite:** The GKE cluster must already be provisioned via `terraform-google-modules` and registered as an ArgoCD cluster destination. + +--- + +## Inputs + +| Input | Example | Where it comes from | +| ----- | ------- | ------------------- | +| Cluster name | `k8s-dsgpu-prd-ase1` | GKE cluster provisioning (Terraform) | +| Environment | `prd` | Cluster naming convention | +| ArgoCD namespace | See table below | Depends on environment | +| Target branch | See table below | Depends on environment | +| Initial tools | `keda`, `contour`, `external-secrets`, etc. | Platform team decision | + +**Environment → branch / ArgoCD namespace mapping:** + +| Environment | Branch | ArgoCD namespace | Values dir | +| ----------- | ------ | ---------------- | ---------- | +| prd | `main` | `argocd-prd` | `values/prd/` | +| stg / dev | `develop` | `argocd-dev` | `values/dev/` | +| int | `pre-prod` | `argocd-shared-int` | `values/int/` | + +--- + +## Step 1: Create the incubator file + +Create `incubator//.yaml`: + +```yaml +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra- + namespace: # argocd-prd | argocd-dev | argocd-shared-int + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: # main (prd) | develop (stg/dev) | pre-prod (int) + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values//incubator-infra--values.yaml + destination: + name: in-cluster + namespace: # argocd-prd | argocd-dev | argocd-shared-int +``` + +**Key points:** +- `metadata.name`: `incubator-infra-` (matches the file name minus `.yaml`). +- `spec.project`: `default` (the incubator itself runs in the ArgoCD admin cluster). +- `spec.source.path`: Always `generic-argo-apps-chart`. +- `helm.valueFiles`: Relative path to the values file from the chart directory. +- `spec.destination.name`: `in-cluster` (the incubator runs on the ArgoCD admin cluster, not the target cluster). + +--- + +## Step 2: Create the values file + +Create `values//incubator-infra--values.yaml`: + +```yaml +clusterSpec: + destination: + server: "" + name: "" + +argocdSpec: + namespace: # argocd-prd | argocd-dev | argocd-shared-int + +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: # main (prd) | develop (stg/dev) | pre-prod (int) + path: helm-templates + valueFiles: ../../helm-overrides/ + labels: + bu: infra + team: devops + env: + cluster: + +appSpec: [] +``` + +Start with an empty `appSpec` list. Add tools in a follow-up PR after the cluster is bootstrapped. + +--- + +## Step 3: Register the cluster in the admin cluster's values file + +The admin cluster (`k8s-admin-prd-ase1`) may need an entry to reference the new cluster's ArgoCD Application. Check if the admin values file at `values/prd/incubator-infra-k8s-admin-prd-ase1-values.yaml` needs an `appSpec` entry for the new cluster's ArgoCD instance. + +--- + +## Step 4: Create external-name-service files (if zone-c) + +For multi-zone clusters (e.g., `-ase1c`), create: + +1. `external-name-service-incubator///external-name-service-incubator-.yaml` +2. Update external-name-service values for the zone if needed. + +--- + +## Step 5: Validate locally + +```bash +# Render the incubator Application +helm template generic-argo-apps-chart/ \ + -f values//incubator-infra--values.yaml + +# Verify YAML syntax +yamllint values//incubator-infra--values.yaml +yamllint incubator//incubator-infra-.yaml +``` + +--- + +## Step 6: Open PR + +- Both files (incubator + values) in the same PR. +- Target branch: matches environment — `main` (prd), `develop` (stg/dev), `pre-prod` (int). +- Required: Platform team review. + +--- + +## Step 7: Post-merge bootstrap (manual, platform team) + +After the PR merges: + +1. The incubator Application auto-syncs to the ArgoCD admin cluster. +2. ArgoCD reads the values file and renders child Applications (initially none if `appSpec` is empty). +3. Verify in ArgoCD UI that the incubator Application is healthy. +4. Add initial tools via [add-tool-to-cluster.md](add-tool-to-cluster.md). + +--- + +## Naming convention reference + +| Component | Convention | Example | +| --------- | ---------- | ------- | +| Incubator file | `incubator//incubator-infra-.yaml` | `incubator/prd/incubator-infra-k8s-dsgpu-prd-ase1.yaml` | +| Values file | `values//incubator-infra--values.yaml` | `values/prd/incubator-infra-k8s-dsgpu-prd-ase1-values.yaml` | +| Incubator Application name | `incubator-infra-` | `incubator-infra-k8s-dsgpu-prd-ase1` | + +--- + +## Checklist + +- [ ] GKE cluster is provisioned and registered in ArgoCD +- [ ] Incubator file created with correct name and paths +- [ ] Values file created with correct `clusterSpec.destination.name` +- [ ] `valueFiles` path in incubator points to correct values file +- [ ] `teamSpec.source.valueFiles` points to correct `helm-overrides/` directory +- [ ] Labels match the cluster name and environment +- [ ] Both files pass `yamllint` +- [ ] Pre-commit hooks pass diff --git a/docs/platform/procedures/add-tool-to-cluster.md b/docs/platform/procedures/add-tool-to-cluster.md new file mode 100644 index 0000000..39091fc --- /dev/null +++ b/docs/platform/procedures/add-tool-to-cluster.md @@ -0,0 +1,182 @@ +# Procedure: Add, Update, or Remove a Tool from a Cluster + +> Step-by-step guide for modifying `appSpec` entries in cluster values files. +> +> **Layer:** 1-T (Tool-Mediated). Use `argo-app-tool` where available; manual YAML edits acceptable with checklist. +> +> **Blast radius:** Single cluster, single tool. Auto-sync means changes deploy immediately after merge to the env branch (`main` for prd, `develop` for stg, `pre-prod` for int). + +--- + +## Prerequisites + +Before starting, confirm: + +1. The tool's **chart** exists in `devops-infra-helm-charts/helm-templates//` on the correct branch. +2. The tool's **values override** exists in `devops-infra-helm-charts/helm-overrides///custom-values.yaml` on the correct branch. +3. You know which **cluster** and **environment** the tool should deploy to. + +Both this repo and `devops-infra-helm-charts` use the same branch convention: + +| Environment | Branch | +| ----------- | ------ | +| Production (prd) | `main` | +| Staging (stg) | `develop` | +| Integration (int) | `pre-prod` | + +If either the chart or override doesn't exist on the target branch, the work starts in `devops-infra-helm-charts` first. See [devops-infra-helm-charts procedures](https://github.com/Meesho/devops-infra-helm-charts). + +--- + +## Add a new tool + +### Step 1: Identify the target values file + +```text +values//incubator-infra--values.yaml +``` + +Example: `values/prd/incubator-infra-k8s-central-prd-ase1-values.yaml` + +### Step 2: Verify chart and values exist in the sister repo + +```bash +# Chart directory +ls /path/to/devops-infra-helm-charts/helm-templates// + +# Values override +ls /path/to/devops-infra-helm-charts/helm-overrides///custom-values.yaml +``` + +If either is missing, stop. Create them in `devops-infra-helm-charts` first. + +### Step 3: Compute the auto-generated Application name + +Apply the munging rules from [coding-guidelines/infra-argo.md](../global/coding-guidelines/infra-argo.md): + +```text +-- +``` + +Example: `kyverno` on `k8s-farmiso-prd-ase1` → `kyverno-farmiso-prd` + +Verify: +- Name is <= 253 characters. +- Name doesn't collide with an existing Application (grep the values file). + +### Step 4: Add the appSpec entry + +Append to the `appSpec` list in the values file: + +```yaml + - name: kyverno + namespace: kyverno-farmiso-prd + chartDir: kyverno + valuesDir: kyverno +``` + +Only add `nameOverride` if Step 3 revealed a collision or length issue. + +Only add `additionalValueFiles` if the tool requires region-shared overlays. + +### Step 5: Validate locally + +```bash +# Render the generic chart with the updated values +helm template generic-argo-apps-chart/ \ + -f values/prd/incubator-infra--values.yaml | grep -A 20 "name: kyverno" + +# Verify no YAML syntax errors +yamllint values/prd/incubator-infra--values.yaml +``` + +### Step 6: Open PR + +- Target branch: `main` (prd) / `develop` (stg) / `pre-prod` (int) +- Required: Platform team review +- Pre-commit hooks must pass (TruffleHog, CAC, Yaak) + +### Step 7: After merge + +ArgoCD auto-syncs from the env branch. The new Application will appear in ArgoCD within minutes. Verify in the ArgoCD UI that: +- The Application is created with the expected name. +- It syncs successfully. +- The target namespace is created. + +--- + +## Update an existing tool + +### Change chart version + +Update `chartDir` to point to the new chart directory: + +```yaml + - name: contour-internal-0 + chartDir: contour-v1.33.3 # was: contour +``` + +Verify the new `chartDir` exists in `helm-templates/`. + +### Change values directory + +Update `valuesDir`: + +```yaml + - name: vmagent + valuesDir: victoria-metrics-agent-new # was: victoria-metrics-agent +``` + +Verify the new `valuesDir` exists in `helm-overrides//`. + +### Change namespace + +Update `namespace`. This is a destructive operation — ArgoCD will create the new namespace and deploy there, but the old namespace's resources are **not automatically cleaned up**. + +```yaml + - name: ai-gateway + namespace: ai-gateway-prd # was: ai-gateway +``` + +After merge, manually clean up the old namespace if no other tools use it. + +--- + +## Remove a tool from a cluster + +### Step 1: Delete the appSpec entry + +Remove the entire `- name: ...` block from the values file. + +### Step 2: Verify no other entries depend on it + +Check if any other appSpec entries reference the same namespace or have dependencies on this tool. + +### Step 3: Open PR + +After merge, the ArgoCD Application will be deleted by the finalizer (`resources-finalizer.argocd.argoproj.io`), which will also clean up the deployed resources. + +**Warning:** If the Application has `CreateNamespace=true` in syncOptions and the namespace is shared with other tools, removing the Application will NOT delete the namespace. Namespace cleanup is manual. + +--- + +## Multi-cluster rollout + +When adding a tool to multiple clusters: + +1. Add the appSpec entry to each cluster's values file in the **same PR**. +2. Verify chart/values exist for **each** cluster — valuesDir names may differ per cluster. +3. Each cluster should have its own override directory in `devops-infra-helm-charts/helm-overrides///`. + +--- + +## Checklist + +- [ ] `chartDir` exists in `devops-infra-helm-charts/helm-templates/` +- [ ] `valuesDir` exists in `devops-infra-helm-charts/helm-overrides//` +- [ ] Auto-generated Application name <= 253 characters +- [ ] No name collision with existing appSpec entries +- [ ] `nameOverride` used only if justified +- [ ] `helm template` renders without errors +- [ ] `yamllint` passes +- [ ] Pre-commit hooks pass diff --git a/docs/platform/procedures/deboard-tool-from-cluster.md b/docs/platform/procedures/deboard-tool-from-cluster.md new file mode 100644 index 0000000..414af06 --- /dev/null +++ b/docs/platform/procedures/deboard-tool-from-cluster.md @@ -0,0 +1,118 @@ +# Procedure: Deboard a Tool from a Cluster + +> Step-by-step guide for safely removing an `appSpec` entry from a cluster values file. +> +> **Layer:** 1-T (Tool-Mediated). Agent generates the diff and opens a PR. +> +> **Blast radius:** Single cluster. After merge, ArgoCD deletes the Application and its resources via finalizer. +> +> Per AI Blitz Plan §5.2. + +--- + +## Warning: deletion is destructive + +Removing an `appSpec` entry causes ArgoCD to delete the child Application, which triggers the `resources-finalizer.argocd.argoproj.io` to **delete all Kubernetes resources** the Application manages. This includes Deployments, Services, ConfigMaps, PVCs, and the namespace (if `CreateNamespace=true` and the namespace is not shared). + +**Confirm with the tool owner before proceeding.** + +--- + +## Prerequisites + +1. Confirm the tool is no longer needed on this cluster. +2. Confirm no other system depends on the tool's namespace (e.g., shared `victoriametrics` namespace — removing one app doesn't remove the namespace, but verify). +3. If the tool has persistent storage (PVC), confirm data can be discarded or has been backed up. + +--- + +## Steps + +### Step 1: Find the appSpec entry + +```bash +grep -n -A 5 'name: ' values//incubator-infra--values.yaml +``` + +Record the line numbers of the entire entry block. + +### Step 2: Check for namespace sharing + +```bash +# Does any other appSpec entry use the same namespace? +grep 'namespace: ' values//incubator-infra--values.yaml +``` + +If another entry shares the namespace, removing this entry will NOT delete the namespace — only the Application's resources. This is usually safe, but confirm. + +### Step 3: Compute the Application name that will be deleted + +```text +-- +``` + +Use this to verify the Application in ArgoCD before the PR merges. + +### Step 4: Remove the appSpec entry + +Delete the entire entry block from the values file: + +```yaml +# Remove this block entirely: + - name: + namespace: + chartDir: + valuesDir: +``` + +Do not leave empty lines or dangling list markers. + +### Step 5: Validate + +```bash +helm template generic-argo-apps-chart/ \ + -f values//incubator-infra--values.yaml + +yamllint values//incubator-infra--values.yaml +``` + +Confirm the removed Application no longer appears in the rendered output. + +### Step 6: Open PR + +- Title: `deboard from ` +- PR body must include: what the tool was doing, why it's being removed, who confirmed the removal, and namespace cleanup plan. +- Required: Platform team review + tool owner acknowledgment + +### Step 7: Post-merge cleanup + +After merge and ArgoCD sync completes: + +1. Verify in ArgoCD that the Application has been deleted. +2. Verify the namespace is gone (or still exists if shared — expected). +3. If `custom-values.yaml` in `devops-infra-helm-charts` is no longer needed, clean it up in a separate PR. + +--- + +## Special case: decommissioning a cluster + +If you are removing **all** tools from a cluster as part of cluster decommission: + +1. Do **not** delete the incubator file in this PR — that is a separate step requiring confirmation. +2. First empty the `appSpec` list: `appSpec: []` +3. After all tools are confirmed deleted, open a second PR to delete the incubator and values files. + +See escalation matrix: [docs/global/escalation-matrix.md](../../global/escalation-matrix.md) — cluster decommission requires coordinated sign-off. + +--- + +## Checklist + +- [ ] Tool owner confirmed removal +- [ ] Namespace sharing checked — no unintended namespace deletion +- [ ] Persistent storage impact assessed +- [ ] Application name identified for post-merge verification +- [ ] `helm template` renders without errors +- [ ] `yamllint` passes +- [ ] Pre-commit hooks pass +- [ ] PR body includes removal rationale and namespace cleanup plan diff --git a/docs/platform/procedures/fleet-wide-tool-rollout.md b/docs/platform/procedures/fleet-wide-tool-rollout.md new file mode 100644 index 0000000..d9635b5 --- /dev/null +++ b/docs/platform/procedures/fleet-wide-tool-rollout.md @@ -0,0 +1,126 @@ +# Procedure: Fleet-Wide Tool Rollout + +> Step-by-step guide for adding a new tool to multiple clusters in a single PR. +> +> **Layer:** 1-T (Tool-Mediated). Agent generates the diff and opens a PR. +> +> **Blast radius:** ALL targeted clusters simultaneously. Auto-sync means all clusters deploy on merge. +> +> Per AI Blitz Plan §5.2. Skill: [skills/infra/fleet-wide-rollout.md](../../../skills/infra/fleet-wide-rollout.md). + +--- + +## When to use this procedure + +- Adding an observability tool (e.g., Coroot, Pyroscope) to a set of clusters +- Rolling out a security policy tool (e.g., Kyverno) fleet-wide +- Deploying a new mandatory platform component across all production clusters + +--- + +## Prerequisites + +Before touching any values file: + +1. **Chart exists** in `devops-infra-helm-charts/helm-templates//`. +2. **Override values exist** for EACH target cluster: `devops-infra-helm-charts/helm-overrides///custom-values.yaml`. ValuesDir names may differ per cluster — verify each one. +3. Decide whether this is a **full fleet** rollout or **subset** (specific envs, BUs, or roles). + +If any chart or override is missing, stop. Create them in `devops-infra-helm-charts` first. + +--- + +## Steps + +### Step 1: Identify target clusters + +List all values files for the target env: + +```bash +ls values/prd/ +ls values/int/ +``` + +Filter to the clusters you need. Common subsets: + +| Subset | Description | +| ------ | ----------- | +| All prd | All files in `values/prd/` | +| Data clusters | `datascience`, `dataengg`, `dengspark`, `dscispark`, `dsgpu` | +| App clusters | `demand`, `supply`, `farmiso`, `central` | +| Admin cluster | `admin-prd`, `devops-admin`, `sec-admin` | + +### Step 2: Verify override exists for each cluster + +```bash +for cluster in ; do + echo -n "$cluster: " + ls /path/to/devops-infra-helm-charts/helm-overrides/$cluster//custom-values.yaml \ + && echo "ok" || echo "MISSING" +done +``` + +**Halt** if any cluster is missing its override. The override must be added to `devops-infra-helm-charts` first. Only proceed when all clusters are covered. + +### Step 3: Compute Application names for all clusters + +For each target cluster, compute `--`. Verify no name collisions with existing entries. + +### Step 4: Add appSpec entries to all target values files + +For each cluster values file, append: + +```yaml + - name: + namespace: + chartDir: + valuesDir: +``` + +The `valuesDir` value may differ per cluster if override directories are cluster-named. + +### Step 5: Validate each cluster + +```bash +for f in values/prd/incubator-infra-k8s--prd-ase1-values.yaml; do + echo "=== $f ===" + helm template generic-argo-apps-chart/ -f "$f" | grep -c "kind: Application" + yamllint "$f" +done +``` + +All files must render cleanly. + +### Step 6: Open PR + +- Title: `onboard to [all prd clusters | ]` +- PR body must include: + - Complete list of modified clusters + - The `chartDir` and `valuesDir` used + - Link to the `devops-infra-helm-charts` PR that added the chart/overrides (if applicable) + - Confirmation that all override directories exist +- Required: Platform team review + +--- + +## Staged rollout alternative + +If you want cluster-by-cluster rollout (to catch issues early): + +1. Start with one low-risk cluster (e.g., `k8s-datascience-prd-ase1`). +2. Open PR 1, merge, verify in ArgoCD. +3. Open PR 2 with the remaining clusters. + +Staged rollout requires multiple PRs and more human attention but reduces blast radius per deploy. + +--- + +## Checklist + +- [ ] Chart exists in `devops-infra-helm-charts/helm-templates/` +- [ ] Override exists for EVERY target cluster in `devops-infra-helm-charts/helm-overrides//` +- [ ] All Application names computed and verified no collisions +- [ ] `helm template` passes for every modified values file +- [ ] `yamllint` passes for every modified values file +- [ ] PR body lists all modified clusters +- [ ] Pre-commit hooks pass diff --git a/docs/platform/procedures/upgrade-chart-version.md b/docs/platform/procedures/upgrade-chart-version.md new file mode 100644 index 0000000..893450f --- /dev/null +++ b/docs/platform/procedures/upgrade-chart-version.md @@ -0,0 +1,123 @@ +# Procedure: Upgrade a Chart Version + +> Step-by-step guide for changing the `chartDir` of an `appSpec` entry to reference a new chart version. +> +> **Layer:** 1-T (Tool-Mediated). Agent generates the diff and opens a PR. +> +> **Blast radius:** Single cluster (if one values file) or fleet-wide (if multiple clusters). Auto-sync means changes deploy immediately after merge to the env branch (`main` for prd, `develop` for stg, `pre-prod` for int). +> +> Per AI Blitz Plan §5.2. Skill: [skills/infra/upgrade-chart-version.md](../../../skills/infra/upgrade-chart-version.md). + +--- + +## When to use this procedure + +- Upgrading a tool to a new version by switching `chartDir` (e.g., `contour` → `contour-v1.33.3`) +- Pinning a tool back to a previous chart directory +- Upgrading a tool across multiple clusters as part of a coordinated rollout + +**Do not** use this procedure to change `teamSpec.source.targetRevision` — that's a HIGH RISK operation requiring explicit platform-team sign-off. + +--- + +## Prerequisites + +1. The **new chart directory** exists in `devops-infra-helm-charts/helm-templates//`. +2. The **override values** for the new chart version are compatible — check `devops-infra-helm-charts/helm-overrides///custom-values.yaml` for any new required fields. +3. You know which clusters need upgrading. + +--- + +## Single-cluster upgrade + +### Step 1: Identify the target appSpec entry + +Find the tool in the cluster's values file: + +```bash +grep -A 4 'name: ' values//incubator-infra--values.yaml +``` + +Note the current `chartDir`. + +### Step 2: Verify the new chart directory exists + +```bash +ls /path/to/devops-infra-helm-charts/helm-templates// +``` + +**Halt** if missing — the chart must be added to `devops-infra-helm-charts` first. + +### Step 3: Check override compatibility + +```bash +# Review the custom-values.yaml for any changed keys in the new chart +cat /path/to/devops-infra-helm-charts/helm-overrides///custom-values.yaml +``` + +If the new chart has breaking changes (renamed keys, removed defaults), the `custom-values.yaml` in `devops-infra-helm-charts` must be updated first — that is a separate PR in the sister repo. + +### Step 4: Update the `chartDir` + +Change the `chartDir` field in the values file: + +```yaml +# Before: + - name: contour-internal-0 + chartDir: contour + valuesDir: contour-internal + +# After: + - name: contour-internal-0 + chartDir: contour-v1.33.3 + valuesDir: contour-internal +``` + +Do not change `name`, `namespace`, or `valuesDir` unless the upgrade specifically requires it. + +### Step 5: Validate + +```bash +helm template generic-argo-apps-chart/ \ + -f values//incubator-infra--values.yaml \ + | grep -B 2 -A 30 "name: " + +yamllint values//incubator-infra--values.yaml +``` + +Verify the rendered Application points to the new chart path. + +### Step 6: Open PR + +- Title: `upgrade to on ` +- Required: Platform team review +- Pre-commit hooks must pass + +--- + +## Multi-cluster upgrade + +When upgrading the same tool across multiple clusters: + +1. Update `chartDir` in **all affected values files in the same PR**. +2. Validate each cluster's values file independently with `helm template`. +3. Title: `upgrade to across [list of clusters or "all prd clusters"]` + +**Ordering note:** ArgoCD auto-syncs all clusters on merge. There is no cluster-by-cluster rollout order. If you need a staged rollout (one cluster at a time), open separate PRs. + +--- + +## Rollback + +If the upgrade causes issues, create a revert PR changing `chartDir` back to the previous value. Do not force-push. + +--- + +## Checklist + +- [ ] New `chartDir` exists in `devops-infra-helm-charts/helm-templates/` +- [ ] `custom-values.yaml` is compatible with the new chart version +- [ ] `helm template` renders without errors for each updated cluster +- [ ] `yamllint` passes +- [ ] Pre-commit hooks pass +- [ ] For multi-cluster: all clusters validated before PR opens diff --git a/docs/platform/runbooks/argocd-sync-failure.md b/docs/platform/runbooks/argocd-sync-failure.md new file mode 100644 index 0000000..08ae463 --- /dev/null +++ b/docs/platform/runbooks/argocd-sync-failure.md @@ -0,0 +1,170 @@ +# Runbook: ArgoCD Infra App Sync Failure + +> Decision tree for diagnosing and resolving sync failures on infrastructure tool Applications managed by this repo. +> +> **Audience:** Platform engineers, on-call SREs, and agents in advisory mode (Layer 2). +> +> **Key context:** Infra apps auto-sync from `main`. A sync failure means either a bad merge or an external cluster issue. + +--- + +## Triage — is it this repo's fault? + +``` +Sync failure observed +│ +├─ Is the Application in "Unknown" or "Missing" state? +│ └─ YES → The incubator file may be missing or malformed. +│ Check: incubator//.yaml exists and is valid YAML. +│ Check: The incubator Application itself is healthy in the admin cluster. +│ +├─ Is the error "helm template failed" or "render error"? +│ └─ YES → Chart or values problem. Go to Section 1. +│ +├─ Is the error "namespace not found" or "destination not found"? +│ └─ YES → Cluster routing problem. Go to Section 2. +│ +├─ Is the error "ComparisonError" or "already exists"? +│ └─ YES → Name collision. Go to Section 3. +│ +└─ Is the error a Kubernetes API error (forbidden, quota, etc.)? + └─ YES → Cluster-side issue. Go to Section 4. +``` + +--- + +## Section 1: Helm render failure + +**Symptom:** ArgoCD shows "helm template failed" or similar render error. + +**Diagnosis:** + +```bash +# Reproduce locally +helm template generic-argo-apps-chart/ \ + -f values//-values.yaml + +# Check for YAML syntax errors +yamllint values//-values.yaml +``` + +**Common causes:** + +| Cause | Fix | +| ----- | --- | +| `chartDir` doesn't exist in `devops-infra-helm-charts/helm-templates/` | Create the chart directory in the sister repo, or fix the `chartDir` value | +| `valuesDir` doesn't exist in `devops-infra-helm-charts/helm-overrides//` | Create the values override, or fix the `valuesDir` value | +| YAML syntax error in values file | Fix the YAML (missing colon, bad indentation, etc.) | +| `additionalValueFiles` path doesn't exist | Fix the path or remove the entry | +| Helm chart has a breaking change | Check recent commits in `devops-infra-helm-charts` | + +--- + +## Section 2: Cluster routing / namespace issue + +**Symptom:** "destination cluster not found" or "namespace not found." + +**Diagnosis:** + +```bash +# Check the cluster name in the values file +grep -A2 "clusterSpec:" values//-values.yaml + +# Verify the cluster is registered in ArgoCD +argocd cluster list | grep +``` + +**Common causes:** + +| Cause | Fix | +| ----- | --- | +| `clusterSpec.destination.name` doesn't match GKE cluster name | Fix the name in the values file | +| Cluster was recently provisioned but not yet registered in ArgoCD | Register the cluster via ArgoCD CLI or Terraform | +| Cluster was decommissioned | Remove the incubator + values files | + +--- + +## Section 3: Application name collision + +**Symptom:** "already exists" or "ComparisonError" for an Application. + +**Diagnosis:** + +```bash +# Check for duplicate names in the values file +grep '^\s*- name:' values//-values.yaml | sort | uniq -d + +# Check for nameOverride collisions +grep 'nameOverride:' values//-values.yaml +``` + +**Common causes:** + +| Cause | Fix | +| ----- | --- | +| Two appSpec entries have the same `name` | Rename one or add `nameOverride` | +| An Application with the same name exists from a different source | Use `nameOverride` to disambiguate | +| Name was changed but old Application wasn't cleaned up | Delete the orphaned Application via ArgoCD CLI | + +--- + +## Section 4: Cluster-side issue + +**Symptom:** Kubernetes API errors — forbidden, quota exceeded, node selector mismatch, etc. + +**Diagnosis:** This is not a repo-side issue. The chart and values are correct, but the cluster can't fulfill the request. + +**Common causes:** + +| Cause | Fix | +| ----- | --- | +| Namespace quota exceeded | Request quota increase or reduce resource requests | +| Node selector doesn't match any node | Verify nodepool configuration in Terraform | +| RBAC / service account permissions | Check the AppProject scope and cluster RBAC | +| CRDs not installed | Install required CRDs before deploying the tool | + +--- + +## Section 5: Tool deployed to wrong cluster or namespace + +**Symptom:** A tool appears in an unexpected cluster or namespace. + +**Diagnosis:** + +```bash +# Check where the tool is configured +grep -rl 'name: ' values/ + +# Verify the values file's cluster destination +grep -A2 "clusterSpec:" values//-values.yaml + +# Verify the namespace in the appSpec entry +grep -A4 'name: ' values//-values.yaml +``` + +**Common causes:** + +| Cause | Fix | +| ----- | --- | +| appSpec entry added to wrong values file | Move to correct cluster's values file | +| `clusterSpec.destination.name` is wrong | Fix the cluster name | +| Namespace typo | Fix the `namespace` field in the appSpec entry | + +--- + +## Emergency: revert a bad merge + +If a bad merge causes widespread sync failures: + +1. **Do NOT force-push to `main`.** This violates R1 and R11. +2. Open a revert PR: `git revert && git push origin revert-branch` +3. Get expedited platform-team review and merge the revert. +4. Auto-sync will pick up the revert within minutes. + +--- + +## Escalation + +If the above doesn't resolve the issue: +- **Platform team Slack:** Post in `#devops-tech` with the Application name, cluster, and error message. +- **ArgoCD admin UI:** Access via the admin cluster to inspect Application state directly. diff --git a/docs/platform/runbooks/deployment-stuck.md b/docs/platform/runbooks/deployment-stuck.md new file mode 100644 index 0000000..7022c61 --- /dev/null +++ b/docs/platform/runbooks/deployment-stuck.md @@ -0,0 +1,138 @@ +# Runbook: Deployment Stuck After Sync + +> Symptom → diagnosis → remediation for tools that ArgoCD reports as `Synced` but whose Kubernetes resources are not healthy. +> +> **Layer:** 2 (Advisory). Agents diagnose and suggest; humans execute kubectl/ArgoCD commands. +> +> Per AI Blitz Plan §5.2. See also: [argocd-sync-failure.md](argocd-sync-failure.md) (for sync errors), [render-failure.md](render-failure.md) (for Helm render errors). + +--- + +## Symptoms + +- ArgoCD Application shows `Synced` but `Degraded` or `Unknown` health +- Pods are in `Pending`, `CrashLoopBackOff`, `ImagePullBackOff`, or `OOMKilled` +- Tool was working before a chart upgrade or values change +- Application is `Synced + Healthy` but the tool isn't functioning as expected + +--- + +## Decision tree + +```text +Application shows Synced but Degraded? + │ + ├── Check pod status in the tool's namespace: + │ kubectl get pods -n --context= + │ + ├── Pod status is Pending? + │ └── → [A] Resource constraints or node issues + │ + ├── Pod status is CrashLoopBackOff? + │ └── → [B] Application crash — check logs + │ + ├── Pod status is ImagePullBackOff or ErrImagePull? + │ └── → [C] Image registry issue + │ + ├── Pod status is OOMKilled? + │ └── → [D] Memory limit too low + │ + ├── Pod runs but tool is unhealthy? + │ └── → [E] Config or connectivity issue + │ + └── Pods are fine but ArgoCD shows Degraded? + └── → [F] Health check misconfiguration +``` + +--- + +## [A] Pod Pending + +**Diagnosis:** +```bash +kubectl describe pod -n --context= | grep -A 20 Events +``` + +Common causes and fixes: + +| Event message | Cause | Fix | +| ------------- | ----- | --- | +| `Insufficient cpu/memory` | Node resource exhaustion | Check node capacity; may need to adjust resource requests in `custom-values.yaml` (change in `devops-infra-helm-charts`) | +| `did not match node affinity` | Node selector or affinity mismatch | Review `nodeSelector`/`affinity` in `custom-values.yaml` | +| `PersistentVolumeClaim not bound` | PVC not provisioned | Check storage class and PVC events | +| `Unschedulable` | No nodes available | Check if cluster has sufficient nodes or if Karpenter/cluster-autoscaler is stuck | + +--- + +## [B] CrashLoopBackOff + +**Diagnosis:** +```bash +kubectl logs -n --context= --previous +``` + +Look for startup errors, missing config, failed connections. The fix usually requires changing `custom-values.yaml` in `devops-infra-helm-charts` — that's a separate PR in the sister repo. + +--- + +## [C] ImagePullBackOff + +**Diagnosis:** +```bash +kubectl describe pod -n --context= | grep image +``` + +Common causes: +- Image tag doesn't exist (bad chart version pin) +- Image registry credentials expired (check `external-secrets` or `imagePullSecrets`) +- Private registry unreachable from the cluster + +Fix depends on root cause. Usually requires a chart fix in `devops-infra-helm-charts` or a credential rotation. + +--- + +## [D] OOMKilled + +**Diagnosis:** +```bash +kubectl top pod -n --context= +kubectl describe pod -n --context= | grep -A 5 "Last State" +``` + +Fix: Increase `resources.limits.memory` in `custom-values.yaml` in `devops-infra-helm-charts`. Open PR there. + +--- + +## [E] Config or Connectivity Issue + +Tool is running but not working correctly. + +**Diagnosis:** Check tool-specific logs. Most infra tools write structured logs. + +Common causes: +- Wrong endpoint URL in `custom-values.yaml` +- Service dependency not available (e.g., Vault unreachable for external-secrets) +- Wrong namespace for a referenced service + +Fix: Update `custom-values.yaml` in `devops-infra-helm-charts`. + +--- + +## [F] ArgoCD Health Check Misconfiguration + +ArgoCD uses health checks to determine if an Application is healthy. Some custom resources have incorrect or missing health checks. + +**Diagnosis:** +```bash +argocd app get --show-operation | grep -A 10 "Health Status" +``` + +If resources are actually healthy but ArgoCD says Degraded, this may be a health check definition issue in the ArgoCD config itself (not this repo). + +Escalate to platform team via [escalation-matrix.md](../../global/escalation-matrix.md). + +--- + +## Escalation + +If diagnosis points to a cluster-level issue (node pressure, networking, GKE problem) rather than a configuration issue, escalate via [escalation-matrix.md](../../global/escalation-matrix.md). diff --git a/docs/platform/runbooks/render-failure.md b/docs/platform/runbooks/render-failure.md new file mode 100644 index 0000000..ddc0bed --- /dev/null +++ b/docs/platform/runbooks/render-failure.md @@ -0,0 +1,133 @@ +# Runbook: Helm Render Failure + +> Symptom → diagnosis → remediation for ArgoCD Applications stuck in `ComparisonError` or `ErrParsingAppProject` state due to Helm template rendering failures. +> +> **Layer:** 2 (Advisory). Agents diagnose and suggest fixes; humans apply. +> +> Per AI Blitz Plan §5.2. See also: [argocd-sync-failure.md](argocd-sync-failure.md). + +--- + +## Symptoms + +- ArgoCD Application shows `ComparisonError: failed to generate manifest` +- `helm template` run locally produces YAML errors +- Application stuck in `Unknown` or `Error` health state with no sync progress +- Pre-commit hook `cac validate` fails on a PR with YAML parsing errors + +--- + +## Decision tree + +```text +Application stuck in ComparisonError? + │ + ├── Run: argocd app get --show-operation + │ (or: argocd app logs ) + │ + ├── Error contains "values file not found"? + │ └── → [A] Missing values file + │ + ├── Error contains "chart not found" or "no chart found"? + │ └── → [B] Missing chart directory + │ + ├── Error contains "unmarshal" or "cannot unmarshal" or "yaml: line"? + │ └── → [C] YAML syntax error in values or chart + │ + ├── Error contains "template: ... nil pointer" or "function not defined"? + │ └── → [D] Chart template bug + │ + └── Error contains "AppProject not found" or "unauthorized"? + └── → See argocd-sync-failure.md +``` + +--- + +## [A] Missing values file + +**Cause:** The `valueFiles` path in the incubator Application YAML points to a values file that doesn't exist. + +**Diagnosis:** +```bash +# Check what valueFiles the incubator references: +grep 'valueFiles' incubator//.yaml + +# Verify the values file exists: +ls values//incubator-infra--values.yaml +``` + +**Fix:** Create the missing values file (use [add-new-cluster.md](../procedures/add-new-cluster.md) for a new cluster) or correct the path in the incubator YAML. Open a PR. + +--- + +## [B] Missing chart directory + +**Cause:** An `appSpec[].chartDir` value points to a directory that doesn't exist in `devops-infra-helm-charts/helm-templates/`. + +**Diagnosis:** +```bash +# Identify which appSpec entry has the bad chartDir: +helm template generic-argo-apps-chart/ -f values//-values.yaml 2>&1 | head -30 + +# Verify in helm-charts repo: +ls /path/to/devops-infra-helm-charts/helm-templates// +``` + +**Fix:** Either: +1. Add the chart to `devops-infra-helm-charts` (work in the sister repo). +2. Correct the `chartDir` in the values file to an existing directory. + +Open a PR with the fix. + +--- + +## [C] YAML syntax error + +**Cause:** Invalid YAML in a values file (e.g., bad indentation, missing quotes, stray character). + +**Diagnosis:** +```bash +yamllint values//-values.yaml + +# Or for more context: +python3 -c "import yaml; yaml.safe_load(open('values//-values.yaml'))" +``` + +**Common causes:** +- Stray tab character (YAML requires spaces) +- Missing `- ` prefix on an appSpec entry +- Unquoted special characters in namespace or name fields +- Trailing whitespace after a value + +**Fix:** Correct the YAML syntax. Run `yamllint` and `helm template` locally before opening PR. Pre-commit `cac validate` hook should also catch this. + +--- + +## [D] Chart template bug + +**Cause:** The `generic-argo-apps-chart/templates/genericTemplate.yaml` has a nil pointer dereference, undefined function, or logic error. + +**Diagnosis:** +```bash +helm template generic-argo-apps-chart/ -f values//-values.yaml 2>&1 +``` + +**Impact:** This breaks ALL Applications rendered by this chart, across ALL clusters. This is a fleet-wide outage risk. + +**Fix:** This requires a fix to `generic-argo-apps-chart/`. This is a **HIGH RISK** operation — see [AGENT_BOUNDARIES.md](../../global/AGENT_BOUNDARIES.md). Escalate to platform team immediately via [escalation-matrix.md](../../global/escalation-matrix.md). + +Do not attempt to fix chart templates without explicit platform-team sign-off and test with `helm template` against multiple values files. + +--- + +## Preventive checks + +Run before any PR that modifies values files or `generic-argo-apps-chart/`: + +```bash +# Test all values files in one env: +for f in values/prd/*.yaml; do + helm template generic-argo-apps-chart/ -f "$f" > /dev/null \ + && echo "OK: $f" || echo "FAIL: $f" +done +``` diff --git a/docs/platform/runbooks/values-drift.md b/docs/platform/runbooks/values-drift.md new file mode 100644 index 0000000..401e270 --- /dev/null +++ b/docs/platform/runbooks/values-drift.md @@ -0,0 +1,116 @@ +# Runbook: Values Drift + +> Symptom → diagnosis → remediation for inconsistent `appSpec` entries across cluster values files — same tool, different `chartDir`, `namespace`, or field values across clusters. +> +> **Layer:** 2 (Advisory). Agents diagnose and report; humans decide whether to remediate. +> +> Per AI Blitz Plan §5.2. + +--- + +## Symptoms + +- A tool behaves differently on two clusters that should be equivalent +- A chart version upgrade was applied to some clusters but not others +- `grep` across values files shows the same tool with different `chartDir` or `namespace` +- After a fleet-wide rollout, one cluster was accidentally skipped + +--- + +## Detection + +### Find clusters where a tool exists + +```bash +grep -rl 'name: ' values/prd/ +``` + +### Find the chartDir each cluster uses for a tool + +```bash +grep -A 4 'name: ' values/prd/*.yaml | grep 'chartDir' +``` + +### Compare a specific tool across all prd clusters + +```bash +# Show full appSpec entry for the tool on every cluster that has it: +for f in values/prd/*.yaml; do + entry=$(grep -A 5 "^\s*- name: $" "$f" 2>/dev/null) + if [ -n "$entry" ]; then + echo "=== $f ===" + echo "$entry" + fi +done +``` + +### Find clusters missing a tool that should be present + +```bash +# List all prd values files: +all=$(ls values/prd/) +# List files that have the tool: +have=$(grep -rl 'name: ' values/prd/ | xargs -I{} basename {}) +# Diff: +diff <(echo "$all") <(echo "$have") +``` + +--- + +## Interpreting drift + +Not all drift is wrong. Some clusters legitimately have different configurations: + +| Type of drift | Usually OK? | Action | +| ------------- | ----------- | ------ | +| Different `chartDir` (different version) | Only if intentional | Align versions unless the divergence is intentional (e.g., staged rollout in progress) | +| Different `namespace` | Rarely OK | Investigate — namespace change is destructive | +| Tool absent from a cluster | Depends | Confirm whether the cluster should have the tool | +| Different `valuesDir` | Sometimes OK | Clusters can have cluster-specific overrides; confirm the override exists | +| Different `nameOverride` | Rarely OK | Should only exist for collision/length reasons | + +--- + +## Remediation + +### Align chart versions across clusters + +If a tool is on different versions and should be uniform, follow [upgrade-chart-version.md](../procedures/upgrade-chart-version.md) for the lagging clusters. + +### Add a missing tool to a cluster + +Follow [add-tool-to-cluster.md](../procedures/add-tool-to-cluster.md). + +### Document intentional drift + +If the divergence is intentional (e.g., Cluster A has a special `valuesDir` for a regional override), add a comment to the values file entry: + +```yaml + - name: coredns + namespace: kube-system + chartDir: coredns + valuesDir: coredns-special-region # Intentional: this cluster uses a non-standard DNS config + additionalValueFiles: + - ../../helm-templates/coredns/gcp-ase1a-values.yaml +``` + +--- + +## Periodic drift check + +Run this to generate a drift report across all prd clusters for a tool: + +```bash +echo "Tool: " && echo "---" +for f in values/prd/*.yaml; do + cluster=$(basename "$f" -values.yaml) + entry=$(grep -A 5 "^\s*- name: $" "$f" 2>/dev/null) + if [ -n "$entry" ]; then + chartDir=$(echo "$entry" | grep 'chartDir' | awk '{print $2}') + namespace=$(echo "$entry" | grep 'namespace' | awk '{print $2}') + echo "$cluster: chartDir=$chartDir namespace=$namespace" + else + echo "$cluster: ABSENT" + fi +done +``` diff --git a/docs/platform/schemas/incubator-values-schema.md b/docs/platform/schemas/incubator-values-schema.md new file mode 100644 index 0000000..92e2458 --- /dev/null +++ b/docs/platform/schemas/incubator-values-schema.md @@ -0,0 +1,119 @@ +# Incubator Application YAML Schema + +> Field-by-field documentation of the incubator Application YAML files. +> +> **File location:** Varies by env/branch: +> - prd (`main`): `incubator/prd/incubator-infra-.yaml` +> - stg/dev (`develop`): `incubator/infra/incubator-infra-.yaml` (or `incubator/apps/incubator-apps-.yaml` for app workloads) +> - int (`pre-prod`): no incubator file — values only in `values/int/` +> - admin: `incubator/admin/incubator-infra-.yaml` +> +> **Purpose:** Each incubator file is a single ArgoCD `Application` that acts as the **parent** in the App-of-Applications pattern. It points at `generic-argo-apps-chart/` and its corresponding values file. ArgoCD renders the generic chart to produce one child Application per `appSpec` entry. + +--- + +## Full example + +```yaml +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-k8s-central-prd-ase1 + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main # prd=main, stg=develop, int=pre-prod + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values/prd/incubator-infra-k8s-central-prd-ase1-values.yaml + destination: + name: in-cluster + namespace: argocd-prd +``` + +--- + +## `metadata` + +| Field | Type | Required | Editable | Notes | +| ----- | ---- | -------- | -------- | ----- | +| `name` | string | yes | no | Must match the filename without `.yaml`. Convention: `incubator-infra-`. This name is an identifier — changing it breaks ArgoCD tracking. | +| `namespace` | string | yes | no | Env-specific: `argocd-prd` (prd), `argocd-dev` (stg/dev), `argocd-shared-int` (int). This is the namespace in the **admin** cluster where ArgoCD runs, not the target cluster. | +| `finalizers[0]` | string | yes | no | Always `resources-finalizer.argocd.argoproj.io`. Ensures ArgoCD deletes child Applications when the parent is deleted. Do not remove. | + +### Filename ↔ name invariant (R9) + +The incubator filename (without `.yaml`) **must equal** `metadata.name`. These are routing keys used by ArgoCD: + +```text +prd: incubator/prd/incubator-infra-k8s-central-prd-ase1.yaml + └── metadata.name: incubator-infra-k8s-central-prd-ase1 + +stg: incubator/infra/incubator-infra-k8s-central-stg-ase1.yaml + └── metadata.name: incubator-infra-k8s-central-stg-ase1 +``` + +--- + +## `spec.project` + +| Field | Type | Required | Editable | Notes | +| ----- | ---- | -------- | -------- | ----- | +| `project` | string | yes | no | Always `default` for incubator Applications. The child Applications use `sre` or `sec` projects. | + +--- + +## `spec.source` + +| Field | Type | Required | Editable | Notes | +| ----- | ---- | -------- | -------- | ----- | +| `repoURL` | string | yes | no | Always `https://github.com/Meesho/devops-infra-argo-config`. Changing this is a Layer 3 operation. | +| `targetRevision` | string | yes | no | Environment-specific: `main` (prd), `develop` (stg), `pre-prod` (int). Changing to any other value requires sign-off. | +| `path` | string | yes | no | Always `generic-argo-apps-chart`. Points to the Helm chart in this repo. | +| `helm.valueFiles[0]` | string | yes | yes | Relative path from the chart root to the cluster's values file. Convention: `../values//incubator-infra--values.yaml`. The `..` is required because ArgoCD resolves paths relative to `path` (i.e., relative to `generic-argo-apps-chart/`). | + +### `valueFiles` path convention + +The path is relative to the chart directory (`generic-argo-apps-chart/`), so you go up one level to reach the repo root: + +```text +generic-argo-apps-chart/ (chart root) + └── ../values/prd/incubator-infra-k8s-central-prd-ase1-values.yaml + └── resolves to: values/prd/incubator-infra-k8s-central-prd-ase1-values.yaml +``` + +--- + +## `spec.destination` + +| Field | Type | Required | Editable | Notes | +| ----- | ---- | -------- | -------- | ----- | +| `name` | string | yes | no | Always `in-cluster`. Incubator Applications run on the **admin cluster** where ArgoCD is installed, not on the target cluster. Child Applications (from `appSpec`) deploy to the target cluster. | +| `namespace` | string | yes | no | Env-specific: `argocd-prd` (prd), `argocd-dev` (stg/dev), `argocd-shared-int` (int). This is where ArgoCD creates the child Application objects. | + +--- + +## What this file controls vs. what it doesn't + +| Controlled by this file | Controlled by the values file | +| ----------------------- | ----------------------------- | +| Which generic chart to use | Which tools deploy (`appSpec[]`) | +| Which values file to use | Target cluster name (`clusterSpec`) | +| ArgoCD namespace | Chart source repo and revision (`teamSpec`) | +| Parent Application name | Per-tool namespace, chartDir, valuesDir | + +--- + +## Files that must exist when this file is created + +| File | Where | Why | +| ---- | ----- | --- | +| `values//incubator-infra--values.yaml` | This repo | Referenced by `helm.valueFiles` | +| `generic-argo-apps-chart/` | This repo | The chart being rendered | + +See also: [values-file-schema.md](values-file-schema.md) for the values file structure, and [add-new-cluster.md](../procedures/add-new-cluster.md) for the full cluster onboarding procedure. diff --git a/docs/platform/schemas/values-file-schema.md b/docs/platform/schemas/values-file-schema.md new file mode 100644 index 0000000..b1d289d --- /dev/null +++ b/docs/platform/schemas/values-file-schema.md @@ -0,0 +1,171 @@ +# Values File Schema — Annotated Field Reference + +> Field-by-field documentation of the cluster values files used by the generic ArgoCD chart. +> +> **File location:** `values//incubator-infra--values.yaml` +> +> **Consumer:** `generic-argo-apps-chart/templates/genericTemplate.yaml` reads these values to render one ArgoCD `Application` per `appSpec` entry. + +--- + +## Top-level structure + +```yaml +clusterSpec: # REQUIRED — cluster identity and routing +argocdSpec: # REQUIRED — ArgoCD operational config +teamSpec: # REQUIRED — source repo, labels, team identity +appSpec: # REQUIRED — list of tools to deploy (may be empty []) +``` + +--- + +## `clusterSpec` + +```yaml +clusterSpec: + destination: + server: "" # String. Always empty — name-based routing is standard. + name: "k8s-central-prd-ase1" # String. REQUIRED. GKE cluster name. + # Must match: incubator file name, helm-overrides// folder, + # and teamSpec.devops.labels.cluster. +``` + +| Field | Type | Required | Editable | Notes | +| ----- | ---- | -------- | -------- | ----- | +| `destination.server` | string | yes | no | Always `""`. Name-based routing is used instead. | +| `destination.name` | string | yes | no | GKE cluster name. Changing this redirects ALL tools — HIGH RISK. | + +--- + +## `argocdSpec` + +```yaml +argocdSpec: + namespace: argocd-prd # String. ArgoCD namespace where Applications are created. + # prd → argocd-prd | stg/dev → argocd-dev | int → argocd-shared-int +``` + +| Field | Type | Required | Editable | Notes | +| ----- | ---- | -------- | -------- | ----- | +| `namespace` | string | yes | no | Env-specific: `argocd-prd` (prd), `argocd-dev` (stg/dev), `argocd-shared-int` (int). Changing is HIGH RISK. | + +--- + +## `teamSpec` + +```yaml +teamSpec: + devops: # Object. Team block — always "devops" for infra tooling. + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts # String. Helm charts source. + targetRevision: main # String. Git ref for chart source in devops-infra-helm-charts. + # prd → main | stg/dev → develop | int → pre-prod + path: helm-templates # String. Root path for charts in the source repo. + valueFiles: ../../helm-overrides/k8s-central-prd-ase1 # String. Relative path to overrides. + labels: + bu: infra # String. Business unit. Always "infra" for this repo. + team: devops # String. Maps to ArgoCD AppProject name. + env: prd # String. Environment: prd, int, dev, admin. + cluster: k8s-central-prd-ase1 # String. Must match clusterSpec.destination.name. +``` + +| Field | Type | Required | Editable | Notes | +| ----- | ---- | -------- | -------- | ----- | +| `source.repoURL` | string | yes | no | Chart source repo. Changing this is HIGH RISK. | +| `source.targetRevision` | string | yes | no | Env-specific: `main` (prd), `develop` (stg/dev), `pre-prod` (int). Changing to any other value is HIGH RISK. | +| `source.path` | string | yes | no | Always `helm-templates`. | +| `source.valueFiles` | string | yes | no | Relative path from chart to `helm-overrides/`. | +| `labels.bu` | string | yes | no | Always `infra`. | +| `labels.team` | string | yes | no | Maps to AppProject. Usually `devops` → `sre` project. | +| `labels.env` | string | yes | no | Matches cluster environment. | +| `labels.cluster` | string | yes | no | Must match `clusterSpec.destination.name`. Used in Application name munging. | + +--- + +## `appSpec` (the main editing surface) + +```yaml +appSpec: + - name: keda # String. REQUIRED. Short tool name. + namespace: keda-central-prd # String. REQUIRED. Target Kubernetes namespace. + chartDir: keda # String. REQUIRED. Chart directory in helm-templates/. + valuesDir: keda # String. REQUIRED. Override directory in helm-overrides//. + nameOverride: "" # String. OPTIONAL. Custom Application name. + additionalValueFiles: # List[String]. OPTIONAL. Extra values files. + - ../../helm-templates/coredns/gcp-ase1a-values.yaml +``` + +### Field reference + +| Field | Type | Required | Editable | Notes | +| ----- | ---- | -------- | -------- | ----- | +| `name` | string | yes | yes | Short tool identifier. Used in auto-generated Application name: `--`. Lowercase, hyphen-separated. | +| `namespace` | string | yes | yes | Target K8s namespace. Auto-created by ArgoCD (`CreateNamespace=true`). Convention: `-` or shared namespace. | +| `chartDir` | string | yes | yes | Directory under `devops-infra-helm-charts/helm-templates/`. **Must exist.** | +| `valuesDir` | string | yes | yes | Directory under `devops-infra-helm-charts/helm-overrides//`. **Must exist** and contain `custom-values.yaml`. | +| `nameOverride` | string | no | yes | Overrides the auto-generated Application name. Use only for collisions or >253 char names. See R7. | +| `additionalValueFiles` | list | no | yes | Extra Helm values files merged during render. Paths are relative to the chart source. | + +### How `appSpec` entries become ArgoCD Applications + +The generic chart template (`genericTemplate.yaml`) iterates over `appSpec` and for each entry: + +1. **Computes the Application name:** `--` (or `nameOverride` if set). +2. **Sets the source:** `repoURL` + `path/` from `teamSpec.devops.source`. +3. **Sets the values:** `valueFiles//custom-values.yaml` + any `additionalValueFiles`. +4. **Sets the destination:** `clusterSpec.destination.name` + `namespace`. +5. **Sets the project:** from `teamSpec.devops.labels.team` (maps to AppProject). +6. **Sets syncPolicy:** `CreateNamespace=true`. +7. **Adds finalizer:** `resources-finalizer.argocd.argoproj.io`. + +### Rendered Application example + +For `name: keda` on `k8s-central-prd-ase1`: + +```yaml +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: keda-central-prd + namespace: argocd-prd + labels: + bu: infra + team: devops + env: prd + cluster: k8s-central-prd-ase1 + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: devops + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-templates/keda + helm: + valueFiles: + - ../../helm-overrides/k8s-central-prd-ase1/keda/custom-values.yaml + destination: + name: k8s-central-prd-ase1 + server: "" + namespace: keda-central-prd + syncPolicy: + syncOptions: + - CreateNamespace=true +``` + +--- + +## Cluster name munging rules + +Used by the generic template to produce short Application names: + +| Step | Transformation | Example | +| ---- | -------------- | ------- | +| 1 | Preserve `dp-` and `backup` (placeholder swap) | `dp-foo` stays `dp-foo` | +| 2 | Strip `p-`, `prd-`, `int-`, `dev-`, `-cluster` | `k8s-central-prd-ase1` → `k8s-central-ase1` | +| 3 | Replace `prod-ops` → `infra` | — | +| 4 | Replace `-ase1c` → `-c` | `k8s-central-prd-ase1c` → `central-c` | +| 5 | Strip `-ase1` | `k8s-central-ase1` → `k8s-central` | +| 6 | Strip `k8s-` | `k8s-central` → `central` | + +**Net result:** `k8s-central-prd-ase1` → `central-prd` diff --git a/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-gke-central-prd-ase1a.yaml b/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-gke-central-prd-ase1a.yaml new file mode 100644 index 0000000..4f23763 --- /dev/null +++ b/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-gke-central-prd-ase1a.yaml @@ -0,0 +1,21 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: externalname-incubator-gke-central-prd-ase1a + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: external-name + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: external-name-service-template + helm: + valueFiles: + - ../external-name-service-values/prd/ase1/zone-a/external-name-service-incubator-common-prd-ase1a-values.yaml + values: | + labels: + bu: central + destination: + name: gke-central-prd-ase1a diff --git a/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-gke-dataengg-prd-ase1a.yaml b/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-gke-dataengg-prd-ase1a.yaml new file mode 100644 index 0000000..9e9455f --- /dev/null +++ b/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-gke-dataengg-prd-ase1a.yaml @@ -0,0 +1,21 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: externalname-incubator-gke-dataengg-prd-ase1a + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: external-name + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: external-name-service-template + helm: + valueFiles: + - ../external-name-service-values/prd/ase1/zone-a/external-name-service-incubator-common-prd-ase1a-values.yaml + values: | + labels: + bu: dataengg + destination: + name: gke-dataengg-prd-ase1a diff --git a/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-gke-datascience-prd-ase1a.yaml b/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-gke-datascience-prd-ase1a.yaml new file mode 100644 index 0000000..ab3a9a8 --- /dev/null +++ b/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-gke-datascience-prd-ase1a.yaml @@ -0,0 +1,21 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: externalname-incubator-gke-datascience-prd-ase1a + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: external-name + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: external-name-service-template + helm: + valueFiles: + - ../external-name-service-values/prd/ase1/zone-a/external-name-service-incubator-common-prd-ase1a-values.yaml + values: | + labels: + bu: datascience + destination: + name: gke-datascience-prd-ase1a diff --git a/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-gke-demand-prd-ase1a.yaml b/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-gke-demand-prd-ase1a.yaml new file mode 100644 index 0000000..8cc4ba2 --- /dev/null +++ b/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-gke-demand-prd-ase1a.yaml @@ -0,0 +1,21 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: externalname-incubator-gke-demand-prd-ase1a + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: external-name + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: external-name-service-template + helm: + valueFiles: + - ../external-name-service-values/prd/ase1/zone-a/external-name-service-incubator-common-prd-ase1a-values.yaml + values: | + labels: + bu: demand + destination: + name: gke-demand-prd-ase1a diff --git a/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-gke-dsgpu-prd-ase1a.yaml b/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-gke-dsgpu-prd-ase1a.yaml new file mode 100644 index 0000000..d578e9e --- /dev/null +++ b/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-gke-dsgpu-prd-ase1a.yaml @@ -0,0 +1,21 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: externalname-incubator-gke-dsgpu-prd-ase1a + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: external-name + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: external-name-service-template + helm: + valueFiles: + - ../external-name-service-values/prd/ase1/zone-a/external-name-service-incubator-common-prd-ase1a-values.yaml + values: | + labels: + bu: dsgpu + destination: + name: gke-dsgpu-prd-ase1a diff --git a/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-gke-farmiso-prd-ase1a.yaml b/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-gke-farmiso-prd-ase1a.yaml new file mode 100644 index 0000000..965cfae --- /dev/null +++ b/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-gke-farmiso-prd-ase1a.yaml @@ -0,0 +1,21 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: externalname-incubator-gke-farmiso-prd-ase1a + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: external-name + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: external-name-service-template + helm: + valueFiles: + - ../external-name-service-values/prd/ase1/zone-a/external-name-service-incubator-common-prd-ase1a-values.yaml + values: | + labels: + bu: farmiso + destination: + name: gke-farmiso-prd-ase1a diff --git a/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-gke-supply-prd-ase1a.yaml b/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-gke-supply-prd-ase1a.yaml new file mode 100644 index 0000000..57db9ab --- /dev/null +++ b/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-gke-supply-prd-ase1a.yaml @@ -0,0 +1,21 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: externalname-incubator-gke-supply-prd-ase1a + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: external-name + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: external-name-service-template + helm: + valueFiles: + - ../external-name-service-values/prd/ase1/zone-a/external-name-service-incubator-common-prd-ase1a-values.yaml + values: | + labels: + bu: supply + destination: + name: gke-supply-prd-ase1a diff --git a/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-k8s-central-prd-ase1a.yaml b/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-k8s-central-prd-ase1a.yaml new file mode 100644 index 0000000..1428c2f --- /dev/null +++ b/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-k8s-central-prd-ase1a.yaml @@ -0,0 +1,22 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: externalname-incubator-k8s-central-prd-ase1a + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: external-name + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: external-name-service-template + helm: + valueFiles: + - ../external-name-service-values/prd/ase1/zone-a/external-name-service-incubator-common-prd-ase1a-values.yaml + values: | + labels: + bu: central + + destination: + name: k8s-central-prd-ase1 diff --git a/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-k8s-dataengg-prd-ase1a.yaml b/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-k8s-dataengg-prd-ase1a.yaml new file mode 100644 index 0000000..d60bde8 --- /dev/null +++ b/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-k8s-dataengg-prd-ase1a.yaml @@ -0,0 +1,21 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: externalname-incubator-k8s-dataengg-prd-ase1a + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: external-name + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: external-name-service-template + helm: + valueFiles: + - ../external-name-service-values/prd/ase1/zone-a/external-name-service-incubator-common-prd-ase1a-values.yaml + values: | + labels: + bu: dataengg + destination: + name: k8s-dataengg-prd-ase1 diff --git a/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-k8s-datascience-prd-ase1a.yaml b/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-k8s-datascience-prd-ase1a.yaml new file mode 100644 index 0000000..21308bf --- /dev/null +++ b/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-k8s-datascience-prd-ase1a.yaml @@ -0,0 +1,21 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: externalname-incubator-k8s-datascience-prd-ase1a + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: external-name + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: external-name-service-template + helm: + valueFiles: + - ../external-name-service-values/prd/ase1/zone-a/external-name-service-incubator-common-prd-ase1a-values.yaml + values: | + labels: + bu: datascience + destination: + name: k8s-datascience-prd-ase1 diff --git a/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-k8s-demand-prd-ase1a.yaml b/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-k8s-demand-prd-ase1a.yaml new file mode 100644 index 0000000..3c61c4c --- /dev/null +++ b/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-k8s-demand-prd-ase1a.yaml @@ -0,0 +1,22 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: externalname-incubator-k8s-demand-prd-ase1a + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: external-name + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: external-name-service-template + helm: + valueFiles: + - ../external-name-service-values/prd/ase1/zone-a/external-name-service-incubator-common-prd-ase1a-values.yaml + values: | + labels: + bu: demand + destination: + name: k8s-demand-prd-ase1 + diff --git a/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-k8s-dsgpu-prd-ase1a.yaml b/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-k8s-dsgpu-prd-ase1a.yaml new file mode 100644 index 0000000..2fedfdf --- /dev/null +++ b/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-k8s-dsgpu-prd-ase1a.yaml @@ -0,0 +1,21 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: externalname-incubator-k8s-dsgpu-prd-ase1a + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: external-name + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: external-name-service-template + helm: + valueFiles: + - ../external-name-service-values/prd/ase1/zone-a/external-name-service-incubator-common-prd-ase1a-values.yaml + values: | + labels: + bu: dsgpu + destination: + name: k8s-dsgpu-prd-ase1 diff --git a/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-k8s-farmiso-prd-ase1a.yaml b/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-k8s-farmiso-prd-ase1a.yaml new file mode 100644 index 0000000..80a45d5 --- /dev/null +++ b/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-k8s-farmiso-prd-ase1a.yaml @@ -0,0 +1,21 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: externalname-incubator-k8s-farmiso-prd-ase1a + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: external-name + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: external-name-service-template + helm: + valueFiles: + - ../external-name-service-values/prd/ase1/zone-a/external-name-service-incubator-common-prd-ase1a-values.yaml + values: | + labels: + bu: farmiso + destination: + name: k8s-farmiso-prd-ase1 diff --git a/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-k8s-supply-prd-ase1a.yaml b/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-k8s-supply-prd-ase1a.yaml new file mode 100644 index 0000000..9565253 --- /dev/null +++ b/external-name-service-incubator/prd/ase1/zone-a/external-name-service-incubator-k8s-supply-prd-ase1a.yaml @@ -0,0 +1,21 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: externalname-incubator-k8s-supply-prd-ase1a + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: external-name + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: external-name-service-template + helm: + valueFiles: + - ../external-name-service-values/prd/ase1/zone-a/external-name-service-incubator-common-prd-ase1a-values.yaml + values: | + labels: + bu: supply + destination: + name: k8s-supply-prd-ase1 diff --git a/external-name-service-incubator/prd/ase1/zone-c/external-name-service-incubator-k8s-central-prd-ase1c.yaml b/external-name-service-incubator/prd/ase1/zone-c/external-name-service-incubator-k8s-central-prd-ase1c.yaml new file mode 100644 index 0000000..9f629cc --- /dev/null +++ b/external-name-service-incubator/prd/ase1/zone-c/external-name-service-incubator-k8s-central-prd-ase1c.yaml @@ -0,0 +1,22 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: externalname-incubator-k8s-central-prd-ase1c + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: external-name + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: external-name-service-template + helm: + valueFiles: + - ../external-name-service-values/prd/ase1/zone-c/external-name-service-incubator-common-prd-ase1c-values.yaml + values: | + labels: + bu: central + + destination: + name: k8s-central-prd-ase1c diff --git a/external-name-service-incubator/prd/ase1/zone-c/external-name-service-incubator-k8s-dataengg-prd-ase1c.yaml b/external-name-service-incubator/prd/ase1/zone-c/external-name-service-incubator-k8s-dataengg-prd-ase1c.yaml new file mode 100644 index 0000000..be9e317 --- /dev/null +++ b/external-name-service-incubator/prd/ase1/zone-c/external-name-service-incubator-k8s-dataengg-prd-ase1c.yaml @@ -0,0 +1,22 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: externalname-incubator-k8s-dataengg-prd-ase1c + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: external-name + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: external-name-service-template + helm: + valueFiles: + - ../external-name-service-values/prd/ase1/zone-c/external-name-service-incubator-common-prd-ase1c-values.yaml + values: | + labels: + bu: dataengg + + destination: + name: k8s-dataengg-prd-ase1c diff --git a/external-name-service-incubator/prd/ase1/zone-c/external-name-service-incubator-k8s-datascience-prd-ase1c.yaml b/external-name-service-incubator/prd/ase1/zone-c/external-name-service-incubator-k8s-datascience-prd-ase1c.yaml new file mode 100644 index 0000000..e78c2c9 --- /dev/null +++ b/external-name-service-incubator/prd/ase1/zone-c/external-name-service-incubator-k8s-datascience-prd-ase1c.yaml @@ -0,0 +1,22 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: externalname-incubator-k8s-datascience-prd-ase1c + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: external-name + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: external-name-service-template + helm: + valueFiles: + - ../external-name-service-values/prd/ase1/zone-c/external-name-service-incubator-common-prd-ase1c-values.yaml + values: | + labels: + bu: datascience + + destination: + name: k8s-datascience-prd-ase1c diff --git a/external-name-service-incubator/prd/ase1/zone-c/external-name-service-incubator-k8s-demand-prd-ase1c.yaml b/external-name-service-incubator/prd/ase1/zone-c/external-name-service-incubator-k8s-demand-prd-ase1c.yaml new file mode 100644 index 0000000..126678c --- /dev/null +++ b/external-name-service-incubator/prd/ase1/zone-c/external-name-service-incubator-k8s-demand-prd-ase1c.yaml @@ -0,0 +1,22 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: externalname-incubator-k8s-demand-prd-ase1c + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: external-name + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: external-name-service-template + helm: + valueFiles: + - ../external-name-service-values/prd/ase1/zone-c/external-name-service-incubator-common-prd-ase1c-values.yaml + values: | + labels: + bu: demand + + destination: + name: k8s-demand-prd-ase1c diff --git a/external-name-service-incubator/prd/ase1/zone-c/external-name-service-incubator-k8s-supply-prd-ase1c.yaml b/external-name-service-incubator/prd/ase1/zone-c/external-name-service-incubator-k8s-supply-prd-ase1c.yaml new file mode 100644 index 0000000..4be8b29 --- /dev/null +++ b/external-name-service-incubator/prd/ase1/zone-c/external-name-service-incubator-k8s-supply-prd-ase1c.yaml @@ -0,0 +1,22 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: externalname-incubator-k8s-supply-prd-ase1c + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: external-name + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: external-name-service-template + helm: + valueFiles: + - ../external-name-service-values/prd/ase1/zone-c/external-name-service-incubator-common-prd-ase1c-values.yaml + values: | + labels: + bu: supply + + destination: + name: k8s-supply-prd-ase1c diff --git a/external-name-service-template/.helmignore b/external-name-service-template/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/external-name-service-template/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/external-name-service-template/Chart.yaml b/external-name-service-template/Chart.yaml new file mode 100644 index 0000000..b65e252 --- /dev/null +++ b/external-name-service-template/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: external-name-service +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" diff --git a/external-name-service-template/external-name-service-incubator-common-prd-ase1a-values.yaml b/external-name-service-template/external-name-service-incubator-common-prd-ase1a-values.yaml new file mode 100644 index 0000000..8b39ec6 --- /dev/null +++ b/external-name-service-template/external-name-service-incubator-common-prd-ase1a-values.yaml @@ -0,0 +1,77 @@ +labels: + team: devops + env: prd + region: ase1 + zone: a + bu: central + + +overrideEnvoyServiceNameWith: "" + +#cluster msc "on" or "off" +#bu mentioned in incubator application.yaml values.labels e.g central +#msc.central: on , all-ilb: off ; for all externalservice backend in central cluster -> clusterset.local +#msc.central: on , supply-ilb.enabled: on ; externalservice backend for supply in each cluster -> ilb of zone mentioned for supply bu +#msc.central: off , all-ilb: off/on ; all externalservice backend in central cluster -> ilb of zone mentioned for each bu + +mcs: + farmiso: "on" + central: "on" + dataengg: "on" + datascience: "on" + demand: "on" + supply: "on" + +supply-ilb: + enabled: false + zone: a +demand-ilb: + enabled: false + zone: a +dataengg-ilb: + enabled: false + zone: a +datascience-ilb: + enabled: false + zone: a +farmiso-ilb: + enabled: false + zone: a +central-ilb: + enabled: false + zone: a + + + #namespace: + # alb for http or tcplb for grpc +svcSpec: + contour-internal-0-central-prd: + - "http" + - "grpc" + contour-internal-0-dataengg-prd: + - "http" + - "grpc" + contour-internal-0-datascience-prd: + - "http" + - "grpc" + contour-internal-0-demand-prd: + - "http" + - "grpc" + contour-internal-0-supply-prd: + - "http" + - "grpc" + contour-internal-1-central-prd: + - "http" + - "grpc" + contour-internal-1-dataengg-prd: + - "http" + - "grpc" + contour-internal-1-datascience-prd: + - "http" + - "grpc" + contour-internal-1-demand-prd: + - "http" + - "grpc" + contour-internal-1-supply-prd: + - "http" + - "grpc" diff --git a/external-name-service-template/templates/_helpers.tpl b/external-name-service-template/templates/_helpers.tpl new file mode 100644 index 0000000..dda69cf --- /dev/null +++ b/external-name-service-template/templates/_helpers.tpl @@ -0,0 +1,19 @@ +{{- define "service.port" -}} +{{- if eq . "http" -}} +80 +{{- else if eq . "grpc" -}} +8080 +{{- else -}} +80 +{{- end -}} +{{- end -}} + +{{- define "service.targetport" -}} +{{- if eq . "http" -}} +80 +{{- else if eq . "grpc" -}} +8080 +{{- else -}} +80 +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/external-name-service-template/templates/service.yaml b/external-name-service-template/templates/service.yaml new file mode 100644 index 0000000..d3c837a --- /dev/null +++ b/external-name-service-template/templates/service.yaml @@ -0,0 +1,53 @@ +{{- $labels := .Values.labels -}} +{{- $bu := $labels.bu -}} +{{- $mcs := index .Values.mcs $bu | default "on" -}} + +{{- range $namespace, $protocols := .Values.svcSpec }} + +{{- if not (regexMatch (printf ".*%s.*" $bu) $namespace) }} + +{{- $parts := splitList "-" $namespace -}} +{{- $keyPart := "" -}} +{{- if eq (print (index $parts 1)) "external" }} + {{- $keyPart = print (index $parts 2) }} +{{- else }} + {{- $keyPart = print (index $parts 3) }} +{{- end }} +{{- $ilb_key := printf "%s-ilb" $keyPart -}} + +{{- $ilb_info := index $.Values $ilb_key | default dict -}} +{{- $ilb_zone := index $ilb_info "zone" | default $labels.zone -}} + +{{- range $protocol_type := $protocols }} + + +{{- $envoyServiceName := $namespace -}} +{{- if $.Values.overrideEnvoyServiceNameWith }} + {{- $envoyServiceName = regexReplaceAll "-prd$" $namespace (printf "-%s-prd" $.Values.overrideEnvoyServiceNameWith) -}} +{{- end }} + +{{- $envoySvcName := printf "%s-envoy%s" $envoyServiceName (ternary "-headless" "" (eq $protocol_type "grpc")) -}} +{{- $name := printf "%s-envoy%s" $namespace (ternary "-headless" "" (eq $protocol_type "grpc")) -}} + +apiVersion: v1 +kind: Service +metadata: + name: externalname-{{ $name }} + namespace: {{ $namespace }} + labels: +{{ toYaml $labels | indent 4 }} +spec: + type: ExternalName + ports: + - port: {{ include "service.port" $protocol_type }} + targetPort: {{ include "service.targetport" $protocol_type }} + protocol: TCP + name: {{ $protocol_type }} + externalName: {{ if and (eq $mcs "on") (hasKey $ilb_info "enabled") (eq $ilb_info.enabled false) }}{{ printf "%s.%s.svc.clusterset.local" $envoySvcName $namespace }}{{ else }}{{ printf "%s%s-%s%s.%s.meesho.int" (ternary "tcp-" "" (eq $protocol_type "grpc")) $namespace $labels.region $ilb_zone $labels.env }}{{ end }} + + +--- + +{{- end }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/external-name-service-values/prd/ase1/zone-a/external-name-service-incubator-common-prd-ase1a-values.yaml b/external-name-service-values/prd/ase1/zone-a/external-name-service-incubator-common-prd-ase1a-values.yaml new file mode 100644 index 0000000..8733eb0 --- /dev/null +++ b/external-name-service-values/prd/ase1/zone-a/external-name-service-incubator-common-prd-ase1a-values.yaml @@ -0,0 +1,101 @@ +labels: + team: devops + env: prd + region: ase1 + zone: a + +#cluster msc "on" or "off" +#bu mentioned in incubator application.yaml values.labels e.g central +#msc.central: on , all-ilb: off ; for all externalservice backend in central cluster -> clusterset.local +#msc.central: on , supply-ilb.enabled: on ; externalservice backend for supply in each cluster -> ilb of zone mentioned for supply bu +#msc.central: off , all-ilb: off/on ; all externalservice backend in central cluster -> ilb of zone mentioned for each bu + + +#if you want to override the envoy service name with a different value, you can do it here +#e.g envoy service name = contour-internal-0-central-c-prd then overrideEnvoyServiceNameWith = c +# namespace = contour-internal-0-central-prd +# "" means no override +overrideEnvoyServiceNameWith: "" + +mcs: + farmiso: "on" + central: "on" + dataengg: "on" + datascience: "on" + demand: "on" + supply: "on" + dsgpu: "on" + +supply-ilb: + enabled: false + zone: a +demand-ilb: + enabled: false + zone: a +dataengg-ilb: + enabled: false + zone: a +datascience-ilb: + enabled: false + zone: a +farmiso-ilb: + enabled: false + zone: a +central-ilb: + enabled: false + zone: a +dsgpu-ilb: + enabled: false + zone: a + + + #namespace: + # alb for http or tcplb for grpc +svcSpec: + contour-internal-0-central-prd: + - "http" + - "grpc" + contour-internal-0-dataengg-prd: + - "http" + - "grpc" + contour-internal-0-datascience-prd: + - "http" + - "grpc" + contour-internal-0-demand-prd: + - "http" + - "grpc" + contour-internal-0-supply-prd: + - "http" + - "grpc" + contour-internal-1-central-prd: + - "http" + - "grpc" + contour-internal-1-dataengg-prd: + - "http" + - "grpc" + contour-internal-1-datascience-prd: + - "http" + - "grpc" + contour-internal-1-demand-prd: + - "http" + - "grpc" + contour-internal-1-supply-prd: + - "http" + - "grpc" + contour-external-central-prd: + - "http" + contour-external-dataengg-prd: + - "http" + contour-external-datascience-prd: + - "http" + contour-external-demand-prd: + - "http" + contour-external-supply-prd: + - "http" + contour-internal-0-dsgpu-prd: + - "http" + - "grpc" + contour-internal-1-dsgpu-prd: + - "http" + - "grpc" + diff --git a/external-name-service-values/prd/ase1/zone-c/external-name-service-incubator-common-prd-ase1c-values.yaml b/external-name-service-values/prd/ase1/zone-c/external-name-service-incubator-common-prd-ase1c-values.yaml new file mode 100644 index 0000000..2e5fa73 --- /dev/null +++ b/external-name-service-values/prd/ase1/zone-c/external-name-service-incubator-common-prd-ase1c-values.yaml @@ -0,0 +1,90 @@ +labels: + team: devops + env: prd + region: ase1 + zone: c + +#cluster msc "on" or "off" +#bu mentioned in incubator application.yaml values.labels e.g central +#msc.central: on , all-ilb: off ; for all externalservice backend in central cluster -> clusterset.local +#msc.central: on , supply-ilb.enabled: on ; externalservice backend for supply in each cluster -> ilb of zone mentioned for supply bu +#msc.central: off , all-ilb: off/on ; all externalservice backend in central cluster -> ilb of zone mentioned for each bu + +#if you want to override the envoy service name with a different value, you can do it here +#e.g envoy service name = contour-internal-0-central-c-prd then overrideEnvoyServiceNameWith = c +# namespace = contour-internal-0-central-prd +# "" means no override +overrideEnvoyServiceNameWith: "c" + + +mcs: + farmiso: "off" + central: "on" + dataengg: "on" + datascience: "on" + demand: "on" + supply: "on" + +supply-ilb: + enabled: false + zone: a +demand-ilb: + enabled: false + zone: a +dataengg-ilb: + enabled: false + zone: a +datascience-ilb: + enabled: false + zone: a +farmiso-ilb: + enabled: true + zone: a +central-ilb: + enabled: false + zone: a + + + #namespace: + # alb for http or tcplb for grpc +svcSpec: + contour-internal-0-central-prd: + - "http" + contour-internal-0-dataengg-prd: + - "http" + - "grpc" + contour-internal-0-datascience-prd: + - "http" + - "grpc" + contour-internal-0-demand-prd: + - "http" + - "grpc" + contour-internal-0-supply-prd: + - "http" + - "grpc" + contour-internal-1-central-prd: + - "http" + - "grpc" + contour-internal-1-dataengg-prd: + - "http" + - "grpc" + contour-internal-1-datascience-prd: + - "http" + - "grpc" + contour-internal-1-demand-prd: + - "http" + - "grpc" + contour-internal-1-supply-prd: + - "http" + - "grpc" + contour-external-central-prd: + - "http" + contour-external-dataengg-prd: + - "http" + contour-external-datascience-prd: + - "http" + contour-external-demand-prd: + - "http" + contour-external-supply-prd: + - "http" + diff --git a/generic-argo-apps-chart/Chart.yaml b/generic-argo-apps-chart/Chart.yaml new file mode 100644 index 0000000..bacec0f --- /dev/null +++ b/generic-argo-apps-chart/Chart.yaml @@ -0,0 +1,23 @@ +apiVersion: v2 +name: meesho-generic-argo-apps-chart +description: Applications + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +appVersion: "1.0" \ No newline at end of file diff --git a/generic-argo-apps-chart/templates/genericTemplate.yaml b/generic-argo-apps-chart/templates/genericTemplate.yaml new file mode 100644 index 0000000..8814ae7 --- /dev/null +++ b/generic-argo-apps-chart/templates/genericTemplate.yaml @@ -0,0 +1,57 @@ +{{- $top := . -}} +{{- range $i, $config := .Values.appSpec }} +--- +{{- $appName := $config.name -}} +{{- $appNameOverride := $config.nameOverride -}} +{{- $clusterValues := $top.Values.clusterSpec -}} +{{- $clusterName := $clusterValues.destination.name -}} +{{- $clusterServer := $clusterValues.destination.server -}} + +{{- $teamValues := $top.Values.teamSpec.devops -}} +{{- $labels := $teamValues.labels -}} +{{- $bu := $labels.bu -}} +{{- $cluster := $labels.cluster | replace "dp-" "#pqr#" | replace "backup" "#abc#" | replace "p-" "" | replace "prd-" "" | replace "int-" "" | replace "dev-" "" | replace "-cluster" "" | replace "prod-ops" "infra" | replace "-ase1c" "-c" | replace "-ase1a" "-a" | replace "-ase1" "" | replace "k8s-" "" | replace "gke-" "" | replace "#pqr#" "dp-" | replace "#abc#" "backup" -}} +{{- $team := $labels.team -}} +{{- $env := $labels.env -}} +{{- $source := $teamValues.source -}} +{{- $repoURL := $source.repoURL -}} +{{- $targetRevision := $source.targetRevision -}} + +{{- $namespace := $config.namespace -}} +{{- $path := printf "%s/%s" $source.path $config.chartDir -}} +{{- $valueFiles := printf "%s/%s/custom-values.yaml" $source.valueFiles $config.valuesDir -}} +{{- $additionalValueFiles := $config.additionalValueFiles | default list -}} + +{{ $argoAppNamespace := $top.Values.argocdSpec.namespace }} + +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: '{{- if $appNameOverride }}{{ $appNameOverride }}{{- else }}{{ printf "%s-%s-%s" $appName $cluster $env }}{{- end }}' + namespace: {{ $argoAppNamespace }} + labels: +{{ toYaml $labels | indent 4 }} + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: {{ $team }} + source: + repoURL: {{ $repoURL }} + targetRevision: {{ $targetRevision }} + path: {{ $path }} + helm: + valueFiles: + - {{ $valueFiles }} +{{- if $additionalValueFiles }} +{{- range $additionalValueFiles }} + - {{ . }} +{{- end }} +{{- end }} + destination: + name: {{ $clusterName }} + server: {{ $clusterServer }} + namespace: {{ $namespace }} + syncPolicy: + syncOptions: + - CreateNamespace=true +{{- end }} diff --git a/incubator/admin/incubator-infra-k8s-admin-dev-ase1.yaml b/incubator/admin/incubator-infra-k8s-admin-dev-ase1.yaml new file mode 100644 index 0000000..e1a97b5 --- /dev/null +++ b/incubator/admin/incubator-infra-k8s-admin-dev-ase1.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-k8s-admin-dev-ase1 + namespace: argocd-admin + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values/admin/incubator-infra-k8s-admin-dev-ase1-values.yaml + destination: + name: in-cluster + namespace: argocd-admin diff --git a/incubator/admin/incubator-infra-k8s-admin-prd-ase1.yaml b/incubator/admin/incubator-infra-k8s-admin-prd-ase1.yaml new file mode 100644 index 0000000..e9612b7 --- /dev/null +++ b/incubator/admin/incubator-infra-k8s-admin-prd-ase1.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-k8s-admin-prd-ase1 + namespace: argocd-admin + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values/admin/incubator-infra-k8s-admin-prd-ase1-values.yaml + destination: + name: in-cluster + namespace: argocd-admin \ No newline at end of file diff --git a/incubator/admin/incubator-infra-k8s-devops-admin-ase1.yaml b/incubator/admin/incubator-infra-k8s-devops-admin-ase1.yaml new file mode 100644 index 0000000..c3e96e5 --- /dev/null +++ b/incubator/admin/incubator-infra-k8s-devops-admin-ase1.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-k8s-devops-admin-ase1 + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values/admin/incubator-infra-k8s-devops-admin-ase1-values.yaml + destination: + name: in-cluster + namespace: argocd-prd diff --git a/incubator/admin/incubator-infra-k8s-sec-admin-ase1.yaml b/incubator/admin/incubator-infra-k8s-sec-admin-ase1.yaml new file mode 100644 index 0000000..92006bf --- /dev/null +++ b/incubator/admin/incubator-infra-k8s-sec-admin-ase1.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-k8s-sec-admin-ase1 + namespace: argocd-admin + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values/admin/incubator-infra-k8s-sec-admin-ase1-values.yaml + destination: + name: in-cluster + namespace: argocd-admin diff --git a/incubator/prd/incubator-infra-gke-central-prd-ase1a-compute-class.yaml b/incubator/prd/incubator-infra-gke-central-prd-ase1a-compute-class.yaml new file mode 100644 index 0000000..45dcc42 --- /dev/null +++ b/incubator/prd/incubator-infra-gke-central-prd-ase1a-compute-class.yaml @@ -0,0 +1,17 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-gke-central-prd-ase1a-compute-class + namespace: argocd-prd +spec: + destination: + name: gke-central-prd-ase1a + namespace: 'prd-compute-class' + project: default + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-overrides/gke-central-prd-ase1a/computeclass + syncPolicy: + syncOptions: + - CreateNamespace=true diff --git a/incubator/prd/incubator-infra-gke-central-prd-ase1a.yaml b/incubator/prd/incubator-infra-gke-central-prd-ase1a.yaml new file mode 100644 index 0000000..a785134 --- /dev/null +++ b/incubator/prd/incubator-infra-gke-central-prd-ase1a.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-gke-central-prd-ase1a + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values/prd/incubator-infra-gke-central-prd-ase1a-values.yaml + destination: + name: in-cluster + namespace: argocd-prd diff --git a/incubator/prd/incubator-infra-gke-dataengg-prd-ase1a-compute-class.yaml b/incubator/prd/incubator-infra-gke-dataengg-prd-ase1a-compute-class.yaml new file mode 100644 index 0000000..43aae73 --- /dev/null +++ b/incubator/prd/incubator-infra-gke-dataengg-prd-ase1a-compute-class.yaml @@ -0,0 +1,17 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-gke-dataengg-prd-ase1a-compute-class + namespace: argocd-prd +spec: + destination: + name: gke-dataengg-prd-ase1a + namespace: 'prd-compute-class' + project: default + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-overrides/gke-dataengg-prd-ase1a/computeclass + syncPolicy: + syncOptions: + - CreateNamespace=true diff --git a/incubator/prd/incubator-infra-gke-dataengg-prd-ase1a.yaml b/incubator/prd/incubator-infra-gke-dataengg-prd-ase1a.yaml new file mode 100644 index 0000000..66f1d3b --- /dev/null +++ b/incubator/prd/incubator-infra-gke-dataengg-prd-ase1a.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-gke-dataengg-prd-ase1a + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values/prd/incubator-infra-gke-dataengg-prd-ase1a-values.yaml + destination: + name: in-cluster + namespace: argocd-prd diff --git a/incubator/prd/incubator-infra-gke-datascience-prd-as1-compute-class.yaml b/incubator/prd/incubator-infra-gke-datascience-prd-as1-compute-class.yaml new file mode 100644 index 0000000..34eec58 --- /dev/null +++ b/incubator/prd/incubator-infra-gke-datascience-prd-as1-compute-class.yaml @@ -0,0 +1,17 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-gke-datascience-prd-as1-compute-class + namespace: argocd-prd +spec: + destination: + name: gke-datascience-prd-as1a + namespace: 'prd-compute-class' + project: default + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-overrides/gke-datascience-prd-as1a/computeclass + syncPolicy: + syncOptions: + - CreateNamespace=true diff --git a/incubator/prd/incubator-infra-gke-datascience-prd-as1.yaml b/incubator/prd/incubator-infra-gke-datascience-prd-as1.yaml new file mode 100644 index 0000000..af8dc39 --- /dev/null +++ b/incubator/prd/incubator-infra-gke-datascience-prd-as1.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-gke-datascience-prd-as1 + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: dsgpu-ml + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values/prd/incubator-infra-gke-datascience-prd-as1-values.yaml + destination: + name: in-cluster + namespace: argocd-prd diff --git a/incubator/prd/incubator-infra-gke-datascience-prd-ase1a-compute-class.yaml b/incubator/prd/incubator-infra-gke-datascience-prd-ase1a-compute-class.yaml new file mode 100644 index 0000000..7ef9b3a --- /dev/null +++ b/incubator/prd/incubator-infra-gke-datascience-prd-ase1a-compute-class.yaml @@ -0,0 +1,17 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-gke-datascience-prd-ase1a-compute-class + namespace: argocd-prd +spec: + destination: + name: gke-datascience-prd-ase1a + namespace: 'prd-compute-class' + project: default + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-overrides/gke-datascience-prd-ase1a/computeclass + syncPolicy: + syncOptions: + - CreateNamespace=true diff --git a/incubator/prd/incubator-infra-gke-datascience-prd-ase1a.yaml b/incubator/prd/incubator-infra-gke-datascience-prd-ase1a.yaml new file mode 100644 index 0000000..968e733 --- /dev/null +++ b/incubator/prd/incubator-infra-gke-datascience-prd-ase1a.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-gke-datascience-prd-ase1a + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values/prd/incubator-infra-gke-datascience-prd-ase1a-values.yaml + destination: + name: in-cluster + namespace: argocd-prd diff --git a/incubator/prd/incubator-infra-gke-demand-prd-ase1a-compute-class.yaml b/incubator/prd/incubator-infra-gke-demand-prd-ase1a-compute-class.yaml new file mode 100644 index 0000000..bc36c0c --- /dev/null +++ b/incubator/prd/incubator-infra-gke-demand-prd-ase1a-compute-class.yaml @@ -0,0 +1,17 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-gke-demand-prd-ase1a-compute-class + namespace: argocd-prd +spec: + destination: + name: gke-demand-prd-ase1a + namespace: 'prd-compute-class' + project: default + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-overrides/gke-demand-prd-ase1a/computeclass + syncPolicy: + syncOptions: + - CreateNamespace=true diff --git a/incubator/prd/incubator-infra-gke-demand-prd-ase1a.yaml b/incubator/prd/incubator-infra-gke-demand-prd-ase1a.yaml new file mode 100644 index 0000000..629a70b --- /dev/null +++ b/incubator/prd/incubator-infra-gke-demand-prd-ase1a.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-gke-demand-prd-ase1a + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values/prd/incubator-infra-gke-demand-prd-ase1a-values.yaml + destination: + name: in-cluster + namespace: argocd-prd diff --git a/incubator/prd/incubator-infra-gke-dsgpu-prd-ase1a-compute-class.yaml b/incubator/prd/incubator-infra-gke-dsgpu-prd-ase1a-compute-class.yaml new file mode 100644 index 0000000..e9d4e69 --- /dev/null +++ b/incubator/prd/incubator-infra-gke-dsgpu-prd-ase1a-compute-class.yaml @@ -0,0 +1,17 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-gke-dsgpu-prd-ase1a-compute-class + namespace: argocd-prd +spec: + destination: + name: gke-dsgpu-prd-ase1a + namespace: 'prd-compute-class' + project: dsgpu-ml + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-overrides/gke-dsgpu-prd-ase1a/computeclass + syncPolicy: + syncOptions: + - CreateNamespace=true diff --git a/incubator/prd/incubator-infra-gke-dsgpu-prd-ase1a.yaml b/incubator/prd/incubator-infra-gke-dsgpu-prd-ase1a.yaml new file mode 100644 index 0000000..fd29a75 --- /dev/null +++ b/incubator/prd/incubator-infra-gke-dsgpu-prd-ase1a.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-gke-dsgpu-prd-ase1a + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: dsgpu-ml + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values/prd/incubator-infra-gke-dsgpu-prd-ase1a-values.yaml + destination: + name: in-cluster + namespace: argocd-prd diff --git a/incubator/prd/incubator-infra-gke-farmiso-prd-ase1a.yaml b/incubator/prd/incubator-infra-gke-farmiso-prd-ase1a.yaml new file mode 100644 index 0000000..c8ddc34 --- /dev/null +++ b/incubator/prd/incubator-infra-gke-farmiso-prd-ase1a.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-gke-farmiso-prd-ase1a + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values/prd/incubator-infra-gke-farmiso-prd-ase1a-values.yaml + destination: + name: in-cluster + namespace: argocd-prd diff --git a/incubator/prd/incubator-infra-gke-supply-prd-ase1a-compute-class.yaml b/incubator/prd/incubator-infra-gke-supply-prd-ase1a-compute-class.yaml new file mode 100644 index 0000000..b8762c8 --- /dev/null +++ b/incubator/prd/incubator-infra-gke-supply-prd-ase1a-compute-class.yaml @@ -0,0 +1,17 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-gke-supply-prd-ase1a-compute-class + namespace: argocd-prd +spec: + destination: + name: gke-supply-prd-ase1a + namespace: 'prd-compute-class' + project: default + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-overrides/gke-supply-prd-ase1a/computeclass + syncPolicy: + syncOptions: + - CreateNamespace=true diff --git a/incubator/prd/incubator-infra-gke-supply-prd-ase1a.yaml b/incubator/prd/incubator-infra-gke-supply-prd-ase1a.yaml new file mode 100644 index 0000000..2f3d647 --- /dev/null +++ b/incubator/prd/incubator-infra-gke-supply-prd-ase1a.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-gke-supply-prd-ase1a + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values/prd/incubator-infra-gke-supply-prd-ase1a-values.yaml + destination: + name: in-cluster + namespace: argocd-prd diff --git a/incubator/prd/incubator-infra-k8s-admin-prd-ase1.yaml b/incubator/prd/incubator-infra-k8s-admin-prd-ase1.yaml new file mode 100644 index 0000000..27b02d0 --- /dev/null +++ b/incubator/prd/incubator-infra-k8s-admin-prd-ase1.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-k8s-admin-prd-ase1 + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values/prd/incubator-infra-k8s-admin-prd-ase1-values.yaml + destination: + name: in-cluster + namespace: argocd-prd \ No newline at end of file diff --git a/incubator/prd/incubator-infra-k8s-central-mqkafka-prd-ase1-values.yaml b/incubator/prd/incubator-infra-k8s-central-mqkafka-prd-ase1-values.yaml new file mode 100644 index 0000000..d516af0 --- /dev/null +++ b/incubator/prd/incubator-infra-k8s-central-mqkafka-prd-ase1-values.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-k8s-mqkafka-prd-ase1 + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values/prd/incubator-infra-k8s-central-mqkafka-prd-ase1-values.yaml + destination: + name: in-cluster + namespace: argocd-prd diff --git a/incubator/prd/incubator-infra-k8s-central-prd-ase1-c.yaml b/incubator/prd/incubator-infra-k8s-central-prd-ase1-c.yaml new file mode 100644 index 0000000..1dc805a --- /dev/null +++ b/incubator/prd/incubator-infra-k8s-central-prd-ase1-c.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-k8s-central-prd-ase1-c + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values/prd/incubator-infra-k8s-central-prd-ase1-c-values.yaml + destination: + name: in-cluster + namespace: argocd-prd \ No newline at end of file diff --git a/incubator/prd/incubator-infra-k8s-central-prd-ase1.yaml b/incubator/prd/incubator-infra-k8s-central-prd-ase1.yaml new file mode 100644 index 0000000..a8a6d3a --- /dev/null +++ b/incubator/prd/incubator-infra-k8s-central-prd-ase1.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-k8s-central-prd-ase1 + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values/prd/incubator-infra-k8s-central-prd-ase1-values.yaml + destination: + name: in-cluster + namespace: argocd-prd \ No newline at end of file diff --git a/incubator/prd/incubator-infra-k8s-central-prd-ase1c.yaml b/incubator/prd/incubator-infra-k8s-central-prd-ase1c.yaml new file mode 100644 index 0000000..2f7e79c --- /dev/null +++ b/incubator/prd/incubator-infra-k8s-central-prd-ase1c.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-k8s-central-prd-ase1c + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values/prd/incubator-infra-k8s-central-prd-ase1c-values.yaml + destination: + name: in-cluster + namespace: argocd-prd \ No newline at end of file diff --git a/incubator/prd/incubator-infra-k8s-dataengg-prd-ase1.yaml b/incubator/prd/incubator-infra-k8s-dataengg-prd-ase1.yaml new file mode 100644 index 0000000..8de5543 --- /dev/null +++ b/incubator/prd/incubator-infra-k8s-dataengg-prd-ase1.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-k8s-dataengg-prd-ase1 + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values/prd/incubator-infra-k8s-dataengg-prd-ase1-values.yaml + destination: + name: in-cluster + namespace: argocd-prd \ No newline at end of file diff --git a/incubator/prd/incubator-infra-k8s-dataengg-prd-ase1c.yaml b/incubator/prd/incubator-infra-k8s-dataengg-prd-ase1c.yaml new file mode 100644 index 0000000..e514374 --- /dev/null +++ b/incubator/prd/incubator-infra-k8s-dataengg-prd-ase1c.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-k8s-dataengg-prd-ase1c + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values/prd/incubator-infra-k8s-dataengg-prd-ase1c-values.yaml + destination: + name: in-cluster + namespace: argocd-prd \ No newline at end of file diff --git a/incubator/prd/incubator-infra-k8s-datascience-prd-ase1.yaml b/incubator/prd/incubator-infra-k8s-datascience-prd-ase1.yaml new file mode 100644 index 0000000..4f281ce --- /dev/null +++ b/incubator/prd/incubator-infra-k8s-datascience-prd-ase1.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-k8s-datascience-prd-ase1 + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values/prd/incubator-infra-k8s-datascience-prd-ase1-values.yaml + destination: + name: in-cluster + namespace: argocd-prd \ No newline at end of file diff --git a/incubator/prd/incubator-infra-k8s-datascience-prd-ase1c.yaml b/incubator/prd/incubator-infra-k8s-datascience-prd-ase1c.yaml new file mode 100644 index 0000000..93cf029 --- /dev/null +++ b/incubator/prd/incubator-infra-k8s-datascience-prd-ase1c.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-k8s-datascience-prd-ase1c + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values/prd/incubator-infra-k8s-datascience-prd-ase1c-values.yaml + destination: + name: in-cluster + namespace: argocd-prd diff --git a/incubator/prd/incubator-infra-k8s-datascience-prd-compute-class.yaml b/incubator/prd/incubator-infra-k8s-datascience-prd-compute-class.yaml new file mode 100644 index 0000000..0e0e656 --- /dev/null +++ b/incubator/prd/incubator-infra-k8s-datascience-prd-compute-class.yaml @@ -0,0 +1,17 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-k8s-datascience-prd-compute-class + namespace: argocd-datascience-prd +spec: + destination: + name: k8s-datascience-prd-ase1 + namespace: 'prd-compute-class' + project: default + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: k8s-datascience-prd-ase1/compute-class + syncPolicy: + syncOptions: + - CreateNamespace=true diff --git a/incubator/prd/incubator-infra-k8s-demand-prd-ase1.yaml b/incubator/prd/incubator-infra-k8s-demand-prd-ase1.yaml new file mode 100644 index 0000000..ca444db --- /dev/null +++ b/incubator/prd/incubator-infra-k8s-demand-prd-ase1.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-k8s-demand-prd-ase1 + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values/prd/incubator-infra-k8s-demand-prd-ase1-values.yaml + destination: + name: in-cluster + namespace: argocd-prd \ No newline at end of file diff --git a/incubator/prd/incubator-infra-k8s-demand-prd-ase1c.yaml b/incubator/prd/incubator-infra-k8s-demand-prd-ase1c.yaml new file mode 100644 index 0000000..970dad7 --- /dev/null +++ b/incubator/prd/incubator-infra-k8s-demand-prd-ase1c.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-k8s-demand-prd-ase1c + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values/prd/incubator-infra-k8s-demand-prd-ase1c-values.yaml + destination: + name: in-cluster + namespace: argocd-prd \ No newline at end of file diff --git a/incubator/prd/incubator-infra-k8s-dengspark-di-prd-ase1.yaml b/incubator/prd/incubator-infra-k8s-dengspark-di-prd-ase1.yaml new file mode 100644 index 0000000..37c16e1 --- /dev/null +++ b/incubator/prd/incubator-infra-k8s-dengspark-di-prd-ase1.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-k8s-dengspark-di-prd-ase1 + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values/prd/incubator-infra-k8s-dengspark-di-prd-ase1-values.yaml + destination: + name: in-cluster + namespace: argocd-prd diff --git a/incubator/prd/incubator-infra-k8s-dengspark-notebook-prd-ase1.yaml b/incubator/prd/incubator-infra-k8s-dengspark-notebook-prd-ase1.yaml new file mode 100644 index 0000000..ea04f3f --- /dev/null +++ b/incubator/prd/incubator-infra-k8s-dengspark-notebook-prd-ase1.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-k8s-dengspark-notebook-prd-ase1 + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values/prd/incubator-infra-k8s-dengspark-notebook-prd-ase1-values.yaml + destination: + name: in-cluster + namespace: argocd-prd diff --git a/incubator/prd/incubator-infra-k8s-dengspark-prd-ase1.yaml b/incubator/prd/incubator-infra-k8s-dengspark-prd-ase1.yaml new file mode 100644 index 0000000..efbc3bf --- /dev/null +++ b/incubator/prd/incubator-infra-k8s-dengspark-prd-ase1.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-k8s-dengspark-prd-ase1 + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values/prd/incubator-infra-k8s-dengspark-prd-ase1-values.yaml + destination: + name: in-cluster + namespace: argocd-prd diff --git a/incubator/prd/incubator-infra-k8s-dscispark-prd-ase1.yaml b/incubator/prd/incubator-infra-k8s-dscispark-prd-ase1.yaml new file mode 100644 index 0000000..162397f --- /dev/null +++ b/incubator/prd/incubator-infra-k8s-dscispark-prd-ase1.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-k8s-dscispark-prd-ase1 + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values/prd/incubator-infra-k8s-dscispark-prd-ase1-values.yaml + destination: + name: in-cluster + namespace: argocd-prd diff --git a/incubator/prd/incubator-infra-k8s-dsgpu-prd-ase1.yaml b/incubator/prd/incubator-infra-k8s-dsgpu-prd-ase1.yaml new file mode 100644 index 0000000..c7b43e0 --- /dev/null +++ b/incubator/prd/incubator-infra-k8s-dsgpu-prd-ase1.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-k8s-dsgpu-prd-ase1 + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: dsgpu-ml + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values/prd/incubator-infra-k8s-dsgpu-prd-ase1-values.yaml + destination: + name: in-cluster + namespace: argocd-prd diff --git a/incubator/prd/incubator-infra-k8s-farmiso-prd-ase1.yaml b/incubator/prd/incubator-infra-k8s-farmiso-prd-ase1.yaml new file mode 100644 index 0000000..dc306bc --- /dev/null +++ b/incubator/prd/incubator-infra-k8s-farmiso-prd-ase1.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-k8s-farmiso-prd-ase1 + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values/prd/incubator-infra-k8s-farmiso-prd-ase1-values.yaml + destination: + name: in-cluster + namespace: argocd-prd \ No newline at end of file diff --git a/incubator/prd/incubator-infra-k8s-ml-platform-prd-ase1.yaml b/incubator/prd/incubator-infra-k8s-ml-platform-prd-ase1.yaml new file mode 100644 index 0000000..eb97e58 --- /dev/null +++ b/incubator/prd/incubator-infra-k8s-ml-platform-prd-ase1.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-k8s-ml-platform-prd-ase1 + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values/prd/incubator-infra-k8s-ml-platform-prd-ase1-values.yaml + destination: + name: in-cluster + namespace: argocd-prd \ No newline at end of file diff --git a/incubator/prd/incubator-infra-k8s-supply-prd-ase1.yaml b/incubator/prd/incubator-infra-k8s-supply-prd-ase1.yaml new file mode 100644 index 0000000..5de34e3 --- /dev/null +++ b/incubator/prd/incubator-infra-k8s-supply-prd-ase1.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-k8s-supply-prd-ase1 + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values/prd/incubator-infra-k8s-supply-prd-ase1-values.yaml + destination: + name: in-cluster + namespace: argocd-prd \ No newline at end of file diff --git a/incubator/prd/incubator-infra-k8s-supply-prd-ase1c.yaml b/incubator/prd/incubator-infra-k8s-supply-prd-ase1c.yaml new file mode 100644 index 0000000..4ee21ce --- /dev/null +++ b/incubator/prd/incubator-infra-k8s-supply-prd-ase1c.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra-k8s-supply-prd-ase1c + namespace: argocd-prd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: main + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values/prd/incubator-infra-k8s-supply-prd-ase1c-values.yaml + destination: + name: in-cluster + namespace: argocd-prd \ No newline at end of file diff --git a/index.md b/index.md new file mode 100644 index 0000000..4df582c --- /dev/null +++ b/index.md @@ -0,0 +1,99 @@ +# Documentation Index — `devops-infra-argo-config` + +> Navigation guide for agents and humans working in this repository. + +--- + +## Layout + +```text +devops-infra-argo-config/ +├── CLAUDE.md ← Agent entry point (read first) +├── index.md ← This file +├── repository.yaml ← Ownership metadata (automation-owned, do not hand-edit) +│ +├── docs/ +│ ├── global/ +│ │ ├── SANCTITY_RULES.md ← Non-negotiable rules R1–R12 +│ │ ├── AGENT_BOUNDARIES.md ← Layer 1-T map, blast radii, what agents may/may not touch +│ │ ├── escalation-matrix.md ← When to page a human and who to contact +│ │ └── coding-guidelines/ +│ │ ├── infra-argo.md ← Combined YAML authoring conventions (values files + appSpec) +│ │ ├── argocd.md ← ArgoCD Application manifest conventions (incubator files) +│ │ └── helm.md ← Helm values file conventions (clusterSpec, teamSpec, appSpec) +│ │ +│ ├── platform/ +│ │ ├── procedures/ +│ │ │ ├── add-tool-to-cluster.md ← Add, update, or remove an appSpec entry +│ │ │ ├── add-new-cluster.md ← Onboard a new cluster (incubator + values files) +│ │ │ ├── upgrade-chart-version.md ← Change chartDir for one or many clusters +│ │ │ ├── deboard-tool-from-cluster.md ← Safely remove a tool from a cluster +│ │ │ └── fleet-wide-tool-rollout.md ← Add a tool to multiple clusters in one PR +│ │ │ +│ │ ├── runbooks/ +│ │ │ ├── argocd-sync-failure.md ← Sync failure decision tree +│ │ │ ├── render-failure.md ← Helm render errors (ComparisonError) +│ │ │ ├── values-drift.md ← Detect and fix inconsistencies across cluster values files +│ │ │ └── deployment-stuck.md ← Pod pending/crashloop after sync +│ │ │ +│ │ └── schemas/ +│ │ ├── values-file-schema.md ← Annotated appSpec schema — every field explained +│ │ └── incubator-values-schema.md ← Incubator Application YAML field reference +│ │ +│ └── golden-prs.md ← Golden PRs for benchmark suite (generated) +│ +├── skills/ +│ └── infra/ +│ ├── add-tool.md ← Agent skill: add tool to cluster +│ ├── upgrade-chart-version.md ← Agent skill: bump chartDir version +│ ├── fleet-wide-rollout.md ← Agent skill: roll out a tool across many clusters +│ └── onboard-cluster.md ← Agent skill: onboard a new cluster +│ +├── wiki/ +│ ├── entities/ +│ │ └── DevOps Infra ArgoCD Config.md ← Wiki entity page +│ └── analyses/ +│ ├── ADR-I1-generic-chart-per-cluster.md ← ADR: why one generic Helm chart +│ └── ADR-I2-incubator-pattern.md ← ADR: why the incubator + App-of-Apps pattern +│ +├── generic-argo-apps-chart/ ← Helm chart: renders child Applications from appSpec +├── incubator// ← Parent ArgoCD Application per cluster +├── values// ← appSpec lists defining which tools deploy per cluster +├── projects/ ← ArgoCD AppProject definitions (sre, sec) +├── external-name-service-incubator/ ← Cross-cluster DNS routing Application manifests +├── external-name-service-template/ ← Helm chart for ExternalName services +└── external-name-service-values/ ← MCS topology values per zone +``` + +--- + +## Quick navigation + +### For agents + +1. Read [CLAUDE.md](CLAUDE.md) — repo role, naming conventions, forbidden actions, validation commands. +2. Read [docs/global/AGENT_BOUNDARIES.md](docs/global/AGENT_BOUNDARIES.md) — what you may and may not touch. +3. Read [docs/global/SANCTITY_RULES.md](docs/global/SANCTITY_RULES.md) — non-negotiable rules. + +### For human PR reviewers + +1. Skim [docs/global/coding-guidelines/infra-argo.md](docs/global/coding-guidelines/infra-argo.md) — YAML conventions. +2. Check [docs/platform/schemas/values-file-schema.md](docs/platform/schemas/values-file-schema.md) — appSpec field reference. + +### By task + +| I want to... | Read this | +| ------------ | --------- | +| Add a tool to a cluster | [docs/platform/procedures/add-tool-to-cluster.md](docs/platform/procedures/add-tool-to-cluster.md) | +| Upgrade a chart version | [docs/platform/procedures/upgrade-chart-version.md](docs/platform/procedures/upgrade-chart-version.md) | +| Deboard a tool from a cluster | [docs/platform/procedures/deboard-tool-from-cluster.md](docs/platform/procedures/deboard-tool-from-cluster.md) | +| Roll out a tool across all clusters | [docs/platform/procedures/fleet-wide-tool-rollout.md](docs/platform/procedures/fleet-wide-tool-rollout.md) | +| Onboard a new cluster | [docs/platform/procedures/add-new-cluster.md](docs/platform/procedures/add-new-cluster.md) | +| Debug a sync failure | [docs/platform/runbooks/argocd-sync-failure.md](docs/platform/runbooks/argocd-sync-failure.md) | +| Debug a Helm render error | [docs/platform/runbooks/render-failure.md](docs/platform/runbooks/render-failure.md) | +| Find inconsistencies across clusters | [docs/platform/runbooks/values-drift.md](docs/platform/runbooks/values-drift.md) | +| Debug a stuck deployment | [docs/platform/runbooks/deployment-stuck.md](docs/platform/runbooks/deployment-stuck.md) | +| Understand when to escalate | [docs/global/escalation-matrix.md](docs/global/escalation-matrix.md) | +| Understand why we use one generic chart | [wiki/analyses/ADR-I1-generic-chart-per-cluster.md](wiki/analyses/ADR-I1-generic-chart-per-cluster.md) | +| Understand the incubator pattern | [wiki/analyses/ADR-I2-incubator-pattern.md](wiki/analyses/ADR-I2-incubator-pattern.md) | +| See repo ownership and relationships | [wiki/entities/DevOps Infra ArgoCD Config.md](wiki/entities/DevOps%20Infra%20ArgoCD%20Config.md) | diff --git a/post-commit-scripts/._commit-metric.sh b/post-commit-scripts/._commit-metric.sh new file mode 100644 index 0000000..f79ec62 Binary files /dev/null and b/post-commit-scripts/._commit-metric.sh differ diff --git a/post-commit-scripts/._runner.sh b/post-commit-scripts/._runner.sh new file mode 100644 index 0000000..df18094 Binary files /dev/null and b/post-commit-scripts/._runner.sh differ diff --git a/post-commit-scripts/commit-metric.sh b/post-commit-scripts/commit-metric.sh new file mode 100644 index 0000000..0689961 --- /dev/null +++ b/post-commit-scripts/commit-metric.sh @@ -0,0 +1,1551 @@ +#!/usr/bin/env bash +# commit-metric.sh — Cursor AI Commit Metric Collector (Bash port of commit-metric.go) +# +# Architecture: Two-phase execution triggered by post-commit git hook. +# +# Phase 1 ("start") — Runs synchronously in the hook (fast): +# 1. Checks if this is a normal commit (skips rebase/merge). +# 2. Gets the latest commit hash from git. +# 3. Writes commit info to a temp file. +# 4. Spawns itself as "continue" in a detached background process. +# +# Phase 2 ("continue") — Runs in background: +# 1. Polls Cursor DB until commit hash appears (500ms interval, 3 min max). +# 2. On match: builds request payload, sends to API. +# 3. On timeout: calls /error endpoint with commit hash. +# 4. Uploads dangling prompt metrics for repos matching the commit. +# 5. Retries failed requests from previous runs. +# +# Dependencies: bash 4+, sqlite3, jq, curl, git + +set -euo pipefail + +# ============================================================ +# Dependency check +# ============================================================ + +check_dependencies() { + mkdir -p ~/bin + + # Detect CPU architecture (Intel vs Apple Silicon) + ARCH=$(uname -m) + if [[ "$ARCH" == "arm64" ]]; then + JQ_URL="https://github.com/stedolan/jq/releases/latest/download/jq-macos-arm64" + elif [[ "$ARCH" == "x86_64" ]]; then + JQ_URL="https://github.com/stedolan/jq/releases/latest/download/jq-osx-amd64" + else + log_warn "Unsupported architecture: $ARCH" + return 1 + fi + + # Download jq if not installed + if ! command -v jq >/dev/null 2>&1; then + curl -fsSL -o ~/bin/jq "$JQ_URL" + chmod +x ~/bin/jq + fi + + # Add to PATH + export PATH="$HOME/bin:$PATH" + + # These should always be present on macOS/Linux + local missing=() + for cmd in sqlite3 curl git; do + if ! command -v "$cmd" >/dev/null 2>&1; then + missing+=("$cmd") + fi + done + if [ ${#missing[@]} -gt 0 ]; then + log_warn "Missing required dependencies: ${missing[*]}" + return 1 + fi +} +# check_dependencies is called from main after parsing the command + +# ============================================================ +# Configuration +# ============================================================ + +# API endpoint to send commit metrics +API_ENDPOINT="https://cursor-server.meeshogcp.in/api/v1/add-commit-metrics" + +# Error API endpoint (called on polling timeout) +ERROR_API_ENDPOINT="https://cursor-server.meeshogcp.in/api/v1/error" + +# Set to true to skip API call and only save locally (for testing) +DRY_RUN=false + +# Database configuration +DB_RELATIVE_PATH="Library/Application Support/Cursor/User/globalStorage/state.vscdb" +TABLE_NAME="ItemTable" +KEY_NAME="aiCodeTracking.recentCommit" + +# SQLite configuration +BUSY_TIMEOUT_MS=3000 +MAX_RETRIES=3 +INITIAL_RETRY_DELAY_MS=500 +MAX_RETRY_DELAY_MS=2000 + +# API retry configuration +API_MAX_ATTEMPTS=3 +API_INITIAL_RETRY_DELAY_MS=1000 +API_MAX_RETRY_DELAY_MS=5000 + +# DB polling configuration (post-commit: wait for Cursor to update DB) +COMMIT_POLL_INTERVAL_MS=10000 +COMMIT_MAX_WAIT_S=120 + +# Storage paths (relative to $HOME) +FAILED_COMMITS_FILE=".cursor-metrics/commit-metric/failed.json" +METRICS_OUTPUT_DIR=".cursor-metrics/commit-metric/data" +TEMP_DIR=".cursor-metrics/commit-metric/tmp" +LOG_DIR_RELATIVE=".cursor-metrics/commit-metric/logs" +REBASE_MAP_FILE=".cursor-metrics/commit-metric/rebase-map.json" + +# ---- Dangling prompt metrics configuration ---- +PROMPT_API_ENDPOINT="https://cursor-server.meeshogcp.in/api/v1/add-prompt-metrics" +PROMPT_DB_TABLE="cursorDiskKV" +PROMPT_PERSISTENT_STORAGE_DIR=".cursor-metrics/prompt-metric/composer-partialDiffFates" +PROMPT_FAILED_REQUESTS_FILE=".cursor-metrics/prompt-metric/failed.json" + +# ============================================================ +# Logging +# ============================================================ + +LOG_FILE="" + +setup_logging() { + local log_dir="${HOME}/${LOG_DIR_RELATIVE}" + mkdir -p "$log_dir" 2>/dev/null || true + LOG_FILE="${log_dir}/commit-metric.log" +} + +# logWarn writes a timestamped warning to the log file with [commit-metric] prefix. +# Falls back to stderr if the log file is not available. +log_warn() { + local fmt_str="$1"; shift + local msg + # shellcheck disable=SC2059 + msg=$(printf "$fmt_str" "$@") + local line + line="[commit-metric] $(date -u +"%Y-%m-%dT%H:%M:%S%z") ${msg}" + if [ -n "$LOG_FILE" ]; then + echo "$line" >> "$LOG_FILE" 2>/dev/null || echo "$line" >&2 + else + echo "$line" >&2 + fi +} + +# ============================================================ +# Utility functions +# ============================================================ + +# min_val returns the smaller of two integers +min_val() { + local a=$1 b=$2 + if [ "$a" -lt "$b" ]; then echo "$a"; else echo "$b"; fi +} + +# sleep_ms sleeps for N milliseconds +sleep_ms() { + local ms=$1 + local secs + secs=$(awk "BEGIN { printf \"%.3f\", $ms / 1000 }") + sleep "$secs" +} + +# get_db_path returns the full path to the Cursor state database +get_db_path() { + echo "${HOME}/${DB_RELATIVE_PATH}" +} + +# ============================================================ +# Value decoding +# ============================================================ + +# is_hex_string checks if a string is hex-encoded (even length, only hex chars) +is_hex_string() { + local s="$1" + local len=${#s} + if [ "$len" -eq 0 ] || [ $(( len % 2 )) -ne 0 ]; then + return 1 + fi + # Check all characters are hex + if [[ "$s" =~ ^[0-9a-fA-F]+$ ]]; then + return 0 + fi + return 1 +} + +# hex_decode reads hex from stdin and outputs raw bytes. +# Uses xxd, perl, or python3 (whichever is available). +hex_decode() { + if command -v xxd >/dev/null 2>&1; then + xxd -r -p + elif command -v perl >/dev/null 2>&1; then + perl -pe 's/(..)/chr(hex($1))/ge' + elif command -v python3 >/dev/null 2>&1; then + python3 -c "import sys,binascii; sys.stdout.buffer.write(binascii.unhexlify(sys.stdin.read().strip()))" + else + return 1 + fi +} + +# decode_value decodes a raw DB value (could be JSON or hex-encoded) to JSON bytes. +# Mirrors Go's decodeValue function. +decode_value() { + local raw="$1" + if [ -z "$raw" ]; then + return 1 + fi + # Check if valid JSON + if echo "$raw" | jq empty 2>/dev/null; then + echo "$raw" + return 0 + fi + # Check if hex-encoded + if is_hex_string "$raw"; then + local decoded + if decoded=$(echo "$raw" | hex_decode 2>/dev/null) && [ -n "$decoded" ]; then + # Verify it's valid JSON (UTF-8 check implicit) + if echo "$decoded" | jq empty 2>/dev/null; then + echo "$decoded" + return 0 + fi + fi + fi + return 1 +} + +# ============================================================ +# DB helpers +# ============================================================ + +# read_db_value reads a single value from the DB by exact key. +# Uses typeof() to handle BLOB values safely (returns hex for BLOBs). +# PRAGMAs output is suppressed via .output /dev/null so it doesn't mix with query results. +read_db_value() { + local db_path="$1" + local table="$2" + local key="$3" + + sqlite3 -readonly "$db_path" 2>/dev/null </dev/null || echo "$(date +%s)000000000") + local file_name="${commit_hash}_${timestamp_ns}.json" + local file_path="${dir}/${file_name}" + + echo "$commit_data" > "$file_path" + echo "$file_path" +} + +# ============================================================ +# Git helpers +# ============================================================ + +# getGitEmail retrieves the user's email from git config +get_git_email() { + local email + email=$(git config --get user.email 2>/dev/null || true) + if [ -z "$email" ]; then + email=$(git config --global --get user.email 2>/dev/null || true) + fi + echo "$email" +} + +# epochMsToUTCString converts epoch milliseconds to UTC string with ms precision. +# Output format: "2006-01-02T15:04:05.000Z" +epoch_ms_to_utc_string() { + local epoch_ms="$1" + if [ -z "$epoch_ms" ] || [ "$epoch_ms" = "0" ] || [ "$epoch_ms" = "null" ]; then + date -u +"%Y-%m-%dT%H:%M:%S.000Z" + return + fi + + local seconds=$(( epoch_ms / 1000 )) + local millis=$(( epoch_ms % 1000 )) + local millis_padded + millis_padded=$(printf "%03d" "$millis") + + local formatted + # GNU date + if formatted=$(date -u -d "@${seconds}" +"%Y-%m-%dT%H:%M:%S" 2>/dev/null); then + echo "${formatted}.${millis_padded}Z" + # BSD/macOS date + elif formatted=$(date -u -r "${seconds}" +"%Y-%m-%dT%H:%M:%S" 2>/dev/null); then + echo "${formatted}.${millis_padded}Z" + else + date -u +"%Y-%m-%dT%H:%M:%S.000Z" + fi +} + +# toUTCString parses any time string (e.g., git's ISO 8601 with timezone) and +# converts it to UTC with ms precision. Returns empty string on parse failure. +to_utc_string() { + local ts="$1" + if [ -z "$ts" ]; then + echo "" + return + fi + + local parsed + # GNU date: handles "+05:30" colon timezone natively + if parsed=$(date -u -d "$ts" +"%Y-%m-%dT%H:%M:%S.000Z" 2>/dev/null); then + echo "$parsed" + return + fi + + # BSD/macOS date: %z expects "+0530" not "+05:30", so strip the colon + # from the timezone offset before parsing. + # "2026-02-15T01:26:12+05:30" -> "2026-02-15T01:26:12+0530" + local ts_nocolon="$ts" + if [[ "$ts" =~ ^(.+)([+-][0-9]{2}):([0-9]{2})$ ]]; then + ts_nocolon="${BASH_REMATCH[1]}${BASH_REMATCH[2]}${BASH_REMATCH[3]}" + fi + if parsed=$(date -u -jf "%Y-%m-%dT%H:%M:%S%z" "$ts_nocolon" +"%Y-%m-%dT%H:%M:%S.000Z" 2>/dev/null); then + echo "$parsed" + return + fi + + # Return as-is if unparseable + echo "$ts" +} + +# is_normal_commit returns 0 for normal commits, 1 for rebase/merge/cherry-pick. +# For rebase and cherry-pick, records the original→replayed hash mapping before skipping. +is_normal_commit() { + local git_dir + git_dir=$(git rev-parse --git-dir 2>/dev/null) || return 1 + + # Skip during rebase (interactive or non-interactive) + if [ -d "${git_dir}/rebase-merge" ] || [ -d "${git_dir}/rebase-apply" ]; then + local original_hash="" + if [ -d "${git_dir}/rebase-merge" ] && [ -f "${git_dir}/rebase-merge/done" ]; then + original_hash=$(tail -1 "${git_dir}/rebase-merge/done" 2>/dev/null | awk '{print $2}') + fi + if [ -z "$original_hash" ] && [ -f "${git_dir}/rebase-apply/original-commit" ]; then + original_hash=$(cat "${git_dir}/rebase-apply/original-commit" 2>/dev/null | tr -d '[:space:]') + fi + [ -n "$original_hash" ] && record_commit_hash_mapping "$original_hash" + return 1 + fi + + # Skip during cherry-pick (CHERRY_PICK_HEAD exists until post-commit cleanup) + if [ -f "${git_dir}/CHERRY_PICK_HEAD" ]; then + local original_hash + original_hash=$(cat "${git_dir}/CHERRY_PICK_HEAD" 2>/dev/null | tr -d '[:space:]') + [ -n "$original_hash" ] && record_commit_hash_mapping "$original_hash" + return 1 + fi + + # Skip merge commits (HEAD has more than 1 parent) + if git rev-parse HEAD^2 >/dev/null 2>&1; then + return 1 + fi + + return 0 +} + +# record_commit_hash_mapping saves replayed_hash→original_hash mapping. +# Used by rebase and cherry-pick to track which original commit was replayed. +# Stored at ~/ as a JSON object keyed by replayed hash. +record_commit_hash_mapping() { + local original_hash="$1" + + # Resolve short hash to full hash + local full_hash + full_hash=$(git rev-parse "$original_hash" 2>/dev/null) || full_hash="$original_hash" + original_hash="$full_hash" + + local replayed_hash + replayed_hash=$(git rev-parse HEAD 2>/dev/null) || return 0 + + local repo_path + repo_path=$(git rev-parse --show-toplevel 2>/dev/null) || return 0 + local repo_name + repo_name=$(get_repo_name_from_path "$repo_path") + local git_dir + git_dir=$(git -C "$repo_path" rev-parse --git-dir 2>/dev/null) || return 0 + local branch_name="" + if [ -f "${git_dir}/rebase-merge/head-name" ]; then + branch_name=$(cat "${git_dir}/rebase-merge/head-name" 2>/dev/null | sed 's|^refs/heads/||') + elif [ -f "${git_dir}/rebase-apply/head-name" ]; then + branch_name=$(cat "${git_dir}/rebase-apply/head-name" 2>/dev/null | sed 's|^refs/heads/||') + fi + if [ -z "$branch_name" ]; then + branch_name=$(git -C "$repo_path" rev-parse --abbrev-ref HEAD 2>/dev/null || true) + fi + + local map_file="${HOME}/${REBASE_MAP_FILE}" + mkdir -p "$(dirname "$map_file")" 2>/dev/null || true + + local current_map="{}" + if [ -f "$map_file" ]; then + current_map=$(cat "$map_file" 2>/dev/null) || current_map="{}" + if ! echo "$current_map" | jq empty 2>/dev/null; then + current_map="{}" + fi + fi + + current_map=$(echo "$current_map" | jq \ + --arg replayed "$replayed_hash" \ + --arg orig "$original_hash" \ + --arg repo "$repo_name" \ + --arg branch "$branch_name" \ + '. + {($replayed): {original: $orig, repo: $repo, branch: $branch}}') + + echo "$current_map" | jq '.' > "$map_file" 2>/dev/null || true + + log_warn "commit mapping recorded: %s → %s (%s)" "$replayed_hash" "$original_hash" "$repo_name" +} + +# getRepoNameFromPath tries git remote origin URL first, falls back to basename. +get_repo_name_from_path() { + local root_path="$1" + + local url + url=$(git -C "$root_path" remote get-url origin 2>/dev/null || true) + if [ -n "$url" ]; then + local name + name=$(parse_repo_name_from_url "$url") + if [ -n "$name" ]; then + echo "$name" + return + fi + fi + + basename "$root_path" +} + +# parseRepoNameFromURL extracts "org/repo" from a git remote URL. +parse_repo_name_from_url() { + local raw_url="$1" + + # SSH: git@github.com:org/repo.git + if [[ "$raw_url" == git@* ]]; then + local after_colon="${raw_url#*:}" + after_colon="${after_colon%.git}" + echo "$after_colon" + return + fi + + # HTTPS: https://github.com/org/repo.git + raw_url="${raw_url%.git}" + local second_last last + last=$(basename "$raw_url") + second_last=$(basename "$(dirname "$raw_url")") + if [ -n "$second_last" ] && [ -n "$last" ]; then + echo "${second_last}/${last}" + return + fi +} + +# ============================================================ +# Repo path resolution via Cursor's repositoryTracker.paths +# ============================================================ + +# resolve_repo_local_path finds the local filesystem path for a repo name +# by searching Cursor's repositoryTracker.paths. +# +# Matching: CursorCommitData.RepoName (e.g. "meesho/cursor-metrics-instrumentation") +# is matched case-insensitively against tracker keys (e.g. "github.com/meesho/cursor-metrics-instrumentation") +# using suffix matching. +resolve_repo_local_path() { + local repo_name="$1" + local tracker_paths_json="$2" + + if [ -z "$repo_name" ] || [ "$tracker_paths_json" = "{}" ] || [ -z "$tracker_paths_json" ]; then + echo "" + return + fi + + local repo_name_lower + repo_name_lower=$(echo "$repo_name" | tr '[:upper:]' '[:lower:]') + + # Iterate tracker paths keys and find suffix match + local result + result=$(echo "$tracker_paths_json" | jq -r --arg rn "$repo_name_lower" ' + to_entries[] | + select( + (.key | ascii_downcase) as $k | + ($k | endswith("/" + $rn)) or ($k == $rn) + ) | .value.localPath // empty + ' 2>/dev/null | head -1) + + if [ -n "$result" ]; then + # Remove file:// prefix + echo "${result#file://}" + fi +} + +# ============================================================ +# Convert to request +# ============================================================ + +# convertToRequest converts CursorDB data to the server request format. +# repo_path is passed directly from run_continue (known from the post-commit hook). +convert_to_request() { + local commit_data_json="$1" + local repo_path="$2" + + # Get user email from git config + local email + email=$(get_git_email) + if [ -z "$email" ]; then + log_warn "could not determine git user email" + return 1 + fi + + # Extract fields from commit data + local commit_hash repo_name branch_name + local tab_lines_added tab_lines_deleted composer_lines_added composer_lines_deleted + local lines_added lines_deleted + + commit_hash=$(echo "$commit_data_json" | jq -r '.commitHash // ""') + repo_name=$(echo "$commit_data_json" | jq -r '.repoName // ""') + branch_name=$(echo "$commit_data_json" | jq -r '.branchName // ""') + tab_lines_added=$(echo "$commit_data_json" | jq -r '.tabLinesAdded // 0') + tab_lines_deleted=$(echo "$commit_data_json" | jq -r '.tabLinesDeleted // 0') + composer_lines_added=$(echo "$commit_data_json" | jq -r '.composerLinesAdded // 0') + composer_lines_deleted=$(echo "$commit_data_json" | jq -r '.composerLinesDeleted // 0') + lines_added=$(echo "$commit_data_json" | jq -r '.linesAdded // 0') + lines_deleted=$(echo "$commit_data_json" | jq -r '.linesDeleted // 0') + + # Get commit timestamp from git + local timestamp_str="" + if [ -n "$commit_hash" ]; then + local git_ts + git_ts=$(git -C "$repo_path" log -1 --format="%aI" "$commit_hash" 2>/dev/null || true) + if [ -n "$git_ts" ]; then + timestamp_str=$(to_utc_string "$git_ts") + fi + fi + + # Get parent commit timestamp from git + local parent_timestamp="" + if [ -n "$commit_hash" ]; then + local parent_ts + parent_ts=$(git -C "$repo_path" log -1 --format="%aI" "${commit_hash}~1" 2>/dev/null || true) + if [ -n "$parent_ts" ]; then + parent_timestamp=$(to_utc_string "$parent_ts") + else + parent_timestamp="$timestamp_str" + fi + fi + + # Build request JSON + jq -n \ + --arg email "$email" \ + --arg commit_hash "$commit_hash" \ + --arg timestamp "$timestamp_str" \ + --arg parent_commit_timestamp "$parent_timestamp" \ + --arg repo "$repo_name" \ + --arg branch "$branch_name" \ + --argjson tabLinesAdded "$tab_lines_added" \ + --argjson tabLinesDeleted "$tab_lines_deleted" \ + --argjson composerLinesAdded "$composer_lines_added" \ + --argjson composerLinesDeleted "$composer_lines_deleted" \ + --argjson linesAdded "$lines_added" \ + --argjson linesDeleted "$lines_deleted" \ + '{ + email: $email, + commit_hash: $commit_hash, + timestamp: $timestamp, + parent_commit_timestamp: $parent_commit_timestamp, + repo: $repo, + branch: $branch, + tabLinesAdded: $tabLinesAdded, + tabLinesDeleted: $tabLinesDeleted, + composerLinesAdded: $composerLinesAdded, + composerLinesDeleted: $composerLinesDeleted, + linesAdded: $linesAdded, + linesDeleted: $linesDeleted, + metadata: null + }' +} + +# ============================================================ +# Local metrics storage +# ============================================================ + +# saveMetricsLocally saves the commit metrics to a local JSON file. +# Path: ~//.json +save_metrics_locally() { + local request_json="$1" + + local dir="${HOME}/${METRICS_OUTPUT_DIR}" + mkdir -p "$dir" + + local commit_hash + commit_hash=$(echo "$request_json" | jq -r '.commit_hash // "unknown"') + local file_path="${dir}/${commit_hash}.json" + + # Idempotent — skip if already written + if [ -f "$file_path" ]; then + printf "Metrics already saved locally: %s\n" "$file_path" + return 0 + fi + + echo "$request_json" | jq '.' > "$file_path" + printf "Metrics saved locally: %s\n" "$file_path" +} + +# ============================================================ +# Failed requests persistence +# ============================================================ + +get_failed_commits_path() { + echo "${HOME}/${FAILED_COMMITS_FILE}" +} + +# load_failed_commits reads previously failed commits from the cache file. +# Concurrency is handled by the caller via acquire_lock. +load_failed_commits() { + local path + path=$(get_failed_commits_path) + if [ ! -f "$path" ]; then + echo "[]" + return + fi + + local data + data=$(cat "$path" 2>/dev/null || true) + + if [ -n "$data" ] && echo "$data" | jq empty 2>/dev/null; then + echo "$data" + else + echo "[]" + fi +} + +# saveFailedCommits writes the failed batch to the cache file. +# Pass empty or "[]" to clear the file (on success). +save_failed_commits() { + local commits_json="$1" + local path + path=$(get_failed_commits_path) + + if [ -z "$commits_json" ] || [ "$commits_json" = "[]" ] || [ "$commits_json" = "null" ]; then + rm -f "$path" 2>/dev/null || true + return + fi + + mkdir -p "$(dirname "$path")" 2>/dev/null || true + echo "$commits_json" | jq '.' > "$path" 2>/dev/null || true +} + +# ============================================================ +# Lock helpers +# ============================================================ + +CONTINUE_LOCK_DIR="${HOME}/.cursor-metrics/commit-metric/continue.lock" +DANGLING_LOCK_DIR="${HOME}/.cursor-metrics/prompt-metric/continue.lock" + +acquire_lock() { + local lock_dir="$1" + mkdir -p "$(dirname "$lock_dir")" 2>/dev/null || true + + local poll_ms=500 + local stale_threshold_s=120 + local max_wait_s=180 + local start_time + start_time=$(date +%s) + + while ! mkdir "$lock_dir" 2>/dev/null; do + local now + now=$(date +%s) + + if [ $(( now - start_time )) -gt "$max_wait_s" ]; then + log_warn "lock wait exceeded %ds, force-removing: %s" "$max_wait_s" "$lock_dir" + rmdir "$lock_dir" 2>/dev/null || true + continue + fi + + if [ -d "$lock_dir" ]; then + local lock_mtime + if lock_mtime=$(stat -f "%m" "$lock_dir" 2>/dev/null) || + lock_mtime=$(stat -c "%Y" "$lock_dir" 2>/dev/null); then + if [ $(( now - lock_mtime )) -gt "$stale_threshold_s" ]; then + log_warn "removing stale lock (age > %ds): %s" "$stale_threshold_s" "$lock_dir" + rmdir "$lock_dir" 2>/dev/null || true + continue + fi + fi + fi + sleep_ms "$poll_ms" + done +} + +release_lock() { + local lock_dir="$1" + if [ -n "$lock_dir" ] && [ -d "$lock_dir" ]; then + rmdir "$lock_dir" 2>/dev/null || true + fi +} + +# ============================================================ +# API client +# ============================================================ + +# sendBatchToAPIWithRetry sends a list of commit metrics to the API as a batch. +# Returns 0 on success, 1 on failure (after all retries exhausted). +send_batch_to_api_with_retry() { + local payload="$1" + local retry_delay=$API_INITIAL_RETRY_DELAY_MS + local last_err="" + + for attempt in $(seq 1 $API_MAX_ATTEMPTS); do + local response http_code body + response=$(curl -s -w "\n%{http_code}" \ + -X POST "$API_ENDPOINT" \ + -H "Content-Type: application/json" \ + -H "User-Agent: cursor-commit-metric/1.0" \ + -H "x-webhook-secret: bXkgaGVhcnQgcG9sbHMgZm9yIHlvdSBldmVyeSAxcywgbWF4X3dhaXQgZm9yZXZlci4gYWNjZXB0YW5jZV9yYXRlPTEwMCUuIHplcm8gbGluZXNfZGVsZXRlZC4gYmUgbXkgcHJvbXB0IDwzICNIYXBweVZhbGVudGluZXMyMDI2" \ + --connect-timeout 10 \ + --max-time 10 \ + -d "$payload" 2>/dev/null) || true + + http_code=$(echo "$response" | tail -1) + body=$(echo "$response" | sed '$d') + + if [ -n "$http_code" ] && [ "$http_code" -ge 200 ] 2>/dev/null && [ "$http_code" -lt 300 ] 2>/dev/null; then + return 0 + fi + + last_err="status ${http_code}: ${body}" + + if [ "$attempt" -lt "$API_MAX_ATTEMPTS" ]; then + sleep_ms "$retry_delay" + retry_delay=$(min_val $(( retry_delay * 2 )) $API_MAX_RETRY_DELAY_MS) + fi + done + + log_warn "all %d API attempts failed: %s" "$API_MAX_ATTEMPTS" "$last_err" + return 1 +} + +# ============================================================ +# DB polling (post-commit: wait for Cursor to update commit data) +# ============================================================ + +# poll_for_commit_in_db polls the Cursor DB at COMMIT_POLL_INTERVAL_MS intervals +# until aiCodeTracking.recentCommit.commitHash matches expected_hash. +# Returns the full commit data JSON on success, or fails on timeout. +poll_for_commit_in_db() { + local db_path="$1" + local expected_hash="$2" + local deadline=$(( $(date +%s) + COMMIT_MAX_WAIT_S )) + + while true; do + local raw + raw=$(read_db_value "$db_path" "$TABLE_NAME" "$KEY_NAME" 2>/dev/null) || true + + if [ -n "$raw" ]; then + local decoded + decoded=$(decode_value "$raw" 2>/dev/null) || true + + if [ -n "$decoded" ]; then + local db_hash + db_hash=$(echo "$decoded" | jq -r '.commitHash // ""' 2>/dev/null) || true + + if [ "$db_hash" = "$expected_hash" ]; then + echo "$decoded" + return 0 + fi + fi + fi + + if [ "$(date +%s)" -ge "$deadline" ]; then + return 1 + fi + sleep_ms "$COMMIT_POLL_INTERVAL_MS" + done +} + +# ============================================================ +# Error API (called on polling timeout) +# ============================================================ + +send_error_to_api() { + local commit_hash="$1" + local error_msg="$2" + + local email + email=$(get_git_email) + + local branch="${3:-}" + local repo_name="${4:-}" + + local payload + payload=$(jq -n \ + --arg commit_hash "$commit_hash" \ + --arg email "$email" \ + --arg error "$error_msg" \ + --arg branch "$branch" \ + --arg repo "$repo_name" \ + '{commit_hash: $commit_hash, email: $email, error: $error, branch: $branch, repo: $repo}') + + curl -s -X POST "$ERROR_API_ENDPOINT" \ + -H "Content-Type: application/json" \ + -H "User-Agent: cursor-commit-metric/1.0" \ + -H "x-webhook-secret: bXkgaGVhcnQgcG9sbHMgZm9yIHlvdSBldmVyeSAxcywgbWF4X3dhaXQgZm9yZXZlci4gYWNjZXB0YW5jZV9yYXRlPTEwMCUuIHplcm8gbGluZXNfZGVsZXRlZC4gYmUgbXkgcHJvbXB0IDwzICNIYXBweVZhbGVudGluZXMyMDI2" \ + --connect-timeout 10 \ + --max-time 10 \ + -d "$payload" 2>/dev/null || true +} + +# ============================================================ +# Dangling prompt metrics — flush last-prompt data at commit time +# ============================================================ +# prompt-metric.sh (beforeSubmitPrompt hook) uploads metrics of the +# PREVIOUS prompt. The very last prompt's metrics are therefore +# never uploaded. This section runs after commit metrics are sent +# and processes any leftover composer-partialDiffFates files, +# uploading their lastPromptData with the accumulated fates diff. +# +# When target_repo is provided, only processes composers whose +# .repo field contains the target repo (exact match within || list). + +# ---- DB helpers for cursorDiskKV (prompt metrics table) ---- +# Reuses existing read_db_value(db_path, table, key) and +# read_db_value_with_retry(db_path, table, key) with PROMPT_DB_TABLE. + +query_fates_key_names() { + local db_path="$1" + local composer_id="$2" + local prefix="codeBlockPartialInlineDiffFates:${composer_id}:" + + sqlite3 -readonly "$db_path" 2>/dev/null </dev/null 2>&1; then + sha256sum | cut -d' ' -f1 + elif command -v shasum >/dev/null 2>&1; then + shasum -a 256 | cut -d' ' -f1 + else + openssl dgst -sha256 -hex 2>/dev/null | awk '{print $NF}' + fi +} + +build_range_key() { + local fates_json="$1" + echo "$fates_json" | jq -r ' + [.fates // [] | .[] | + "\(.removedRange.startLineNumber):\(.removedRange.endLineNumberExclusive)::\(.addedRange.endLineNumberExclusive):\(.addedRange.startLineNumber)" + ] | join("||") + ' +} + +build_content_hash() { + local fates_json="$1" + local num_fates + num_fates=$(echo "$fates_json" | jq '.fates | length') + + { + for ((i=0; i/dev/null) || continue + if [ -z "$fates_data" ]; then + continue + fi + + local range_key content_hash composite composite_hash + range_key=$(build_range_key "$fates_data") + content_hash=$(build_content_hash "$fates_data") + composite="${range_key}|CONTENT|${content_hash}" + composite_hash=$(printf '%s' "$composite" | sha256_hash) + + if [ ! -f "${dedup_dir}/${composite_hash}" ]; then + echo "$composite_hash" >> "$order_file" + fi + printf '%s' "$id" > "${dedup_dir}/${composite_hash}" + done <<< "$new_ids_str" + + while IFS= read -r hash; do + cat "${dedup_dir}/${hash}" + echo + done < "$order_file" + + rm -rf "$dedup_dir" +} + +# ---- Failed prompt requests persistence ---- + +get_failed_prompt_requests_path() { + echo "${HOME}/${PROMPT_FAILED_REQUESTS_FILE}" +} + +load_failed_prompt_requests() { + local path + path=$(get_failed_prompt_requests_path) + if [ ! -f "$path" ]; then + echo "[]" + return + fi + + local data + data=$(cat "$path" 2>/dev/null || true) + + if [ -n "$data" ] && echo "$data" | jq empty 2>/dev/null; then + echo "$data" + else + echo "[]" + fi +} + +save_failed_prompt_requests() { + local requests_json="$1" + local path + path=$(get_failed_prompt_requests_path) + + if [ -z "$requests_json" ] || [ "$requests_json" = "[]" ] || [ "$requests_json" = "null" ]; then + rm -f "$path" 2>/dev/null || true + return + fi + + mkdir -p "$(dirname "$path")" 2>/dev/null || true + echo "$requests_json" | jq '.' > "$path" 2>/dev/null || true +} + +# ---- Prompt metrics API sender (uses PROMPT_API_ENDPOINT) ---- + +send_prompt_batch_to_api_with_retry() { + local payload="$1" + local retry_delay=$API_INITIAL_RETRY_DELAY_MS + local last_err="" + + for attempt in $(seq 1 $API_MAX_ATTEMPTS); do + local response http_code body + response=$(curl -s -w "\n%{http_code}" \ + -X POST "$PROMPT_API_ENDPOINT" \ + -H "Content-Type: application/json" \ + -H "User-Agent: cursor-prompt-metric/1.0" \ + -H "x-webhook-secret: bXkgaGVhcnQgcG9sbHMgZm9yIHlvdSBldmVyeSAxcywgbWF4X3dhaXQgZm9yZXZlci4gYWNjZXB0YW5jZV9yYXRlPTEwMCUuIHplcm8gbGluZXNfZGVsZXRlZC4gYmUgbXkgcHJvbXB0IDwzICNIYXBweVZhbGVudGluZXMyMDI2" \ + --connect-timeout 10 \ + --max-time 10 \ + -d "$payload" 2>/dev/null) || true + + http_code=$(echo "$response" | tail -1) + body=$(echo "$response" | sed '$d') + + if [ -n "$http_code" ] && [ "$http_code" -ge 200 ] 2>/dev/null && [ "$http_code" -lt 300 ] 2>/dev/null; then + return 0 + fi + + last_err="status ${http_code}: ${body}" + + if [ "$attempt" -lt "$API_MAX_ATTEMPTS" ]; then + sleep_ms "$retry_delay" + retry_delay=$(min_val $(( retry_delay * 2 )) $API_MAX_RETRY_DELAY_MS) + fi + done + + log_warn "[dangling] all %d prompt API attempts failed: %s" "$API_MAX_ATTEMPTS" "$last_err" + return 1 +} + +# ---- Main dangling upload function ---- + +upload_dangling_prompt_metrics() { + local target_repo="${1:-}" + + # wait for 1 minute to get the unaccepted lines of this commit to get auto accept in db + sleep 60 + + local persistent_dir="${HOME}/${PROMPT_PERSISTENT_STORAGE_DIR}" + + if [ ! -d "$persistent_dir" ]; then + return 0 + fi + + local files=("$persistent_dir"/*.json) + if [ ! -f "${files[0]:-}" ]; then + return 0 + fi + + local db_path + db_path=$(get_db_path) + if [ ! -f "$db_path" ]; then + log_warn "[dangling] database not found at %s" "$db_path" + return 0 + fi + + local user_email + user_email=$(get_git_email) + if [ -z "$user_email" ]; then + log_warn "[dangling] could not determine git user email" + return 0 + fi + + acquire_lock "$DANGLING_LOCK_DIR" + trap 'release_lock "$DANGLING_LOCK_DIR"' EXIT + + local all_requests="[]" + local files_to_delete=() + + for file in "${files[@]}"; do + [ ! -f "$file" ] && continue + + local composer_id + composer_id=$(basename "$file" .json) + + local state + state=$(cat "$file" 2>/dev/null) || continue + if ! echo "$state" | jq empty 2>/dev/null; then + log_warn "[dangling] invalid JSON in %s, skipping" "$file" + files_to_delete+=("$file") + continue + fi + + # If target_repo is specified, only process composers for matching repos. + # The .repo field can be "org/repo" or "org1/repo1||org2/repo2" for multi-root. + if [ -n "$target_repo" ]; then + local file_repo + file_repo=$(echo "$state" | jq -r '.repo // ""') + local delimited_repos="||${file_repo}||" + if [[ "$delimited_repos" != *"||${target_repo}||"* ]]; then + continue + fi + fi + + local last_prompt_data + last_prompt_data=$(echo "$state" | jq '.lastPromptData // {}') + + local prompt_time + prompt_time=$(echo "$last_prompt_data" | jq -r '.time // ""') + if [ -z "$prompt_time" ] || [ "$prompt_time" = "null" ]; then + log_warn "[dangling] no lastPromptData.time for composer %s, skipping" "$composer_id" + files_to_delete+=("$file") + continue + fi + + # ---- Fates diff: find new fates IDs since last upload ---- + local known_fates_ids_json + known_fates_ids_json=$(echo "$state" | jq '.partialInlineDiffFatesIds // []') + + local fates_key_names + fates_key_names=$(query_fates_key_names_with_retry "$db_path" "$composer_id" 2>/dev/null) || true + local all_fates_ids + all_fates_ids=$(extract_fates_ids_from_keys "$fates_key_names" "$composer_id") + + local new_fates_ids="" + if [ -n "$all_fates_ids" ]; then + while IFS= read -r id; do + [ -z "$id" ] && continue + local is_known + is_known=$(echo "$known_fates_ids_json" | jq --arg id "$id" 'any(. == $id)') + if [ "$is_known" = "false" ]; then + if [ -n "$new_fates_ids" ]; then + new_fates_ids="${new_fates_ids}"$'\n'"${id}" + else + new_fates_ids="$id" + fi + fi + done <<< "$all_fates_ids" + fi + + # ---- Read fates data for new IDs ---- + FATES_DATA_DIR=$(mktemp -d) + if [ -n "$new_fates_ids" ]; then + while IFS= read -r id; do + [ -z "$id" ] && continue + local fd + fd=$(read_fates_data "$db_path" "$composer_id" "$id" 2>/dev/null) || { + log_warn "[dangling] fates %s read failed for composer %s" "$id" "$composer_id" + continue + } + if [ -n "$fd" ]; then + echo "$fd" > "${FATES_DATA_DIR}/${id}" + fi + done <<< "$new_fates_ids" + fi + + # ---- Deduplicate ---- + local unique_ids + unique_ids=$(deduplicate_fates "$new_fates_ids") + + # ---- Build chunks + totals ---- + local chunks_json="{}" + local total_sug_added=0 total_sug_removed=0 total_acc_added=0 total_acc_removed=0 + + if [ -n "$unique_ids" ]; then + while IFS= read -r id; do + [ -z "$id" ] && continue + local fd + fd=$(cat "${FATES_DATA_DIR}/${id}" 2>/dev/null) || continue + [ -z "$fd" ] && continue + + local entries_and_totals + entries_and_totals=$(echo "$fd" | jq ' + .fates // [] | reduce .[] as $f ( + { entries: [], sugAdded: 0, sugRemoved: 0, accAdded: 0, accRemoved: 0 }; + ($f.addedRange.endLineNumberExclusive - $f.addedRange.startLineNumber) as $added | + ($f.removedRange.endLineNumberExclusive - $f.removedRange.startLineNumber) as $removed | + .entries += [{ linesAdded: $added, linesRemoved: $removed, fate: $f.fate }] | + .sugAdded += $added | + .sugRemoved += $removed | + (if $f.fate == "accepted" then .accAdded += $added | .accRemoved += $removed else . end) + ) + ') + + local entries + entries=$(echo "$entries_and_totals" | jq '.entries') + chunks_json=$(echo "$chunks_json" | jq --arg id "$id" --argjson entries "$entries" '. + {($id): $entries}') + + total_sug_added=$(( total_sug_added + $(echo "$entries_and_totals" | jq '.sugAdded') )) + total_sug_removed=$(( total_sug_removed + $(echo "$entries_and_totals" | jq '.sugRemoved') )) + total_acc_added=$(( total_acc_added + $(echo "$entries_and_totals" | jq '.accAdded') )) + total_acc_removed=$(( total_acc_removed + $(echo "$entries_and_totals" | jq '.accRemoved') )) + done <<< "$unique_ids" + fi + + [ -n "$FATES_DATA_DIR" ] && rm -rf "$FATES_DATA_DIR" + + # ---- Build request (same shape as prompt-metric.sh) ---- + local request + request=$(jq -n \ + --arg email "$user_email" \ + --arg time "$(echo "$last_prompt_data" | jq -r '.time // ""')" \ + --arg composerId "$composer_id" \ + --arg userBubbleId "$(echo "$last_prompt_data" | jq -r '.userBubbleId // ""')" \ + --arg prompt "$(echo "$last_prompt_data" | jq -r '.prompt // ""')" \ + --argjson isMax "$(echo "$last_prompt_data" | jq '.isMax // false')" \ + --arg mode "$(echo "$last_prompt_data" | jq -r '.mode // ""')" \ + --arg model "$(echo "$last_prompt_data" | jq -r '.model // ""')" \ + --arg repo "$(echo "$state" | jq -r '.repo // ""')" \ + --arg branch "$(echo "$last_prompt_data" | jq -r '.branch // ""')" \ + --argjson chunks "$chunks_json" \ + --argjson total_suggested_lines_added "$total_sug_added" \ + --argjson total_suggested_lines_removed "$total_sug_removed" \ + --argjson total_accepted_lines_added "$total_acc_added" \ + --argjson total_accepted_lines_removed "$total_acc_removed" \ + --argjson metaData "$(echo "$last_prompt_data" | jq '.metadata // null')" \ + '{ + email: $email, + time: $time, + composerId: $composerId, + userBubbleId: $userBubbleId, + prompt: $prompt, + isMax: $isMax, + mode: $mode, + model: $model, + repo: $repo, + branch: $branch, + chunks: $chunks, + total_suggested_lines_added: $total_suggested_lines_added, + total_suggested_lines_removed: $total_suggested_lines_removed, + total_accepted_lines_added: $total_accepted_lines_added, + total_accepted_lines_removed: $total_accepted_lines_removed, + metaData: $metaData + }') + + all_requests=$(echo "$all_requests" | jq --argjson req "$request" '. + [$req]') + files_to_delete+=("$file") + done + + # ---- Send batch ---- + local batch_count + batch_count=$(echo "$all_requests" | jq 'length') + + if [ "$batch_count" -eq 0 ]; then + for f in "${files_to_delete[@]}"; do + rm -f "$f" + done + release_lock "$DANGLING_LOCK_DIR" + return 0 + fi + + if [ "$DRY_RUN" = true ]; then + log_warn "[dangling] dry run: would send %d dangling prompt request(s)" "$batch_count" + local dangling_prompt_metrics_file="${HOME}/.cursor-metrics/prompt-metric/dangling_prompt_metrics.json" + echo "$all_requests" | jq '.' > "$dangling_prompt_metrics_file" + release_lock "$DANGLING_LOCK_DIR" + return 0 + fi + + local previous_failed + previous_failed=$(load_failed_prompt_requests) + + local batch + batch=$(echo "$previous_failed" | jq --argjson reqs "$all_requests" '. + $reqs') + + local total_batch prev_count + total_batch=$(echo "$batch" | jq 'length') + prev_count=$(echo "$previous_failed" | jq 'length') + log_warn "[dangling] sending batch of %d prompt metric(s) (%d dangling + %d previously failed)" \ + "$total_batch" "$batch_count" "$prev_count" + + if send_prompt_batch_to_api_with_retry "$batch"; then + save_failed_prompt_requests "" + log_warn "[dangling] successfully sent %d prompt metric(s)" "$total_batch" + else + log_warn "[dangling] API batch send failed (%d items)" "$total_batch" + save_failed_prompt_requests "$batch" + fi + + for f in "${files_to_delete[@]}"; do + rm -f "$f" + done + + release_lock "$DANGLING_LOCK_DIR" +} + +# ============================================================ +# Phase 1: start — runs synchronously in the post-commit hook (fast) +# ============================================================ + +run_start() { + # Skip non-normal commits (rebase, merge) + if ! is_normal_commit; then + log_warn "skipping non-normal commit (rebase or merge)" + return 0 + fi + + # Get the latest commit hash from git (HEAD is the new commit in post-commit) + local commit_hash + commit_hash=$(git rev-parse HEAD 2>/dev/null) || { + log_warn "failed to get HEAD commit hash" + return 1 + } + + # Get repo path and derive repo name + local repo_path + repo_path=$(git rev-parse --show-toplevel 2>/dev/null) || { + log_warn "failed to get repo toplevel path" + return 1 + } + + local repo_name + repo_name=$(get_repo_name_from_path "$repo_path") + + # Write temp file with commit info for the background process + local temp_data + temp_data=$(jq -n \ + --arg commitHash "$commit_hash" \ + --arg repoName "$repo_name" \ + --arg repoPath "$repo_path" \ + '{commitHash: $commitHash, repoName: $repoName, repoPath: $repoPath}') + + local temp_file_path + temp_file_path=$(write_temp_file "$temp_data") + + # Spawn "continue" as a detached background process + local self_path + self_path=$(realpath "$0" 2>/dev/null || echo "$0") + local continue_log_dir="${HOME}/${LOG_DIR_RELATIVE}" + mkdir -p "$continue_log_dir" 2>/dev/null || true + local continue_log="${continue_log_dir}/continue.log" + + nohup bash "$self_path" continue "$temp_file_path" >/dev/null 2>>"$continue_log" & + disown 2>/dev/null || true +} + +# ============================================================ +# Phase 2: continue — runs in background (slow work) +# ============================================================ + +run_continue() { + local temp_file_path="$1" + + if [ ! -f "$temp_file_path" ]; then + log_warn "temp file not found: %s" "$temp_file_path" + return 1 + fi + + # Read temp file and delete immediately + local temp_data + temp_data=$(cat "$temp_file_path") + rm -f "$temp_file_path" + + if ! echo "$temp_data" | jq empty 2>/dev/null; then + log_warn "parse temp data: invalid JSON" + return 1 + fi + + local commit_hash repo_name repo_path + commit_hash=$(echo "$temp_data" | jq -r '.commitHash') + repo_name=$(echo "$temp_data" | jq -r '.repoName') + repo_path=$(echo "$temp_data" | jq -r '.repoPath') + + local branch_name + branch_name=$(git -C "$repo_path" rev-parse --abbrev-ref HEAD 2>/dev/null || true) + + # Get database path + local db_path + db_path=$(get_db_path) + if [ ! -f "$db_path" ]; then + log_warn "cursor database not found at: %s" "$db_path" + return 1 + fi + + # Poll DB until commit hash matches (aggressive: 500ms interval, 3 min max) + log_warn "polling DB for commit hash %s (max %ds, interval %dms)..." \ + "$commit_hash" "$COMMIT_MAX_WAIT_S" "$COMMIT_POLL_INTERVAL_MS" + + local cursor_data + if ! cursor_data=$(poll_for_commit_in_db "$db_path" "$commit_hash"); then + log_warn "polling timeout: commit hash %s not found in DB within %ds" \ + "$commit_hash" "$COMMIT_MAX_WAIT_S" + send_error_to_api "$commit_hash" "polling_timeout" "$branch_name" "$repo_name" + # Still attempt dangling prompt upload even on timeout + upload_dangling_prompt_metrics "$repo_name" || log_warn "[dangling] upload_dangling_prompt_metrics failed" + return 1 + fi + + log_warn "commit hash %s found in DB, processing..." "$commit_hash" + + # Convert commit data to request (repo_path passed directly for git timestamp lookups) + local request + request=$(convert_to_request "$cursor_data" "$repo_path") + if [ -z "$request" ]; then + log_warn "convert to request failed for commit %s" "$commit_hash" + upload_dangling_prompt_metrics "$repo_name" || log_warn "[dangling] upload_dangling_prompt_metrics failed" + return 1 + fi + + if [ "$DRY_RUN" = true ]; then + save_metrics_locally "$request" + upload_dangling_prompt_metrics "$repo_name" || log_warn "[dangling] upload_dangling_prompt_metrics failed" + return 0 + fi + + # Serialise access to failed.json so concurrent continue processes + # don't overwrite each other's data. + acquire_lock "$CONTINUE_LOCK_DIR" + trap 'release_lock "$CONTINUE_LOCK_DIR"' EXIT + + # Load previously failed commits and merge with current. + local previous_failed + previous_failed=$(load_failed_commits) + + local batch + batch=$(echo "$previous_failed" | jq --argjson req "$request" '. + [$req]') + + local batch_count prev_count + batch_count=$(echo "$batch" | jq 'length') + prev_count=$(echo "$previous_failed" | jq 'length') + + log_warn "Sending batch of %d commit(s) to API (%d previously failed + 1 current)..." \ + "$batch_count" "$prev_count" + + if send_batch_to_api_with_retry "$batch"; then + save_failed_commits "" + log_warn "Successfully sent %d commit(s) to API" "$batch_count" + else + log_warn "API batch send failed (%d items)" "$batch_count" + save_failed_commits "$batch" + fi + + release_lock "$CONTINUE_LOCK_DIR" + + # Flush dangling prompt metrics for repos matching this commit + upload_dangling_prompt_metrics "$repo_name" || log_warn "[dangling] upload_dangling_prompt_metrics failed" + + return 0 +} + +# ============================================================ +# Main +# ============================================================ + +setup_logging + +# Determine the subcommand. Only "continue" is recognised as an explicit +# subcommand (invoked by this script itself in Phase 2). Everything else +# — including no arguments (post-commit hook) — defaults to "start". +CMD="${1:-start}" +if [ "$CMD" != "continue" ]; then + CMD="start" +fi + +# For "start": guarantee exit 0 so the git hook never blocks, +# even if the script crashes, deps are missing, or any error occurs. +if [ "$CMD" = "start" ]; then + trap 'exit 0' EXIT +fi + +case "$CMD" in + start) + check_dependencies || exit 0 + if ! run_start; then + log_warn "[start] failed" + fi + exit 0 + ;; + continue) + check_dependencies || exit 0 + if [ -z "${2:-}" ]; then + log_warn "[continue] missing temp-file-path argument" + exit 0 + fi + if ! run_continue "$2"; then + log_warn "[continue] failed" + exit 0 + fi + ;; +esac \ No newline at end of file diff --git a/post-commit-scripts/runner.sh b/post-commit-scripts/runner.sh new file mode 100644 index 0000000..78622d8 --- /dev/null +++ b/post-commit-scripts/runner.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +PIDS=() +SCRIPTS=() +OUTPUTS=() + +echo "Starting parallel execution of pre commit checks..." + +for script in "$SCRIPT_DIR"/*.sh; do + if [ -x "$script" ] && [ "$(basename "$script")" != "runner.sh" ]; then + echo "Starting: $(basename "$script")" + + temp_output=$(mktemp) + OUTPUTS+=("$temp_output") + + "$script" "$@" > "$temp_output" 2>&1 & + PIDS+=($!) + SCRIPTS+=("$script") + fi +done + +FAILED=0 +for i in "${!PIDS[@]}"; do + if ! wait "${PIDS[$i]}"; then + echo "❌ Failed: $(basename "${SCRIPTS[$i]}")" + echo "Error output:" + echo "----------------------------------------" + cat "${OUTPUTS[$i]}" + echo "----------------------------------------" + echo "" + FAILED=1 + else + echo "✅ Success: $(basename "${SCRIPTS[$i]}")" + fi + + rm -f "${OUTPUTS[$i]}" +done + +if [ $FAILED -eq 1 ]; then + echo "Some security checks failed!" + exit 1 +else + echo "All security checks passed!" + exit 0 +fi diff --git a/pre-commit-scripts/._cac-validate.sh b/pre-commit-scripts/._cac-validate.sh new file mode 100644 index 0000000..df18094 Binary files /dev/null and b/pre-commit-scripts/._cac-validate.sh differ diff --git a/pre-commit-scripts/._runner.sh b/pre-commit-scripts/._runner.sh new file mode 100644 index 0000000..df18094 Binary files /dev/null and b/pre-commit-scripts/._runner.sh differ diff --git a/pre-commit-scripts/._trufflehog-hook.sh b/pre-commit-scripts/._trufflehog-hook.sh new file mode 100644 index 0000000..df18094 Binary files /dev/null and b/pre-commit-scripts/._trufflehog-hook.sh differ diff --git a/pre-commit-scripts/._yaakhook.sh b/pre-commit-scripts/._yaakhook.sh new file mode 100644 index 0000000..df18094 Binary files /dev/null and b/pre-commit-scripts/._yaakhook.sh differ diff --git a/pre-commit-scripts/cac-validate.sh b/pre-commit-scripts/cac-validate.sh new file mode 100644 index 0000000..e89fe3d --- /dev/null +++ b/pre-commit-scripts/cac-validate.sh @@ -0,0 +1,60 @@ +#!/bin/bash + +name="$(git rev-parse --show-toplevel 2>/dev/null | xargs basename 2>/dev/null || echo '')" +name_lc=$(echo "$name" | tr '[:upper:]' '[:lower:]') + +CAC_API_URL="https://observe.meeshogcp.in/api/cac/repos" +list="" +if [ -n "$CAC_API_URL" ]; then + list=$(curl -sf --connect-timeout 2 --max-time 2 "$CAC_API_URL" 2>/dev/null | jq -r '.repos[]? // empty' 2>/dev/null | tr -d '\r') + if [ $? -ne 0 ] || [ -z "$list" ]; then + echo "⏭️ CAC allowlist API unavailable, skipping validation" + exit 0 + fi +fi + +found=0 +if [ -n "$name_lc" ] && [ -n "$list" ]; then + while IFS= read -r line || [ -n "$line" ]; do + [[ -z "$line" ]] && continue + line_trimmed=$(echo "$line" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//') + line_lc=$(echo "$line_trimmed" | tr '[:upper:]' '[:lower:]') + if [ "$name_lc" = "$line_lc" ]; then + found=1 + break + fi + done <<< "$list" +fi + +if [ "$found" -eq 0 ]; then + echo "⏭️ Repository validation skipped ($name not in allowlist)" + exit 0 +fi + +branch=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "") +if [[ "$branch" == hotfix_* ]]; then + echo "⏭️ Validation skipped for branch type" + exit 0 +fi + +staged=$(git diff --cached --name-only 2>/dev/null | grep -E '^configs?/' | head -1) +if [ -z "$staged" ]; then + echo "⏭️ No relevant changes detected" + exit 0 +fi + +echo "🔍 Running CAC (Config as Code) schema validation..." +output=$(cac validate 2>&1) +code=$? + +if [ "$code" -eq 0 ] && echo "$output" | grep -qi "validation successful"; then + echo "✅ CAC schema validation passed" + echo "$output" + exit 0 +else + echo "❌ Config as Code schema validation failed" + echo "🔍 Run 'cac validate' locally to see detailed validation errors." + echo "$output" + echo "If you need assistance, contact @abhinandan.virmani or the on-call" + exit 1 +fi \ No newline at end of file diff --git a/pre-commit-scripts/runner.sh b/pre-commit-scripts/runner.sh new file mode 100644 index 0000000..78622d8 --- /dev/null +++ b/pre-commit-scripts/runner.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +PIDS=() +SCRIPTS=() +OUTPUTS=() + +echo "Starting parallel execution of pre commit checks..." + +for script in "$SCRIPT_DIR"/*.sh; do + if [ -x "$script" ] && [ "$(basename "$script")" != "runner.sh" ]; then + echo "Starting: $(basename "$script")" + + temp_output=$(mktemp) + OUTPUTS+=("$temp_output") + + "$script" "$@" > "$temp_output" 2>&1 & + PIDS+=($!) + SCRIPTS+=("$script") + fi +done + +FAILED=0 +for i in "${!PIDS[@]}"; do + if ! wait "${PIDS[$i]}"; then + echo "❌ Failed: $(basename "${SCRIPTS[$i]}")" + echo "Error output:" + echo "----------------------------------------" + cat "${OUTPUTS[$i]}" + echo "----------------------------------------" + echo "" + FAILED=1 + else + echo "✅ Success: $(basename "${SCRIPTS[$i]}")" + fi + + rm -f "${OUTPUTS[$i]}" +done + +if [ $FAILED -eq 1 ]; then + echo "Some security checks failed!" + exit 1 +else + echo "All security checks passed!" + exit 0 +fi diff --git a/pre-commit-scripts/trufflehog-hook.sh b/pre-commit-scripts/trufflehog-hook.sh new file mode 100644 index 0000000..b9026b0 --- /dev/null +++ b/pre-commit-scripts/trufflehog-hook.sh @@ -0,0 +1,56 @@ +#!/bin/bash +OUTPUT=$(trufflehog git file://. --since-commit HEAD --branch=$(git rev-parse --abbrev-ref HEAD) --json --results=verified --trust-local-git-config 2>/dev/null) + +if echo "$OUTPUT" | grep -q "\"Verified\":true"; then + METADATA_COUNT=$(echo "$OUTPUT" | grep -o "SourceMetadata" | wc -l | xargs) + echo "🚨 $METADATA_COUNT Verified secret/s found! Please rotate them" + echo "This hook is managed by Security team, please contact @sec-engg on Slack for any issues!" + echo ""; echo "🔍 Detected Secrets:"; echo "$OUTPUT" | sed "s/}{/}\\n{/g" | jq -r "." + + + REPO_NAME=$(basename "$(git rev-parse --show-toplevel)") + BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) + USER_NAME=$(git config user.name) + USER_EMAIL=$(git config user.email) + + echo "$OUTPUT" | sed "s/}{/}\\n{/g" | while read -r finding; do + [ "$(echo "$finding" | jq -r '.Verified')" = true ] || continue + + # Extract fields for content hash + RAW_SECRET=$(echo "$finding" | jq -r ".Raw // \"unknown\"") + DETECTOR=$(echo "$finding" | jq -r ".DetectorName // \"unknown\"") + COMMIT=$(echo "$finding" | jq -r ".SourceMetadata.Data.Git.commit // \"unknown\"") + FILE=$(echo "$finding" | jq -r ".SourceMetadata.Data.Git.file // \"unknown\"") + LINE=$(echo "$finding" | jq -r ".SourceMetadata.Data.Git.line // \"unknown\"") + EMAIL=$(echo "$finding" | jq -r ".SourceMetadata.Data.Git.email // \"None\"") + + # Create content hash for deduplication (compatible with macOS) + if command -v sha256sum >/dev/null 2>&1; then + CONTENT_HASH=$(echo -n "${RAW_SECRET}:${DETECTOR}:${FILE}:${LINE}" | sha256sum | cut -d' ' -f1) + else + CONTENT_HASH=$(echo -n "${RAW_SECRET}:${DETECTOR}:${FILE}:${LINE}" | shasum -a 256 | cut -d' ' -f1) + fi + + # Send to webhook (without raw secret for security) - base64 encoded for obfuscation + CMD64=$(cat </dev/null | grep -E '^api-collections?/' | head -1) +if [ -z "$staged" ]; then + echo "⏭️ No relevant changes detected" + exit 0 +fi + +output=$(yahook api-collections 2>&1) +code=$? + +if [ "$code" -eq 0 ]; then + echo "$output" + exit 0 +else + echo "$output" + exit 1 +fi \ No newline at end of file diff --git a/projects/sec-project.yaml b/projects/sec-project.yaml new file mode 100644 index 0000000..72fd527 --- /dev/null +++ b/projects/sec-project.yaml @@ -0,0 +1,22 @@ +apiVersion: argoproj.io/v1alpha1 +kind: AppProject +metadata: + name: sec + namespace: argocd-prd + # Finalizer that ensures that project is not deleted until it is not referenced by any application + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + # Project description + description: sec project for all secuirty apps. + # Allow manifests to deploy from any Git repos + sourceRepos: + - '*' + + # Only permit applications to deploy to the specific namespace in the same cluster + destinations: + - namespace: '*' + server: '*' + clusterResourceWhitelist: + - group: '*' + kind: '*' \ No newline at end of file diff --git a/projects/sre-project.yaml b/projects/sre-project.yaml new file mode 100644 index 0000000..4de7cc2 --- /dev/null +++ b/projects/sre-project.yaml @@ -0,0 +1,22 @@ +apiVersion: argoproj.io/v1alpha1 +kind: AppProject +metadata: + name: sre + namespace: argocd-prd + # Finalizer that ensures that project is not deleted until it is not referenced by any application + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + # Project description + description: sre project for all sre apps. + # Allow manifests to deploy from any Git repos + sourceRepos: + - '*' + + # Only permit applications to deploy to the specific namespace in the same cluster + destinations: + - namespace: '*' + server: '*' + clusterResourceWhitelist: + - group: '*' + kind: '*' \ No newline at end of file diff --git a/repository.yaml b/repository.yaml new file mode 100644 index 0000000..674da8c --- /dev/null +++ b/repository.yaml @@ -0,0 +1,5 @@ +# Generated by registry-bootstrap on 2026-04-29 +primary_owner: samarth.bagga@meesho.com +secondary_owner: siddharth.pal@meesho.com +team: "devops" +type: "config" diff --git a/skills/infra/add-tool.md b/skills/infra/add-tool.md new file mode 100644 index 0000000..031f75c --- /dev/null +++ b/skills/infra/add-tool.md @@ -0,0 +1,125 @@ +# Skill: Add Tool to Cluster + +> Parameterized agent task for adding a new `appSpec` entry to a cluster values file. +> +> **Layer:** 1-T (Tool-Mediated). Agent generates the diff and opens a PR. +> +> **Procedure:** [docs/platform/procedures/add-tool-to-cluster.md](../../docs/platform/procedures/add-tool-to-cluster.md) + +--- + +## When to use + +Trigger on requests like: +- "Add `` to ``" +- "Deploy `` on ``" +- "Onboard `` to ``" +- "Roll out `` to ``" + +--- + +## Inputs + +| Parameter | Required | Example | Source | +| --------- | -------- | ------- | ------ | +| `tool_name` | yes | `kyverno` | User request | +| `cluster` | yes | `k8s-farmiso-prd-ase1` | User request | +| `env` | yes | `prd` | Derived from cluster name | +| `namespace` | yes | `kyverno-farmiso-prd` | Convention: `-` | +| `chartDir` | yes | `kyverno` | Must exist in `devops-infra-helm-charts/helm-templates/` | +| `valuesDir` | yes | `kyverno` | Must exist in `devops-infra-helm-charts/helm-overrides//` | + +--- + +## Steps (deterministic — no branching) + +### Step 0: Resolve the values file path + +``` +values//incubator-infra--values.yaml +``` + +Halt if the file doesn't exist — the cluster may not be onboarded yet. Direct user to [add-new-cluster.md](../../docs/platform/procedures/add-new-cluster.md). + +### Step 1: Verify chartDir exists in `devops-infra-helm-charts` + +```bash +ls /path/to/devops-infra-helm-charts/helm-templates// +``` + +**Halt** if missing. The chart must be created in the sister repo first. + +### Step 2: Verify valuesDir exists in `devops-infra-helm-charts` + +```bash +ls /path/to/devops-infra-helm-charts/helm-overrides///custom-values.yaml +``` + +**Halt** if missing. The override must be created in the sister repo first. + +### Step 3: Compute the auto-generated Application name + +Apply munging rules: + +``` +-- +``` + +Where `mungedCluster` = strip `k8s-`, `prd-`, `int-`, `dev-`, `-ase1`; map `-ase1c` → `-c`. + +### Step 4: Check for name collisions + +```bash +grep "^\s*- name:" values//incubator-infra--values.yaml +``` + +Verify the computed Application name doesn't collide with any existing entry. + +### Step 5: Append the appSpec entry + +Add to the `appSpec` list in the values file: + +```yaml + - name: + namespace: + chartDir: + valuesDir: +``` + +Do NOT add `nameOverride` unless Step 4 found a collision. + +### Step 6: Validate + +```bash +helm template generic-argo-apps-chart/ \ + -f values//incubator-infra--values.yaml | grep -A 20 "name: " + +yamllint values//incubator-infra--values.yaml +``` + +### Step 7: Open PR + +Title: `add to ` + +PR body checklist: +- [ ] `chartDir` exists in `devops-infra-helm-charts/helm-templates/` +- [ ] `valuesDir` exists in `devops-infra-helm-charts/helm-overrides//` +- [ ] Application name <= 253 characters +- [ ] No name collision +- [ ] `helm template` renders correctly +- [ ] Pre-commit hooks pass + +--- + +## Output + +One modified file: `values//incubator-infra--values.yaml` with a new `appSpec` entry appended. + +--- + +## Gotchas + +1. **Never skip Step 1 and Step 2.** A missing chartDir or valuesDir will cause ArgoCD render failure fleet-wide on auto-sync. +2. **Auto-sync means immediate deploy.** Once the PR merges to `main`, the tool is deployed. There is no "staging deploy" step. +3. **Namespaces must be unique per cluster.** Two tools can share a namespace (e.g., `victoriametrics`), but this should be intentional and documented. +4. **Multi-instance tools** (e.g., `contour-internal-0`, `contour-internal-1`) need unique `name` and `valuesDir` per instance. diff --git a/skills/infra/fleet-wide-rollout.md b/skills/infra/fleet-wide-rollout.md new file mode 100644 index 0000000..26d8757 --- /dev/null +++ b/skills/infra/fleet-wide-rollout.md @@ -0,0 +1,129 @@ +# Skill: Fleet-Wide Tool Rollout + +> Parameterized agent task for adding a new tool to multiple clusters in a single PR. +> +> **Layer:** 1-T (Tool-Mediated). Agent generates the diff and opens a PR. +> +> **Procedure:** [docs/platform/procedures/fleet-wide-tool-rollout.md](../../docs/platform/procedures/fleet-wide-tool-rollout.md) + +--- + +## When to use + +Trigger on requests like: +- "Add `` to all prd clusters" +- "Roll out `` to demand, supply, central, farmiso" +- "Onboard `` fleet-wide" +- "Deploy `` across all data clusters" + +Do NOT use for single-cluster additions — use [add-tool.md](add-tool.md) instead. + +--- + +## Inputs + +| Parameter | Required | Example | Source | +| --------- | -------- | ------- | ------ | +| `tool_name` | yes | `coroot` | User request | +| `target_clusters` | yes | `["k8s-demand-prd-ase1", "k8s-supply-prd-ase1"]` or `"all-prd"` | User request | +| `env` | yes | `prd` | Derived from cluster names | +| `chart_dir` | yes | `coroot` | Must exist in `devops-infra-helm-charts/helm-templates/` | +| `values_dir_pattern` | yes | `coroot` or `coroot-` | Depends on whether overrides are cluster-specific | +| `namespace_pattern` | yes | `prd-` or `-` | Convention from procedure | + +--- + +## Steps (deterministic) + +### Step 0: Resolve target clusters + +If `target_clusters = "all-prd"`: +```bash +ls values/prd/ +``` + +Otherwise: use the provided list. Derive env from cluster names. + +### Step 1: Verify `chartDir` exists + +```bash +ls /path/to/devops-infra-helm-charts/helm-templates// +``` + +**Halt** if missing. + +### Step 2: Verify `valuesDir` exists for each cluster + +```bash +for cluster in ; do + ls /path/to/devops-infra-helm-charts/helm-overrides/$cluster//custom-values.yaml \ + && echo "OK: $cluster" || echo "MISSING: $cluster" +done +``` + +**Halt** if any cluster is missing its override. Report which clusters are missing so the user can create them in `devops-infra-helm-charts` first. + +### Step 3: Check for existing entries (idempotency) + +```bash +for f in ; do + grep "name: " "$f" && echo "Already exists in $f" +done +``` + +Skip clusters that already have the tool. + +### Step 4: Compute Application names, check collisions + +For each cluster, compute `--` and verify no collision. + +### Step 5: Append appSpec entries + +For each cluster values file, append: + +```yaml + - name: + namespace: + chartDir: + valuesDir: +``` + +Use the cluster-specific `valuesDir` if overrides are cluster-named. + +### Step 6: Validate all modified files + +```bash +for f in ; do + helm template generic-argo-apps-chart/ -f "$f" | grep -c "kind: Application" + yamllint "$f" +done +``` + +All must pass. + +### Step 7: Open PR + +Title: `onboard to [all prd | ] clusters` + +PR body checklist: +- [ ] Clusters modified: `[list]` +- [ ] `chartDir` exists: `devops-infra-helm-charts/helm-templates//` +- [ ] `valuesDir` verified for each cluster +- [ ] Application names computed, no collisions +- [ ] `helm template` passes for all clusters +- [ ] Pre-commit hooks pass + +--- + +## Output + +Multiple modified `values//-values.yaml` files, one new `appSpec` entry per file. + +--- + +## Gotchas + +1. **valuesDir names vary per cluster.** Some tools use `` as the valuesDir (same for all clusters); others use cluster-specific directories like `coroot-central`. Verify each one — do not assume uniformity. +2. **Auto-sync = simultaneous fleet deploy.** All clusters deploy on merge. If you want staged rollout, open separate PRs — one per cluster group. +3. **Skip already-deployed clusters silently.** If a cluster already has the tool (Step 3), skip it with a note in the PR body — don't add a duplicate entry. +4. **Namespace convention matters.** Confirm the namespace pattern with the tool owner. Some tools use `prd-` (env-prefixed), others use `-`. Inconsistency across clusters is a drift risk. diff --git a/skills/infra/onboard-cluster.md b/skills/infra/onboard-cluster.md new file mode 100644 index 0000000..a87bbfb --- /dev/null +++ b/skills/infra/onboard-cluster.md @@ -0,0 +1,135 @@ +> Per [AI Blitz Plan §5.5](../../docs/global/AGENT_BOUNDARIES.md). Layer: 1-T. + +# Skill — Onboard a New Cluster + +Parameterised skill for adding a new GKE cluster to the ArgoCD infrastructure control plane. + +**Full procedure:** [docs/platform/procedures/add-new-cluster.md](../../docs/platform/procedures/add-new-cluster.md) + +--- + +## Inputs + +| Parameter | Example | Required | +| --------- | ------- | -------- | +| `CLUSTER_NAME` | `k8s-dsgpu-prd-ase1` | yes | +| `ENV` | `prd` | yes | +| `INITIAL_TOOLS` | `keda,external-secrets,contour-internal` | no (default: empty appSpec) | + +**Env → branch / namespace / values-dir:** + +| ENV | Branch | ArgoCD namespace | Values dir | Incubator dir | +| --- | ------ | ---------------- | ---------- | ------------- | +| `prd` | `main` | `argocd-prd` | `values/prd/` | `incubator/prd/` | +| `stg` / `dev` | `develop` | `argocd-dev` | `values/dev/` | `incubator/infra/` | +| `int` | `pre-prod` | `argocd-shared-int` | `values/int/` | `incubator/int/` | + +--- + +## Pre-flight checks + +```bash +# 1. Verify GKE cluster exists and is registered as an ArgoCD destination +argocd cluster list | grep + +# 2. Verify helm-overrides directory exists in sister repo +ls ../devops-infra-helm-charts/helm-overrides// + +# 3. Check no incubator file already exists for this cluster +ls incubator//incubator-infra-.yaml 2>/dev/null && echo "ALREADY EXISTS" +``` + +--- + +## Step 1: Create incubator file + +**File:** `incubator//incubator-infra-.yaml` + +```yaml +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: incubator-infra- + namespace: + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/Meesho/devops-infra-argo-config' + targetRevision: + path: generic-argo-apps-chart + helm: + valueFiles: + - ../values//incubator-infra--values.yaml + destination: + name: in-cluster + namespace: +``` + +**Invariant (R9):** `metadata.name` must exactly equal the filename without `.yaml`. + +--- + +## Step 2: Create values file + +**File:** `values//incubator-infra--values.yaml` + +```yaml +clusterSpec: + destination: + server: "" + name: "" + +argocdSpec: + namespace: + +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: + path: helm-templates + valueFiles: ../../helm-overrides/ + labels: + bu: infra + team: devops + env: + cluster: + +appSpec: [] +``` + +Start with `appSpec: []`. Add tools via [add-tool.md](add-tool.md) in a follow-up PR. + +--- + +## Step 3: Validate + +```bash +helm template generic-argo-apps-chart/ \ + -f values//incubator-infra--values.yaml + +yamllint incubator//incubator-infra-.yaml +yamllint values//incubator-infra--values.yaml +``` + +--- + +## Step 4: Open PR + +```bash +git checkout -b onboard-cluster- +git add incubator//incubator-infra-.yaml \ + values//incubator-infra--values.yaml +git commit -m "feat: onboard cluster to ArgoCD infra control plane" +git push origin HEAD +``` + +PR target branch: `` (matches environment). + +--- + +## Blast radius + +New cluster only. Existing clusters and their `appSpec` entries are unaffected. The incubator renders zero child Applications until `appSpec` entries are added. diff --git a/skills/infra/upgrade-chart-version.md b/skills/infra/upgrade-chart-version.md new file mode 100644 index 0000000..0856e43 --- /dev/null +++ b/skills/infra/upgrade-chart-version.md @@ -0,0 +1,108 @@ +# Skill: Upgrade Chart Version + +> Parameterized agent task for changing the `chartDir` of an `appSpec` entry to reference a new chart version, across one or more clusters. +> +> **Layer:** 1-T (Tool-Mediated). Agent generates the diff and opens a PR. +> +> **Procedure:** [docs/platform/procedures/upgrade-chart-version.md](../../docs/platform/procedures/upgrade-chart-version.md) + +--- + +## When to use + +Trigger on requests like: +- "Upgrade `` to `` on ``" +- "Bump `` chart to ``" +- "Roll out `` chart upgrade across all prd clusters" +- "Pin `` back to ``" + +--- + +## Inputs + +| Parameter | Required | Example | Source | +| --------- | -------- | ------- | ------ | +| `tool_name` | yes | `contour-internal-0` | User request (`name` field in appSpec) | +| `new_chart_dir` | yes | `contour-v1.33.3` | User request or devops-infra-helm-charts PR | +| `clusters` | yes | `k8s-central-prd-ase1` or `all-prd` | User request | +| `env` | yes | `prd` | Derived from cluster name | + +--- + +## Steps (deterministic) + +### Step 0: Resolve target values files + +Single cluster: +```text +values//incubator-infra--values.yaml +``` + +All prd clusters: +```bash +ls values/prd/ +``` + +Halt if any values file doesn't exist. + +### Step 1: Verify new `chartDir` exists in `devops-infra-helm-charts` + +```bash +ls /path/to/devops-infra-helm-charts/helm-templates// +``` + +**Halt** if missing. The chart must be created in the sister repo first. + +### Step 2: Find the appSpec entry in each values file + +```bash +grep -n -A 5 "^\s*- name: $" values//incubator-infra--values.yaml +``` + +Record the line number and current `chartDir` value. + +**Halt** if the tool is not in the values file — it may not be deployed on this cluster. + +### Step 3: Update the `chartDir` + +Change `chartDir: ` to `chartDir: ` in each target values file. + +Do not change `name`, `namespace`, `valuesDir`, or `nameOverride`. + +### Step 4: Validate each modified file + +```bash +helm template generic-argo-apps-chart/ \ + -f values//incubator-infra--values.yaml \ + | grep -B 2 -A 30 "name: " + +yamllint values//incubator-infra--values.yaml +``` + +Every file must render cleanly before proceeding. + +### Step 5: Open PR + +Title: `upgrade chartDir to [on | across prd clusters]` + +PR body checklist: +- [ ] New `chartDir` exists in `devops-infra-helm-charts/helm-templates/` +- [ ] Previous `chartDir`: `` (for easy rollback reference) +- [ ] `helm template` renders correctly for each cluster +- [ ] Pre-commit hooks pass +- [ ] `custom-values.yaml` compatibility confirmed + +--- + +## Output + +One or more modified `values//incubator-infra--values.yaml` files with updated `chartDir`. + +--- + +## Gotchas + +1. **`valuesDir` compatibility:** Some chart upgrades require changes to `custom-values.yaml` in `devops-infra-helm-charts`. If the new chart version has breaking value key changes, that must be a separate PR in the sister repo first. +2. **Auto-sync on merge:** All changed clusters deploy simultaneously on merge to the env branch (`main` for prd, `develop` for stg, `pre-prod` for int). For large fleet upgrades, consider staged rollout (separate PRs per cluster group). +3. **`name` field ≠ `chartDir`:** The `name` field is the appSpec identifier and is NOT changed during a chart upgrade. Only `chartDir` changes. +4. **Rollback:** Simply change `chartDir` back to the previous value in a new PR. diff --git a/values/admin/incubator-infra-k8s-admin-dev-ase1-values.yaml b/values/admin/incubator-infra-k8s-admin-dev-ase1-values.yaml new file mode 100644 index 0000000..c11d16c --- /dev/null +++ b/values/admin/incubator-infra-k8s-admin-dev-ase1-values.yaml @@ -0,0 +1,31 @@ +clusterSpec: + destination: + server: "" + name: "gke_meesho-admin-dev-0622" + +argocdSpec: + namespace: argocd-admin + +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: develop + path: helm-templates + valueFiles: ../../helm-overrides/k8s-admin-dev-ase1 + labels: + bu: infra + team: devops + env: dev + cluster: k8s-admin-dev-ase1 + +appSpec: + - name: argocd + nameOverride: argocd-dev-cluster + namespace: argocd-dev + chartDir: argo-cd-9.5.21 + valuesDir: argo-cd + - name: alertmanager + namespace: alertmanager + chartDir: alertmanager + valuesDir: alertmanager diff --git a/values/admin/incubator-infra-k8s-admin-prd-ase1-values.yaml b/values/admin/incubator-infra-k8s-admin-prd-ase1-values.yaml new file mode 100644 index 0000000..cf41b5d --- /dev/null +++ b/values/admin/incubator-infra-k8s-admin-prd-ase1-values.yaml @@ -0,0 +1,27 @@ +clusterSpec: + destination: + server: "" + name: "k8s-admin-prd-ase1" + +argocdSpec: + namespace: argocd-admin + +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-templates + valueFiles: ../../helm-overrides/k8s-admin-prd-ase1 + labels: + bu: infra + team: devops + env: prd + cluster: k8s-admin-prd-ase1 + +appSpec: + - name: argocd + nameOverride: argocd-prd-cluster + namespace: argocd-prd + chartDir: argo-cd + valuesDir: argocd-admin-prd \ No newline at end of file diff --git a/values/admin/incubator-infra-k8s-devops-admin-ase1-values.yaml b/values/admin/incubator-infra-k8s-devops-admin-ase1-values.yaml new file mode 100644 index 0000000..15b74cd --- /dev/null +++ b/values/admin/incubator-infra-k8s-devops-admin-ase1-values.yaml @@ -0,0 +1,30 @@ +clusterSpec: + destination: + server: "" + name: "in-cluster" + +argocdSpec: + namespace: argocd-admin + +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-templates + valueFiles: ../../helm-overrides/k8s-devops-admin-ase1 + labels: + bu: infra + team: devops + env: prd + cluster: k8s-devops-admin-ase1 + +appSpec: + - name: nginx-internal + namespace: nginx-internal + chartDir: ingress-nginx + valuesDir: nginx-internal + - name: contour-internal-0 + namespace: contour-internal-0-devops-admin + chartDir: contour + valuesDir: contour-internal-0 diff --git a/values/admin/incubator-infra-k8s-sec-admin-ase1-values.yaml b/values/admin/incubator-infra-k8s-sec-admin-ase1-values.yaml new file mode 100644 index 0000000..896e263 --- /dev/null +++ b/values/admin/incubator-infra-k8s-sec-admin-ase1-values.yaml @@ -0,0 +1,97 @@ +clusterSpec: + destination: + server: "" + name: "k8s-sec-admin-ase1" + +argocdSpec: + namespace: argocd-admin + +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-templates + valueFiles: ../../helm-overrides/k8s-sec-admin-ase1 + labels: + bu: infra + team: sec + env: admin + cluster: k8s-sec-admin-ase1 + +appSpec: + - name: coredns + nameOverride: sec-admin-coredns + namespace: kube-system + chartDir: coredns + valuesDir: coredns + - name: kube-dns + nameOverride: sec-admin-kube-dns + namespace: kube-system + chartDir: kube-dns + valuesDir: kube-dns + - name: external-secrets + nameOverride: sec-admin-external-secrets + namespace: external-secrets-sec-admin + chartDir: external-secrets + valuesDir: external-secrets + - name: flagger + nameOverride: sec-admin-flagger + namespace: flagger-sec-admin + chartDir: flagger + valuesDir: flagger + - name: nginx + nameOverride: sec-admin-nginx + namespace: nginx-sec-admin + chartDir: ingress-nginx + valuesDir: ingress-nginx + - name: keda + nameOverride: sec-admin-keda + namespace: keda-sec-admin + chartDir: keda + valuesDir: keda + - name: prometheus-node-exporter + nameOverride: sec-admin-prometheus-node-exporter + namespace: monitoring + chartDir: prometheus-node-exporter + valuesDir: prometheus-node-exporter + - name: prometheus-stackdriver-exporter + nameOverride: sec-admin-prometheus-stackdriver-exporter + namespace: monitoring + chartDir: prometheus-stackdriver-exporter + valuesDir: prometheus-stackdriver-exporter + - name: kube-state-metrics + nameOverride: sec-admin-kube-state-metrics + namespace: kube-system + chartDir: kube-state-metrics + valuesDir: kube-state-metrics + - name: vmagent + nameOverride: sec-admin-vmagent + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent + - name: vmselect + nameOverride: sec-admin-vmselect + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-select + - name: vminsert + nameOverride: sec-admin-vminsert + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-insert + - name: vmstorage + nameOverride: sec-admin-vmstorage + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-storage + - name: deepfence-console + nameOverride: sec-admin-deepfence-console + namespace: deepfence + chartDir: deepfence-console + valuesDir: deepfence-console + - name: deepfence-router + nameOverride: sec-admin-deepfence-router + namespace: deepfence + chartDir: deepfence-router + valuesDir: deepfence-router \ No newline at end of file diff --git a/values/int/custom-compute-class/incubator-custom-class-shared-int-ase1-values.yaml b/values/int/custom-compute-class/incubator-custom-class-shared-int-ase1-values.yaml new file mode 100644 index 0000000..4f029cc --- /dev/null +++ b/values/int/custom-compute-class/incubator-custom-class-shared-int-ase1-values.yaml @@ -0,0 +1,20 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: compute-class-shared-int + namespace: argocd-int + labels: + bu: shared + team: shared +spec: + destination: + name: k8s-shared-int-ase1 + namespace: 'int-compute-class' + project: shared + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: k8s-shared-int-ase1/compute-class + syncPolicy: + syncOptions: + - CreateNamespace=true \ No newline at end of file diff --git a/values/int/incubator-infra-k8s-shared-int-ase1-values.yaml b/values/int/incubator-infra-k8s-shared-int-ase1-values.yaml new file mode 100644 index 0000000..e75be42 --- /dev/null +++ b/values/int/incubator-infra-k8s-shared-int-ase1-values.yaml @@ -0,0 +1,127 @@ +clusterSpec: + destination: + server: "" + name: "k8s-shared-int-ase1" + +argocdSpec: + namespace: argocd-prd + +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-templates + valueFiles: ../../helm-overrides/k8s-shared-int-ase1 + labels: + bu: infra + team: devops + env: int + cluster: k8s-shared-int-ase1 + +appSpec: + - name: keda + namespace: keda-shared-int + chartDir: keda-2.17.1 + valuesDir: keda + - name: contour-internal-0 + namespace: contour-internal-0-shared-int + chartDir: contour-v1.33.3 + valuesDir: contour-internal-0 + - name: contour-internal-1 + namespace: contour-internal-1-shared-int + chartDir: contour-v1.33.3 + valuesDir: contour-internal-1 + - name: contour-external + namespace: contour-external-shared-int + chartDir: contour-v1.33.3 + valuesDir: contour-external + - name: vmagent + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent + - name: vm-agent + namespace: victoriametrics + chartDir: victoria-metrics-agent-latest + valuesDir: victoriametrics-agent + - name: kube-state-metrics + namespace: kube-system + chartDir: kube-state-metrics + valuesDir: kube-state-metrics + - name: external-secrets + namespace: external-secrets-shared-int + chartDir: external-secrets + valuesDir: external-secrets + - name: coredns + namespace: kube-system + chartDir: coredns + valuesDir: coredns + - name: kube-dns + namespace: kube-system + chartDir: kube-dns + valuesDir: kube-dns + - name: prometheus-node-exporter + namespace: monitoring + chartDir: prometheus-node-exporter + valuesDir: prometheus-node-exporter + - name: prometheus-stackdriver-exporter + namespace: monitoring + chartDir: prometheus-stackdriver-exporter + valuesDir: prometheus-stackdriver-exporter + - name: telegraf-operator + namespace: telegraf-operator + chartDir: telegraf-operator + valuesDir: telegraf-operator + - name: fluentd + namespace: fluentd + chartDir: fluentd + valuesDir: fluentd + - name: kube-events + namespace: kube-events + chartDir: kube-events + valuesDir: kube-events + - name: opentelemetry-daemonset + namespace: opentelemetry + chartDir: opentelemetry-collector-latest + valuesDir: opentelemetry-daemonset + - name: contour-cert-checker + namespace: contour-cert-checker-ns + chartDir: contour-cert-checker + valuesDir: contour-cert-checker + - name: nginx-internal + namespace: nginx-shared-internal + chartDir: ingress-nginx + valuesDir: ingress-nginx-internal + - name: contour-internal-1-shared-intra-int + nameOverride: contour-internal-1-shared-intra-int + namespace: contour-internal-1-shared-int-intra + chartDir: contour + valuesDir: contour-internal-intra-1 + - name: deepgram-preprod + nameOverride: deepgram-preprod + namespace: dg-self-hosted-int + chartDir: deepgram-onprem + valuesDir: deepgram-onprem + - name: kyverno-shared-int + nameOverride: kyverno + namespace: kyverno + chartDir: kyverno + valuesDir: kyverno + - name: cert-manager + nameOverride: cert-manager + namespace: cert-manager-shared-int + chartDir: cert-manager + valuesDir: cert-manager + - name: ai-gateway + nameOverride: int-ai-gateway + namespace: int-ai-gateway + chartDir: bifrost + valuesDir: bifrost + - name: contour-ca-issuer + namespace: contour-ca-issuer-shared-int + chartDir: contour-ca-issuer + valuesDir: contour-ca-issuer + - name: kubectl-mcp-server + namespace: int-kubectl-mcp-server + chartDir: kubectl-mcp-server + valuesDir: kubectl-mcp-server diff --git a/values/prd/incubator-infra-gke-central-prd-ase1a-values.yaml b/values/prd/incubator-infra-gke-central-prd-ase1a-values.yaml new file mode 100644 index 0000000..4242a95 --- /dev/null +++ b/values/prd/incubator-infra-gke-central-prd-ase1a-values.yaml @@ -0,0 +1,242 @@ +clusterSpec: + destination: + server: "" + name: "gke-central-prd-ase1a" + +argocdSpec: + namespace: argocd-prd + +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-templates + valueFiles: ../../helm-overrides/gke-central-prd-ase1a + labels: + bu: infra + team: devops + env: prd + cluster: gke-central-prd-ase1a + +appSpec: + - name: keda + namespace: keda-central-prd + chartDir: keda-2.20.1 + valuesDir: keda + # - name: kube-state-metrics + # namespace: kube-system + # chartDir: kube-state-metrics + # valuesDir: kube-state-metrics + - name: contour-internal-0-central-prd + nameOverride: contour-internal-0-central-prd + namespace: contour-internal-0-central-prd + chartDir: contour-v1.33.3-v2 + valuesDir: contour-internal-0 + - name: vmalert-stateful + namespace: victoriametrics + chartDir: victoria-metrics-alert-stateful + valuesDir: victoria-metrics-alert-stateful + - name: vmalert-secured-stateful + namespace: victoriametrics + chartDir: victoria-metrics-alert-stateful + valuesDir: victoria-metrics-alert-secured-stateful + - name: contour-internal-1-central-prd + nameOverride: contour-internal-1-central-prd + namespace: contour-internal-1-central-prd + chartDir: contour-v1.33.3-v2 + valuesDir: contour-internal-1 + - name: contour-internal-0-central-intra-prd + nameOverride: contour-internal-0-central-intra-prd + namespace: contour-internal-0-central-prd-intra + chartDir: contour-v1.33.3-v2 + valuesDir: contour-internal-intra-0 + - name: contour-internal-1-central-intra-prd + nameOverride: contour-internal-1-central-intra-prd + namespace: contour-internal-1-central-prd-intra + chartDir: contour-v1.33.3-v2 + valuesDir: contour-internal-intra-1 + - name: contour-external-central-prd + nameOverride: contour-external-central-prd + namespace: contour-external-central-prd + chartDir: contour-v1.33.3-v2 + valuesDir: contour-external + # - name: vmagent-shared + # namespace: victoriametrics + # chartDir: victoria-metrics-agent-latest + # valuesDir: victoriametrics-agent-shared + # - name: vmselect + # namespace: victoriametrics + # chartDir: victoria-metrics-cluster + # valuesDir: victoria-metrics-select + # - name: vminsert + # namespace: victoriametrics + # chartDir: victoria-metrics-cluster + # valuesDir: victoria-metrics-insert + # - name: vmstorage + # namespace: victoriametrics + # chartDir: victoria-metrics-cluster + # valuesDir: victoria-metrics-storage + - name: kube-state-metrics + namespace: kube-system + chartDir: kube-state-metrics-7.4.0 + valuesDir: kube-state-metrics + - name: external-secrets + namespace: external-secrets-central-prd + chartDir: external-secrets-2.6.0 + valuesDir: external-secrets + - name: flagger + namespace: flagger-central-prd + chartDir: flagger + valuesDir: flagger + - name: coredns + namespace: kube-system + chartDir: coredns-1.13.1 + valuesDir: coredns + additionalValueFiles: + - ../../helm-templates/coredns-1.13.1/gcp-ase1a-values.yaml + - name: kube-dns + namespace: kube-system + chartDir: kube-dns + valuesDir: kube-dns + - name: etcd + namespace: etcd-prd + chartDir: etcd + valuesDir: etcd + - name: prometheus-node-exporter + namespace: monitoring + chartDir: prometheus-node-exporter-4.55.0 + valuesDir: prometheus-node-exporter + - name: prometheus-stackdriver-exporter + namespace: monitoring + chartDir: prometheus-stackdriver-exporter-4.12.2 + valuesDir: prometheus-stackdriver-exporter + - name: telegraf-operator + namespace: telegraf-operator + chartDir: telegraf-operator-1.4.0 + valuesDir: telegraf-operator + - name: opentelemetry-coralogix + namespace: opentelemetry + chartDir: opentelemetry-collector-0.158.1 + valuesDir: opentelemetry-coralogix + - name: opentelemetry-claude-metrics + namespace: claude-observability + chartDir: opentelemetry-collector-latest-v1 + valuesDir: opentelemetry-claude-metrics + - name: opentelemetry-codex-metrics + namespace: codex-observability + chartDir: opentelemetry-collector-latest-v1 + valuesDir: opentelemetry-codex-metrics + - name: ai-gateway + namespace: prd-ai-gateway + chartDir: bifrost-latest + valuesDir: ai-gateway + - name: elasticsearch-mcp + namespace: elasticsearch-mcp + chartDir: elasticsearch-mcp-latest + valuesDir: elasticsearch-mcp + - name: loghouse + namespace: prd-loghouse + chartDir: clickhouse-latest + valuesDir: clickhouse + - name: akamai-observability-mcp + namespace: akamai-observability-mcp + chartDir: grafana-mcp-v1 + valuesDir: akamai-observability-mcp + - name: fluentd + namespace: fluentd + chartDir: fluentd-0.5.3 + valuesDir: fluentd + - name: loadtester + namespace: loadtester + chartDir: loadtester + valuesDir: loadtester + - name: kube-events + namespace: kube-events + chartDir: kube-events + valuesDir: kube-events + # - name: vmalert + # namespace: victoriametrics + # chartDir: victoria-metrics-alert + # valuesDir: victoria-metrics-alert + # - name: vmalert-secured + # namespace: victoriametrics + # chartDir: victoria-metrics-alert + # valuesDir: victoria-metrics-alert-secured + - name: vmagent-dr + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent-dr + - name: vmagent-fb + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent-fb + - name: vmalert-dr + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert-dr + - name: opentelemetry-daemonset + namespace: opentelemetry + chartDir: opentelemetry-collector-0.158.1 + valuesDir: opentelemetry-daemonset + - name: contour-cert-checker + namespace: contour-cert-checker-ns + chartDir: contour-cert-checker + valuesDir: contour-cert-checker + - name: aurva-dataplane + namespace: aurva-dataplane + chartDir: aurva-dataplane + valuesDir: aurva-dataplane + - name: coroot-node-agent + namespace: coroot-node-agent + chartDir: coroot-node-agent + valuesDir: coroot-node-agent + - name: node-thp-config + namespace: prd-node-thp-config + chartDir: node-thp-config + valuesDir: node-thp-config + - name: vm-agent + namespace: victoriametrics + chartDir: victoria-metrics-agent-latest + valuesDir: victoriametrics-agent + - name: vm-select + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-select + - name: vm-insert + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-insert + - name: vm-storage + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-storage + - name: kyverno-central-prd + nameOverride: kyverno-central-a-prd + namespace: kyverno + chartDir: kyverno-3.8.1 + valuesDir: kyverno + # - name: vm-agent-secondary + # namespace: victoriametrics + # chartDir: victoria-metrics-agent-latest + # valuesDir: victoriametrics-agent-secondary + - name: cert-manager + namespace: cert-manager-central-prd + chartDir: cert-manager-v1.20.2 + valuesDir: cert-manager + - name: contour-ca-issuer + namespace: contour-ca-issuer-central-prd + chartDir: contour-ca-issuer-v2 + valuesDir: contour-ca-issuer + - name: kubectl-mcp-server + namespace: prd-kubectl-mcp-server + chartDir: kubectl-mcp-server-v2 + valuesDir: kubectl-mcp-server + - name: fireworks-ai + namespace: prd-fireworks-ai + chartDir: bifrost-v1.5.12-latest + valuesDir: fireworks-ai + - name: ai-gateway-ext + namespace: prd-ai-gateway-ext + chartDir: bifrost-v1.5.12-latest + valuesDir: ai-gateway-ext diff --git a/values/prd/incubator-infra-gke-dataengg-prd-ase1a-values.yaml b/values/prd/incubator-infra-gke-dataengg-prd-ase1a-values.yaml new file mode 100644 index 0000000..719e52b --- /dev/null +++ b/values/prd/incubator-infra-gke-dataengg-prd-ase1a-values.yaml @@ -0,0 +1,219 @@ +clusterSpec: + destination: + server: "" + name: "gke-dataengg-prd-ase1a" + +argocdSpec: + namespace: argocd-prd + +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-templates + valueFiles: ../../helm-overrides/gke-dataengg-prd-ase1a + labels: + bu: infra + team: devops + env: prd + cluster: gke-dataengg-prd-ase1a + +appSpec: + - name: keda + namespace: keda-dataengg-prd + chartDir: keda-2.20.1 + valuesDir: keda + - name: contour-internal-0-dataengg-prd + nameOverride: contour-internal-0-dataengg-a-prd + namespace: contour-internal-0-dataengg-prd + chartDir: contour-v1.33.3-v2 + valuesDir: contour-internal-0 + - name: contour-internal-0-dataengg-intra-prd + nameOverride: contour-internal-0-dataengg-a-intra-prd + namespace: contour-internal-0-dataengg-prd-intra + chartDir: contour-v1.33.3-v2 + valuesDir: contour-internal-intra-0 + - name: contour-internal-1-dataengg-prd + nameOverride: contour-internal-1-dataengg-a-prd + namespace: contour-internal-1-dataengg-prd + chartDir: contour-v1.33.3-v2 + valuesDir: contour-internal-1 + - name: contour-internal-1-dataengg-intra-prd + nameOverride: contour-internal-1-dataengg-a-intra-prd + namespace: contour-internal-1-dataengg-prd-intra + chartDir: contour-v1.33.3-v2 + valuesDir: contour-internal-intra-1 + - name: contour-external-dataengg-prd + nameOverride: contour-external-dataengg-a-prd + namespace: contour-external-dataengg-prd + chartDir: contour-v1.33.3-v2 + valuesDir: contour-external + - name: nginx-ext + namespace: nginx-dataengg-external + chartDir: ingress-nginx + valuesDir: ingress-nginx-external + - name: nginx-int + namespace: nginx-dataengg-internal + chartDir: ingress-nginx + valuesDir: ingress-nginx-internal + - name: nginx-sec + namespace: nginx-dataengg-secured + chartDir: ingress-nginx + valuesDir: ingress-nginx-secured + - name: contour-ca-issuer + namespace: contour-ca-issuer-dataengg-prd + chartDir: contour-ca-issuer-v2 + valuesDir: contour-ca-issuer + - name: external-secrets + namespace: external-secrets-dataengg-prd + chartDir: external-secrets-2.6.0 + valuesDir: external-secrets + - name: flagger + namespace: flagger-dataengg-prd + chartDir: flagger + valuesDir: flagger + - name: coredns + namespace: kube-system + chartDir: coredns-1.13.1 + valuesDir: coredns + additionalValueFiles: + - ../../helm-templates/coredns-1.13.1/gcp-ase1a-values.yaml + - name: kube-dns + namespace: kube-system + chartDir: kube-dns + valuesDir: kube-dns + - name: kube-state-metrics + namespace: kube-system + chartDir: kube-state-metrics-7.4.0 + valuesDir: kube-state-metrics + - name: prometheus-node-exporter + namespace: monitoring + chartDir: prometheus-node-exporter-4.55.0 + valuesDir: prometheus-node-exporter + - name: prometheus-stackdriver-exporter + namespace: monitoring + chartDir: prometheus-stackdriver-exporter-4.12.2 + valuesDir: prometheus-stackdriver-exporter + - name: telegraf-operator + namespace: telegraf-operator + chartDir: telegraf-operator-1.4.0 + valuesDir: telegraf-operator + - name: loadtester + namespace: loadtester + chartDir: loadtester + valuesDir: loadtester + - name: opentelemetry-coralogix + namespace: opentelemetry + chartDir: opentelemetry-collector-0.158.1 + valuesDir: opentelemetry-coralogix + - name: fluentd + namespace: fluentd + chartDir: fluentd-0.5.3 + valuesDir: fluentd + - name: kube-events + namespace: kube-events + chartDir: kube-events + valuesDir: kube-events + - name: opentelemetry-daemonset + namespace: opentelemetry + chartDir: opentelemetry-collector-0.158.1 + valuesDir: opentelemetry-daemonset + - name: contour-cert-checker + namespace: contour-cert-checker-ns + chartDir: contour-cert-checker + valuesDir: contour-cert-checker + - name: aurva-dataplane + namespace: aurva-dataplane + chartDir: aurva-dataplane + valuesDir: aurva-dataplane + - name: kyverno-dataengg-prd + nameOverride: kyverno-dataengg-a-prd + namespace: kyverno + chartDir: kyverno-3.8.1 + valuesDir: kyverno + - name: cert-manager + namespace: cert-manager-dataengg-prd + chartDir: cert-manager-v1.20.2 + valuesDir: cert-manager + - name: kubectl-mcp-server + namespace: prd-kubectl-mcp-server + chartDir: kubectl-mcp-server-v2 + valuesDir: kubectl-mcp-server + # - name: vmalert + # namespace: victoriametrics + # chartDir: victoria-metrics-alert + # valuesDir: victoria-metrics-alert + - name: vmalert-stateful + namespace: victoriametrics + chartDir: victoria-metrics-alert-stateful + valuesDir: victoria-metrics-alert-stateful + - name: vmalert-dr + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert-dr + # - name: vmagent + # namespace: victoriametrics + # chartDir: victoria-metrics-agent + # valuesDir: victoria-metrics-agent + - name: vmagent-dr + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent-dr + - name: vmagent-fb + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent-fb + # - name: vmselect + # namespace: victoriametrics + # chartDir: victoria-metrics-cluster + # valuesDir: victoria-metrics-select + # - name: vminsert + # namespace: victoriametrics + # chartDir: victoria-metrics-cluster + # valuesDir: victoria-metrics-insert + # - name: vmstorage + # namespace: victoriametrics + # chartDir: victoria-metrics-cluster + # valuesDir: victoria-metrics-storage + - name: vm-agent + namespace: victoriametrics + chartDir: victoria-metrics-agent-latest + valuesDir: victoriametrics-agent + - name: vm-select + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-select + - name: vm-insert + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-insert + - name: vm-storage + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-storage + # - name: vmalert-startree + # namespace: victoriametrics-startree + # chartDir: victoria-metrics-alert + # valuesDir: victoria-metrics-alert-startree + - name: vmalert-startree-stateful + namespace: victoriametrics-startree + chartDir: victoria-metrics-alert-stateful + valuesDir: victoria-metrics-alert-startree-stateful + # - name: vmagent-startree + # namespace: victoriametrics-startree + # chartDir: victoria-metrics-agent-latest + # valuesDir: victoria-metrics-agent-startree + - name: vmselect-startree + namespace: victoriametrics-startree + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-select-startree + - name: vminsert-startree + namespace: victoriametrics-startree + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-insert-startree + - name: vmstorage-startree + namespace: victoriametrics-startree + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-storage-startree + diff --git a/values/prd/incubator-infra-gke-datascience-prd-as1-values.yaml b/values/prd/incubator-infra-gke-datascience-prd-as1-values.yaml new file mode 100644 index 0000000..9f53554 --- /dev/null +++ b/values/prd/incubator-infra-gke-datascience-prd-as1-values.yaml @@ -0,0 +1,206 @@ +clusterSpec: + destination: + server: "" + name: "gke-datascience-prd-as1a" + +argocdSpec: + namespace: argocd-prd + +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-templates + valueFiles: ../../helm-overrides/gke-datascience-prd-as1a + labels: + bu: infra + team: devops + env: prd + cluster: gke-datascience-prd-as1a + +appSpec: + - name: keda + namespace: keda-datascience-prd + chartDir: keda-2.20.1 + valuesDir: keda + - name: contour-internal-0 + namespace: contour-internal-0-datascience-prd + nameOverride: contour-internal-0-datascience-as1-prd + chartDir: contour-v1.33.3-v2 + valuesDir: contour-internal-0 + - name: vmalert-stateful + namespace: victoriametrics + chartDir: victoria-metrics-alert-stateful + valuesDir: victoria-metrics-alert-stateful + - name: vmalert-secured-stateful + namespace: victoriametrics + chartDir: victoria-metrics-alert-stateful + valuesDir: victoria-metrics-alert-secured-stateful + - name: contour-internal-1 + namespace: contour-internal-1-datascience-prd + nameOverride: contour-internal-1-datascience-as1-prd + chartDir: contour-v1.33.3-v2 + valuesDir: contour-internal-1 + - name: contour-internal-0-datascience-intra-prd + nameOverride: contour-internal-0-datascience-intra-as1-prd + namespace: contour-internal-0-datascience-prd-intra + chartDir: contour-v1.33.3-v2 + valuesDir: contour-internal-intra-0 + - name: contour-internal-dataproc-prd + nameOverride: contour-internal-dataproc-a-prd + namespace: contour-internal-dataproc-prd + chartDir: contour-v1.33.3-v2 + valuesDir: contour-internal-dataproc + - name: contour-internal-1-datascience-intra-prd + nameOverride: contour-internal-1-datascience-intra-as1-prd + namespace: contour-internal-1-datascience-prd-intra + chartDir: contour-v1.33.3-v2 + valuesDir: contour-internal-intra-1 + - name: vmagent + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent + - name: vmselect + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-select + - name: vminsert + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-insert + - name: vmstorage + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-storage + - name: kube-state-metrics + namespace: kube-system + chartDir: kube-state-metrics-7.4.0 + valuesDir: kube-state-metrics + - name: external-secrets + namespace: external-secrets-datascience-prd + chartDir: external-secrets-2.6.0 + valuesDir: external-secrets + - name: flagger + namespace: flagger-datascience-prd + chartDir: flagger + valuesDir: flagger + - name: coredns + namespace: kube-system + chartDir: coredns-1.13.1 + valuesDir: coredns + additionalValueFiles: + - ../../helm-templates/coredns/gcp-ase1a-values.yaml + - name: kube-dns + namespace: kube-system + chartDir: kube-dns + valuesDir: kube-dns + - name: prometheus-node-exporter + namespace: monitoring + chartDir: prometheus-node-exporter-4.55.0 + valuesDir: prometheus-node-exporter + - name: prometheus-stackdriver-exporter + namespace: monitoring + chartDir: prometheus-stackdriver-exporter-4.12.2 + valuesDir: prometheus-stackdriver-exporter + - name: telegraf-operator + namespace: telegraf-operator + chartDir: telegraf-operator-1.4.0 + valuesDir: telegraf-operator + - name: opentelemetry-coralogix + namespace: opentelemetry + chartDir: opentelemetry-collector + valuesDir: opentelemetry-coralogix + - name: fluentd + namespace: fluentd + chartDir: fluentd-0.5.3 + valuesDir: fluentd + - name: loadtester + namespace: loadtester + chartDir: loadtester + valuesDir: loadtester + - name: kube-events + namespace: kube-events + chartDir: kube-events + valuesDir: kube-events + - name: paused-container + namespace: paused-container + chartDir: paused-container + valuesDir: paused-container + - name: vmalert + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert + - name: vmalert-secured + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert-secured + - name: nginx-int + namespace: nginx-int + chartDir: ingress-nginx + valuesDir: ingress-nginx-internal + - name: vmagent-dr + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent-dr + - name: vmagent-fb + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent-fb + - name: vmalert-dr + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert-dr + - name: opentelemetry-daemonset + namespace: opentelemetry + chartDir: opentelemetry-collector-latest + valuesDir: opentelemetry-daemonset + - name: contour-cert-checker + namespace: contour-cert-checker-ns + chartDir: contour-cert-checker + valuesDir: contour-cert-checker + - name: aurva-dataplane + namespace: aurva-dataplane + chartDir: aurva-dataplane + valuesDir: aurva-dataplane + - name: kubernetes-dashboard + namespace: kubernetes-dashboard + chartDir: kubernetes-dashboard + valuesDir: kubernetes-dashboard + - name: coroot-node-agent + namespace: coroot-node-agent + chartDir: coroot-node-agent + valuesDir: coroot-node-agent + - name: vm-agent + namespace: victoriametrics + chartDir: victoria-metrics-agent-latest + valuesDir: victoriametrics-agent + - name: vm-select + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-select + - name: vm-insert + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-insert + - name: vm-storage + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-storage + - name: kyverno-datascience-prd + nameOverride: kyverno-datascience-prd + namespace: kyverno + chartDir: kyverno + valuesDir: kyverno + - name: cert-manager + namespace: cert-manager-datascience-prd + chartDir: cert-manager-v1.20.2 + valuesDir: cert-manager + - name: contour-ca-issuer + namespace: contour-ca-issuer-datascience-prd + chartDir: contour-ca-issuer + valuesDir: contour-ca-issuer + - name: kubectl-mcp-server + namespace: prd-kubectl-mcp-server + chartDir: kubectl-mcp-server + valuesDir: kubectl-mcp-server diff --git a/values/prd/incubator-infra-gke-datascience-prd-ase1a-values.yaml b/values/prd/incubator-infra-gke-datascience-prd-ase1a-values.yaml new file mode 100644 index 0000000..4dbf58a --- /dev/null +++ b/values/prd/incubator-infra-gke-datascience-prd-ase1a-values.yaml @@ -0,0 +1,194 @@ +clusterSpec: + destination: + server: "" + name: "gke-datascience-prd-ase1a" + +argocdSpec: + namespace: argocd-prd + +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-templates + valueFiles: ../../helm-overrides/gke-datascience-prd-ase1a + labels: + bu: infra + team: devops + env: prd + cluster: gke-datascience-prd-ase1a + +appSpec: + - name: keda + namespace: keda-datascience-prd + chartDir: keda-2.20.1 + valuesDir: keda + - name: contour-internal-0-datascience-prd + nameOverride: contour-internal-0-datascience-a-prd + namespace: contour-internal-0-datascience-prd + chartDir: contour-v1.33.3-v2 + valuesDir: contour-internal-0 + - name: contour-internal-1-datascience-prd + nameOverride: contour-internal-1-datascience-a-prd + namespace: contour-internal-1-datascience-prd + chartDir: contour-v1.33.3-v2 + valuesDir: contour-internal-1 + - name: contour-internal-0-datascience-intra-prd + nameOverride: contour-internal-0-datascience-a-intra-prd + namespace: contour-internal-0-datascience-prd-intra + chartDir: contour + valuesDir: contour-internal-intra-0 + - name: contour-internal-1-datascience-intra-prd + nameOverride: contour-internal-1-datascience-a-intra-prd + namespace: contour-internal-1-datascience-prd-intra + chartDir: contour + valuesDir: contour-internal-intra-1 + - name: kube-state-metrics + namespace: kube-system + chartDir: kube-state-metrics-7.4.0 + valuesDir: kube-state-metrics + - name: external-secrets + namespace: external-secrets-datascience-prd + chartDir: external-secrets-2.6.0 + valuesDir: external-secrets + - name: flagger + namespace: flagger-datascience-prd + chartDir: flagger + valuesDir: flagger + - name: coredns + namespace: kube-system + chartDir: coredns-1.13.1 + valuesDir: coredns + additionalValueFiles: + - ../../helm-templates/coredns-1.13.1/gcp-ase1a-values.yaml + - name: kube-dns + namespace: kube-system + chartDir: kube-dns + valuesDir: kube-dns + - name: prometheus-node-exporter + namespace: monitoring + chartDir: prometheus-node-exporter-4.55.0 + valuesDir: prometheus-node-exporter + - name: prometheus-stackdriver-exporter + namespace: monitoring + chartDir: prometheus-stackdriver-exporter-4.12.2 + valuesDir: prometheus-stackdriver-exporter + - name: telegraf-operator + namespace: telegraf-operator + chartDir: telegraf-operator-1.4.0 + valuesDir: telegraf-operator + # - name: opentelemetry-coralogix + # namespace: opentelemetry + # chartDir: opentelemetry-collector-0.158.1 + # valuesDir: opentelemetry-coralogix + - name: fluentd + namespace: fluentd + chartDir: fluentd-0.5.3 + valuesDir: fluentd + - name: loadtester + namespace: loadtester + chartDir: loadtester + valuesDir: loadtester + - name: kube-events + namespace: kube-events + chartDir: kube-events + valuesDir: kube-events + - name: vmalert-stateful-v0 + namespace: victoriametrics + chartDir: victoria-metrics-alert-stateful + valuesDir: victoria-metrics-alert-stateful-v0 + - name: vmalert-secured-stateful-v0 + namespace: victoriametrics + chartDir: victoria-metrics-alert-stateful + valuesDir: victoria-metrics-alert-secured-stateful-v0 + - name: vmagent-dr + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent-dr + - name: vmagent-fb + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent-fb + - name: vmalert-dr + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert-dr + - name: opentelemetry-daemonset + namespace: opentelemetry + chartDir: opentelemetry-collector-0.158.1 + valuesDir: opentelemetry-daemonset + - name: contour-cert-checker + namespace: contour-cert-checker-ns + chartDir: contour-cert-checker + valuesDir: contour-cert-checker + - name: kubernetes-dashboard + namespace: kubernetes-dashboard + chartDir: kubernetes-dashboard + valuesDir: kubernetes-dashboard + - name: aurva-dataplane + namespace: aurva-dataplane + chartDir: aurva-dataplane + valuesDir: aurva-dataplane + - name: coroot-node-agent + namespace: coroot-node-agent + chartDir: coroot-node-agent + valuesDir: coroot-node-agent + - name: vm-agent-v0 + namespace: victoriametrics + chartDir: victoria-metrics-agent-latest + valuesDir: victoriametrics-agent-v0 + - name: vm-select-v0 + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-select-v0 + - name: vm-insert-v0 + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-insert-v0 + - name: vm-storage-v0 + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-storage-v0 + - name: kyverno-datascience-prd + nameOverride: kyverno-datascience-a-prd + namespace: kyverno + chartDir: kyverno-3.8.1 + valuesDir: kyverno + - name: cert-manager + namespace: cert-manager-datascience-prd + chartDir: cert-manager-v1.20.2 + valuesDir: cert-manager + - name: contour-ca-issuer + namespace: contour-ca-issuer-datascience-prd + chartDir: contour-ca-issuer-v2 + valuesDir: contour-ca-issuer + - name: kubectl-mcp-server + namespace: prd-kubectl-mcp-server + chartDir: kubectl-mcp-server-v2 + valuesDir: kubectl-mcp-server + - name: alloy + namespace: alloy + chartDir: alloy + valuesDir: alloy + - name: conntrack-adjuster + namespace: prd-conntrack-adjuster + chartDir: conntrack-adjuster + valuesDir: conntrack-adjuster + - name: contour-internal-dataproc-prd + nameOverride: contour-internal-dataproc-a-prd + namespace: contour-internal-dataproc-prd + chartDir: contour-v1.33.3-v2 + valuesDir: contour-internal-dataproc + - name: nginx-int + namespace: nginx-int + chartDir: ingress-nginx + valuesDir: ingress-nginx-internal + - name: paused-container + namespace: paused-container + chartDir: paused-container + valuesDir: paused-container + # - name: vmalert-secured + # namespace: victoriametrics + # chartDir: victoria-metrics-alert + # valuesDir: victoria-metrics-alert-secured diff --git a/values/prd/incubator-infra-gke-demand-prd-ase1a-values.yaml b/values/prd/incubator-infra-gke-demand-prd-ase1a-values.yaml new file mode 100644 index 0000000..a15c6fc --- /dev/null +++ b/values/prd/incubator-infra-gke-demand-prd-ase1a-values.yaml @@ -0,0 +1,206 @@ +clusterSpec: + destination: + server: "" + name: "gke-demand-prd-ase1a" + +argocdSpec: + namespace: argocd-prd + +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-templates + valueFiles: ../../helm-overrides/gke-demand-prd-ase1a + labels: + bu: infra + team: devops + env: prd + cluster: gke-demand-prd-ase1a + +appSpec: + - name: keda + namespace: keda-demand-prd + chartDir: keda-2.20.1 + valuesDir: keda + # - name: kube-state-metrics + # namespace: kube-system + # chartDir: kube-state-metrics + # valuesDir: kube-state-metrics + - name: contour-internal-0-demand-prd + nameOverride: contour-internal-0-demand-a-prd + namespace: contour-internal-0-demand-prd + chartDir: contour-v1.33.3-v2 + valuesDir: contour-internal-0 + - name: vmalert-stateful + namespace: victoriametrics + chartDir: victoria-metrics-alert-stateful + valuesDir: victoria-metrics-alert-stateful + - name: vmalert-secured-stateful + namespace: victoriametrics + chartDir: victoria-metrics-alert-stateful + valuesDir: victoria-metrics-alert-secured-stateful + - name: contour-internal-1-demand-prd + nameOverride: contour-internal-1-demand-a-prd + namespace: contour-internal-1-demand-prd + chartDir: contour-v1.33.3-v2 + valuesDir: contour-internal-1 + - name: contour-internal-0-demand-intra-prd + nameOverride: contour-internal-0-demand-a-intra-prd + namespace: contour-internal-0-demand-prd-intra + chartDir: contour-v1.33.3-v2 + valuesDir: contour-internal-intra-0 + - name: contour-internal-1-demand-intra-prd + nameOverride: contour-internal-1-demand-a-intra-prd + namespace: contour-internal-1-demand-prd-intra + chartDir: contour-v1.33.3-v2 + valuesDir: contour-internal-intra-1 + - name: contour-external-demand-prd + nameOverride: contour-external-demand-a-prd + namespace: contour-external-demand-prd + chartDir: contour-v1.33.3-v2 + valuesDir: contour-external + # - name: vmagent-shared + # namespace: victoriametrics + # chartDir: victoria-metrics-agent-latest + # valuesDir: victoriametrics-agent-shared + # - name: vmselect + # namespace: victoriametrics + # chartDir: victoria-metrics-cluster + # valuesDir: victoria-metrics-select + # - name: vminsert + # namespace: victoriametrics + # chartDir: victoria-metrics-cluster + # valuesDir: victoria-metrics-insert + # - name: vmstorage + # namespace: victoriametrics + # chartDir: victoria-metrics-cluster + # valuesDir: victoria-metrics-storage + - name: kube-state-metrics + namespace: kube-system + chartDir: kube-state-metrics-7.4.0 + valuesDir: kube-state-metrics + - name: external-secrets + namespace: external-secrets-demand-prd + chartDir: external-secrets-2.6.0 + valuesDir: external-secrets + - name: flagger + namespace: flagger-demand-prd + chartDir: flagger + valuesDir: flagger + - name: coredns + namespace: kube-system + chartDir: coredns-1.13.1 + valuesDir: coredns + additionalValueFiles: + - ../../helm-templates/coredns-1.13.1/gcp-ase1a-values.yaml + - name: kube-dns + namespace: kube-system + chartDir: kube-dns + valuesDir: kube-dns + - name: prometheus-node-exporter + namespace: monitoring + chartDir: prometheus-node-exporter-4.55.0 + valuesDir: prometheus-node-exporter + - name: prometheus-stackdriver-exporter + namespace: monitoring + chartDir: prometheus-stackdriver-exporter-4.12.2 + valuesDir: prometheus-stackdriver-exporter + - name: telegraf-operator + namespace: telegraf-operator + chartDir: telegraf-operator-1.4.0 + valuesDir: telegraf-operator + - name: opentelemetry-coralogix + namespace: opentelemetry + chartDir: opentelemetry-collector-0.158.1 + valuesDir: opentelemetry-coralogix + - name: fluentd + namespace: fluentd + chartDir: fluentd-0.5.3 + valuesDir: fluentd + - name: loadtester + namespace: loadtester + chartDir: loadtester + valuesDir: loadtester + - name: kube-events + namespace: kube-events + chartDir: kube-events + valuesDir: kube-events + # - name: vmalert + # namespace: victoriametrics + # chartDir: victoria-metrics-alert + # valuesDir: victoria-metrics-alert + # - name: vmalert-secured + # namespace: victoriametrics + # chartDir: victoria-metrics-alert + # valuesDir: victoria-metrics-alert-secured + - name: vmagent-dr + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent-dr + - name: vmagent-fb + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent-fb + - name: vmalert-dr + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert-dr + - name: opentelemetry-daemonset + namespace: opentelemetry + chartDir: opentelemetry-collector-0.158.1 + valuesDir: opentelemetry-daemonset + - name: contour-cert-checker + namespace: contour-cert-checker-ns + chartDir: contour-cert-checker + valuesDir: contour-cert-checker + - name: aurva-dataplane + namespace: aurva-dataplane + chartDir: aurva-dataplane + valuesDir: aurva-dataplane + - name: coroot-node-agent + namespace: coroot-node-agent + chartDir: coroot-node-agent + valuesDir: coroot-node-agent + - name: node-thp-config + namespace: prd-node-thp-config + chartDir: node-thp-config + valuesDir: node-thp-config + - name: vm-agent + namespace: victoriametrics + chartDir: victoria-metrics-agent-latest + valuesDir: victoriametrics-agent + - name: vm-select + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-select + - name: vm-insert + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-insert + - name: vm-storage + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-storage + - name: kyverno-demand-prd + nameOverride: kyverno-demand-a-prd + namespace: kyverno + chartDir: kyverno-3.8.1 + valuesDir: kyverno + # - name: vm-agent-secondary + # namespace: victoriametrics + # chartDir: victoria-metrics-agent-latest + # valuesDir: victoriametrics-agent-secondary + - name: cert-manager + namespace: cert-manager-demand-prd + chartDir: cert-manager-v1.20.2 + valuesDir: cert-manager + - name: contour-ca-issuer + namespace: contour-ca-issuer-demand-prd + chartDir: contour-ca-issuer-v2 + valuesDir: contour-ca-issuer + - name: kubectl-mcp-server + namespace: prd-kubectl-mcp-server + chartDir: kubectl-mcp-server-v2 + valuesDir: kubectl-mcp-server diff --git a/values/prd/incubator-infra-gke-dsgpu-prd-ase1a-values.yaml b/values/prd/incubator-infra-gke-dsgpu-prd-ase1a-values.yaml new file mode 100644 index 0000000..9df02a2 --- /dev/null +++ b/values/prd/incubator-infra-gke-dsgpu-prd-ase1a-values.yaml @@ -0,0 +1,159 @@ +clusterSpec: + destination: + server: "" + name: "gke-dsgpu-prd-ase1a" + +argocdSpec: + namespace: argocd-prd + +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-templates + valueFiles: ../../helm-overrides/gke-dsgpu-prd-ase1a + labels: + bu: infra + team: devops + env: prd + cluster: gke-dsgpu-prd-ase1a + +appSpec: + - name: keda + namespace: keda-dsgpu-prd + chartDir: keda + valuesDir: keda + - name: contour-internal-0 + namespace: contour-internal-0-dsgpu-prd + chartDir: contour-v1.33.3-v2 + valuesDir: contour-internal-0 + - name: vmalert-stateful + namespace: victoriametrics + chartDir: victoria-metrics-alert-stateful + valuesDir: victoria-metrics-alert-stateful + - name: contour-internal-1 + namespace: contour-internal-1-dsgpu-prd + chartDir: contour-v1.33.3-v2 + valuesDir: contour-internal-1 + - name: contour-internal-0-dsgpu-intra-prd + nameOverride: contour-internal-0-dsgpu-a-intra-prd + namespace: contour-internal-0-dsgpu-prd-intra + chartDir: contour + valuesDir: contour-internal-intra-0 + - name: contour-internal-1-dsgpu-intra-prd + nameOverride: contour-internal-1-dsgpu-a-intra-prd + namespace: contour-internal-1-dsgpu-prd-intra + chartDir: contour + valuesDir: contour-internal-intra-1 + - name: kube-state-metrics + namespace: kube-system + chartDir: kube-state-metrics + valuesDir: kube-state-metrics + - name: external-secrets + namespace: external-secrets-dsgpu-prd + chartDir: external-secrets-2.6.0 + valuesDir: external-secrets + - name: flagger + namespace: flagger-dsgpu-prd + chartDir: flagger + valuesDir: flagger + - name: coredns + namespace: kube-system + chartDir: coredns + valuesDir: coredns + additionalValueFiles: + - ../../helm-templates/coredns/gcp-ase1a-values.yaml + - name: kube-dns + namespace: kube-system + chartDir: kube-dns + valuesDir: kube-dns + - name: prometheus-node-exporter + namespace: monitoring + chartDir: prometheus-node-exporter + valuesDir: prometheus-node-exporter + - name: prometheus-stackdriver-exporter + namespace: monitoring + chartDir: prometheus-stackdriver-exporter + valuesDir: prometheus-stackdriver-exporter + - name: telegraf-operator + namespace: telegraf-operator + chartDir: telegraf-operator + valuesDir: telegraf-operator + - name: opentelemetry-coralogix + namespace: opentelemetry + chartDir: opentelemetry-collector + valuesDir: opentelemetry-coralogix + - name: fluentd + namespace: fluentd + chartDir: fluentd + valuesDir: fluentd + - name: loadtester + namespace: loadtester + chartDir: loadtester + valuesDir: loadtester + - name: kube-events + namespace: kube-events + chartDir: kube-events + valuesDir: kube-events + - name: paused-container + namespace: paused-container + chartDir: paused-container + valuesDir: paused-container + - name: nginx-int + namespace: nginx-int + chartDir: ingress-nginx + valuesDir: ingress-nginx-internal + - name: opentelemetry-daemonset + namespace: opentelemetry + chartDir: opentelemetry-collector-latest + valuesDir: opentelemetry-daemonset + - name: contour-cert-checker + namespace: contour-cert-checker-ns + chartDir: contour-cert-checker + valuesDir: contour-cert-checker + # - name: aurva-dataplane + # namespace: aurva-dataplane + # chartDir: aurva-dataplane + # valuesDir: aurva-dataplane + - name: vm-agent + namespace: victoriametrics + chartDir: victoria-metrics-agent-latest + valuesDir: victoriametrics-agent + - name: vm-select + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-select + - name: vm-insert + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-insert + - name: vm-storage + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-storage + - name: vmagent-fb + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent-fb + - name: external-dns + namespace: prd-external-dns + chartDir: external-dns + valuesDir: external-dns + - name: cert-manager + namespace: cert-manager-dsgpu-prd + chartDir: cert-manager + valuesDir: cert-manager + - name: contour-ca-issuer + namespace: contour-ca-issuer-dsgpu-prd + chartDir: contour-ca-issuer + valuesDir: contour-ca-issuer + - name: kubectl-mcp-server + namespace: prd-kubectl-mcp-server + chartDir: kubectl-mcp-server + valuesDir: kubectl-mcp-server + - name: kyverno-dsgpu-prd + nameOverride: kyverno-dsgpu-a-prd + namespace: kyverno + chartDir: kyverno-3.8.1 + valuesDir: kyverno diff --git a/values/prd/incubator-infra-gke-farmiso-prd-ase1a-values.yaml b/values/prd/incubator-infra-gke-farmiso-prd-ase1a-values.yaml new file mode 100644 index 0000000..57b9fcf --- /dev/null +++ b/values/prd/incubator-infra-gke-farmiso-prd-ase1a-values.yaml @@ -0,0 +1,148 @@ +clusterSpec: + destination: + server: "" + name: "gke-farmiso-prd-ase1a" + +argocdSpec: + namespace: argocd-prd + +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-templates + valueFiles: ../../helm-overrides/gke-farmiso-prd-ase1a + labels: + bu: infra + team: devops + env: prd + cluster: gke-farmiso-prd-ase1a + +appSpec: + - name: keda + namespace: keda-farmiso-prd + chartDir: keda-2.20.1 + valuesDir: keda + - name: contour-internal-0-farmiso-a-prd + nameOverride: contour-internal-0-farmiso-a-prd + namespace: contour-internal-0-farmiso-prd + chartDir: contour-v1.33.3-v2 + valuesDir: contour-internal-0 + - name: contour-internal-0-farmiso-intra-prd + nameOverride: contour-internal-0-farmiso-a-intra-prd + namespace: contour-internal-0-farmiso-prd-intra + chartDir: contour-v1.33.3-v2 + valuesDir: contour-internal-intra-0 + - name: contour-external-farmiso-a-prd + nameOverride: contour-external-farmiso-a-prd + namespace: contour-external-farmiso-prd + chartDir: contour-v1.33.3-v2 + valuesDir: contour-external + - name: external-secrets + namespace: external-secrets-farmiso-prd + chartDir: external-secrets-2.6.0 + valuesDir: external-secrets + - name: flagger + namespace: flagger-farmiso-prd + chartDir: flagger + valuesDir: flagger + - name: coredns + namespace: kube-system + chartDir: coredns-1.13.1 + valuesDir: coredns + additionalValueFiles: + - ../../helm-templates/coredns-1.13.1/gcp-ase1a-values.yaml + - name: kube-dns + namespace: kube-system + chartDir: kube-dns + valuesDir: kube-dns + - name: kube-state-metrics + namespace: kube-system + chartDir: kube-state-metrics-7.4.0 + valuesDir: kube-state-metrics + - name: prometheus-node-exporter + namespace: monitoring + chartDir: prometheus-node-exporter-4.55.0 + valuesDir: prometheus-node-exporter + - name: prometheus-stackdriver-exporter + namespace: monitoring + chartDir: prometheus-stackdriver-exporter-4.12.2 + valuesDir: prometheus-stackdriver-exporter + - name: telegraf-operator + namespace: telegraf-operator + chartDir: telegraf-operator-1.4.0 + valuesDir: telegraf-operator + - name: loadtester + namespace: loadtester + chartDir: loadtester + valuesDir: loadtester + - name: opentelemetry-coralogix + namespace: opentelemetry + chartDir: opentelemetry-collector-0.158.1 + valuesDir: opentelemetry-coralogix + - name: fluentd + namespace: fluentd + chartDir: fluentd-0.5.3 + valuesDir: fluentd + - name: kube-events + namespace: kube-events + chartDir: kube-events + valuesDir: kube-events + - name: vmalert-stateful + namespace: victoriametrics + chartDir: victoria-metrics-alert-stateful + valuesDir: victoria-metrics-alert-stateful + - name: vmagent-dr + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent-dr + - name: vmagent-fb + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent-fb + - name: vmalert-dr + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert-dr + - name: opentelemetry-daemonset + namespace: opentelemetry + chartDir: opentelemetry-collector-0.158.1 + valuesDir: opentelemetry-daemonset + - name: contour-cert-checker + namespace: contour-cert-checker-ns + chartDir: contour-cert-checker + valuesDir: contour-cert-checker + - name: aurva-dataplane + namespace: aurva-dataplane + chartDir: aurva-dataplane + valuesDir: aurva-dataplane + - name: vm-agent + namespace: victoriametrics + chartDir: victoria-metrics-agent-latest + valuesDir: victoriametrics-agent + - name: vm-select + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-select + - name: vm-insert + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-insert + - name: vm-storage + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-storage + - name: kyverno-farmiso-prd + nameOverride: kyverno-farmiso-a-prd + namespace: kyverno + chartDir: kyverno-3.8.1 + valuesDir: kyverno + - name: cert-manager + namespace: cert-manager-farmiso-prd + chartDir: cert-manager-v1.20.2 + valuesDir: cert-manager + - name: kubectl-mcp-server + namespace: prd-kubectl-mcp-server + chartDir: kubectl-mcp-server + valuesDir: kubectl-mcp-server diff --git a/values/prd/incubator-infra-gke-supply-prd-ase1a-values.yaml b/values/prd/incubator-infra-gke-supply-prd-ase1a-values.yaml new file mode 100644 index 0000000..c9ec9ea --- /dev/null +++ b/values/prd/incubator-infra-gke-supply-prd-ase1a-values.yaml @@ -0,0 +1,198 @@ +clusterSpec: + destination: + server: "" + name: "gke-supply-prd-ase1a" + +argocdSpec: + namespace: argocd-prd + +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-templates + valueFiles: ../../helm-overrides/gke-supply-prd-ase1a + labels: + bu: infra + team: devops + env: prd + cluster: gke-supply-prd-ase1a + +appSpec: + - name: keda + namespace: keda-supply-prd + chartDir: keda-2.20.1 + valuesDir: keda + - name: contour-internal-0-supply-prd + nameOverride: contour-internal-0-supply-a-prd + namespace: contour-internal-0-supply-prd + chartDir: contour-v1.33.3-v2 + valuesDir: contour-internal-0 + - name: contour-internal-1-supply-prd + nameOverride: contour-internal-1-supply-a-prd + namespace: contour-internal-1-supply-prd + chartDir: contour-v1.33.3-v2 + valuesDir: contour-internal-1 + - name: contour-internal-0-supply-intra-prd + nameOverride: contour-internal-0-supply-a-intra-prd + namespace: contour-internal-0-supply-prd-intra + chartDir: contour-v1.33.3-v2 + valuesDir: contour-internal-intra-0 + - name: contour-internal-1-supply-intra-prd + nameOverride: contour-internal-1-supply-a-intra-prd + namespace: contour-internal-1-supply-prd-intra + chartDir: contour-v1.33.3-v2 + valuesDir: contour-internal-intra-1 + - name: contour-external-supply-prd + nameOverride: contour-external-supply-a-prd + namespace: contour-external-supply-prd + chartDir: contour-v1.33.3-v2 + valuesDir: contour-external + - name: kube-state-metrics + namespace: kube-system + chartDir: kube-state-metrics-7.4.0 + valuesDir: kube-state-metrics + - name: external-secrets + namespace: external-secrets-supply-prd + chartDir: external-secrets-2.6.0 + valuesDir: external-secrets + - name: flagger + namespace: flagger-supply-prd + chartDir: flagger + valuesDir: flagger + - name: coredns + namespace: kube-system + chartDir: coredns-1.13.1 + valuesDir: coredns + additionalValueFiles: + - ../../helm-templates/coredns-1.13.1/gcp-ase1a-values.yaml + - name: kube-dns + namespace: kube-system + chartDir: kube-dns + valuesDir: kube-dns + - name: prometheus-node-exporter + namespace: monitoring + chartDir: prometheus-node-exporter-4.55.0 + valuesDir: prometheus-node-exporter + - name: prometheus-stackdriver-exporter + namespace: monitoring + chartDir: prometheus-stackdriver-exporter-4.12.2 + valuesDir: prometheus-stackdriver-exporter + - name: telegraf-operator + namespace: telegraf-operator + chartDir: telegraf-operator-1.4.0 + valuesDir: telegraf-operator + - name: telegraf-operator-custom + namespace: telegraf-operator-custom + chartDir: telegraf-operator-1.4.0 + valuesDir: telegraf-operator-custom + - name: opentelemetry-coralogix + namespace: opentelemetry + chartDir: opentelemetry-collector-0.158.1 + valuesDir: opentelemetry-coralogix + - name: fluentd + namespace: fluentd + chartDir: fluentd-0.5.3 + valuesDir: fluentd + - name: loadtester + namespace: loadtester + chartDir: loadtester + valuesDir: loadtester + - name: kube-events + namespace: kube-events + chartDir: kube-events + valuesDir: kube-events + - name: vmalert-stateful + namespace: victoriametrics + chartDir: victoria-metrics-alert-stateful + valuesDir: victoria-metrics-alert-stateful + - name: vmalert-secured-stateful + namespace: victoriametrics + chartDir: victoria-metrics-alert-stateful + valuesDir: victoria-metrics-alert-secured-stateful + - name: deepgram + namespace: dg-self-hosted-a + chartDir: deepgram-onprem + valuesDir: deepgram-onprem + - name: deepgram-v2 + namespace: dg-self-hosted-v2-a + chartDir: deepgram-onprem + valuesDir: deepgram-onprem-v2 + - name: vmagent-dr + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent-dr + - name: vmagent-fb + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent-fb + - name: vmalert-dr + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert-dr + - name: opentelemetry-daemonset + namespace: opentelemetry + chartDir: opentelemetry-collector-0.158.1 + valuesDir: opentelemetry-daemonset + - name: contour-cert-checker + namespace: contour-cert-checker-ns + chartDir: contour-cert-checker + valuesDir: contour-cert-checker + - name: kubernetes-dashboard + namespace: kubernetes-dashboard + chartDir: kubernetes-dashboard + valuesDir: kubernetes-dashboard + - name: aurva-dataplane + namespace: aurva-dataplane + chartDir: aurva-dataplane + valuesDir: aurva-dataplane + # - name: fluentd-sumoduolite-np + # namespace: fluentd + # chartDir: fluentd-0.5.3 + # valuesDir: fluentd-sumoduolite-np + # - name: opentelemetry-daemonset-medium-np + # namespace: opentelemetry + # chartDir: opentelemetry-collector-0.158.1 + # valuesDir: opentelemetry-daemonset-medium-np + - name: coroot-node-agent + namespace: coroot-node-agent + chartDir: coroot-node-agent + valuesDir: coroot-node-agent + - name: node-thp-config + namespace: prd-node-thp-config + chartDir: node-thp-config + valuesDir: node-thp-config + - name: vm-agent + namespace: victoriametrics + chartDir: victoria-metrics-agent-latest + valuesDir: victoriametrics-agent + - name: vm-select + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-select + - name: vm-insert + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-insert + - name: vm-storage + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-storage + - name: kyverno-supply-prd + nameOverride: kyverno-supply-a-prd + namespace: kyverno + chartDir: kyverno-3.8.1 + valuesDir: kyverno + - name: cert-manager + namespace: cert-manager-supply-prd + chartDir: cert-manager-v1.20.2 + valuesDir: cert-manager + - name: contour-ca-issuer + namespace: contour-ca-issuer-supply-prd + chartDir: contour-ca-issuer-v2 + valuesDir: contour-ca-issuer + - name: kubectl-mcp-server + namespace: prd-kubectl-mcp-server + chartDir: kubectl-mcp-server-v2 + valuesDir: kubectl-mcp-server diff --git a/values/prd/incubator-infra-k8s-admin-prd-ase1-values.yaml b/values/prd/incubator-infra-k8s-admin-prd-ase1-values.yaml new file mode 100644 index 0000000..5bcf411 --- /dev/null +++ b/values/prd/incubator-infra-k8s-admin-prd-ase1-values.yaml @@ -0,0 +1,416 @@ +clusterSpec: + destination: + server: "" + name: "k8s-admin-prd-ase1" + +argocdSpec: + namespace: argocd-prd + +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-templates + valueFiles: ../../helm-overrides/k8s-admin-prd-ase1 + labels: + bu: infra + team: devops + env: prd + cluster: k8s-admin-prd-ase1 + +appSpec: + - name: argocd + nameOverride: argocd-central-prd + namespace: argocd-central-prd + chartDir: argo-cd + valuesDir: argocd-central + - name: argocd + nameOverride: argocd-central-ase1c-prd + namespace: argocd-central-ase1c-prd + chartDir: argo-cd-green + valuesDir: argocd-central-ase1c + - name: argocd + nameOverride: argocd-demand-ase1c-prd + namespace: argocd-demand-ase1c-prd + chartDir: argo-cd-green + valuesDir: argocd-demand-ase1c + - name: argocd + nameOverride: argocd-supply-ase1c-prd + namespace: argocd-supply-ase1c-prd + chartDir: argo-cd-green + valuesDir: argocd-supply-ase1c + - name: argocd + nameOverride: argocd-dataengg-ase1c-prd + namespace: argocd-dataengg-ase1c-prd + chartDir: argo-cd-green + valuesDir: argocd-dataengg-ase1c + - name: argocd + nameOverride: argocd-datascience-ase1c-prd + namespace: argocd-datascience-ase1c-prd + chartDir: argo-cd-green + valuesDir: argocd-datascience-ase1c + - name: keda + namespace: keda-admin-prd + chartDir: keda + valuesDir: keda + - name: argocd + nameOverride: argocd-dataengg-prd + namespace: argocd-dataengg-prd + chartDir: argo-cd + valuesDir: argocd-dataengg + - name: argocd + nameOverride: argocd-dataengg-ase1a-prd + namespace: argocd-dataengg-ase1a-prd + chartDir: argo-cd-9.5.21 + valuesDir: argocd-dataengg-v2 + - name: argocd + nameOverride: argocd-datascience-prd + namespace: argocd-datascience-prd + chartDir: argo-cd + valuesDir: argocd-datascience + - name: argocd + nameOverride: argocd-dsgpu-prd + namespace: argocd-dsgpu-prd + chartDir: argo-cd + valuesDir: argocd-dsgpu + - name: argocd + nameOverride: argocd-dsgpu-ase1a-prd + namespace: argocd-dsgpu-ase1a-prd + chartDir: argo-cd-9.5.21 + valuesDir: argocd-dsgpu-v2 + - name: argocd + nameOverride: argocd-demand-prd + namespace: argocd-demand-prd + chartDir: argo-cd + valuesDir: argocd-demand + - name: argocd + nameOverride: argocd-demand-ase1a-prd + namespace: argocd-demand-ase1a-prd + chartDir: argo-cd-9.5.21 + valuesDir: argocd-demand-v2 + - name: argocd + nameOverride: argocd-central-ase1a-prd + namespace: argocd-central-ase1a-prd + chartDir: argo-cd-9.5.21 + valuesDir: argocd-central-v2 + - name: argocd + nameOverride: argocd-farmiso-prd + namespace: argocd-farmiso-prd + chartDir: argo-cd + valuesDir: argocd-farmiso + - name: argocd + nameOverride: argocd-farmiso-ase1a-prd + namespace: argocd-farmiso-ase1a-prd + chartDir: argo-cd-9.5.21 + valuesDir: argocd-farmiso-v2 + - name: argocd + nameOverride: argocd-supply-prd + namespace: argocd-supply-prd + chartDir: argo-cd + valuesDir: argocd-supply + - name: argocd + nameOverride: argocd-supply-ase1a-prd + namespace: argocd-supply-ase1a-prd + chartDir: argo-cd-9.5.21 + valuesDir: argocd-supply-v2 + - name: argocd + nameOverride: argocd-datascience-ase1a-prd + namespace: argocd-datascience-ase1a-prd + chartDir: argo-cd-9.5.21 + valuesDir: argocd-datascience-v2 + - name: argocd + nameOverride: argocd-shared-int + namespace: argocd-shared-int + chartDir: argo-cd + valuesDir: argocd-shared + - name: external-secrets + namespace: external-secrets-admin-prd + chartDir: external-secrets + valuesDir: external-secrets + - name: nginx + namespace: nginx-admin-prd + chartDir: ingress-nginx + valuesDir: ingress-nginx + - name: nginx-external + namespace: nginx-external-admin-prd + chartDir: ingress-nginx + valuesDir: ingress-nginx-external + - name: vault + namespace: vault-admin-prd + chartDir: vault + valuesDir: vault + - name: flagger + namespace: flagger-admin-prd + chartDir: flagger + valuesDir: flagger + - name: coredns + namespace: kube-system + chartDir: coredns + valuesDir: coredns + additionalValueFiles: + - ../../helm-templates/coredns/gcp-ase1a-values.yaml + - name: kube-dns + namespace: kube-system + chartDir: kube-dns + valuesDir: kube-dns + - name: prometheus-node-exporter + namespace: monitoring + chartDir: prometheus-node-exporter + valuesDir: prometheus-node-exporter + - name: prometheus-stackdriver-exporter + namespace: monitoring + chartDir: prometheus-stackdriver-exporter + valuesDir: prometheus-stackdriver-exporter + - name: vm-agent + namespace: victoriametrics + chartDir: victoria-metrics-agent-latest + valuesDir: victoriametrics-agent + - name: vm-select + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-select + - name: vm-insert + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-insert + - name: vm-storage + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-storage + - name: vmagent + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent + - name: vmselect + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-select + - name: vmselect-test + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-select-test + - name: vminsert + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-insert + - name: vmstorage + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-storage + - name: vmstorage-mds-backup + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-storage-mds-backup + - name: kube-state-metrics + namespace: kube-system + chartDir: kube-state-metrics + valuesDir: kube-state-metrics + - name: vmalert + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert + - name: vmalert-stateful + namespace: victoriametrics + chartDir: victoria-metrics-alert-stateful + valuesDir: victoria-metrics-alert-stateful + - name: victoria-metrics-mcp + namespace: victoriametrics + chartDir: victoria-metrics-mcp + valuesDir: victoria-metrics-mcp + - name: vmalert-secured-stateful + namespace: victoriametrics + chartDir: victoria-metrics-alert-stateful + valuesDir: victoria-metrics-alert-secured-stateful + - name: vmagent-dr + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent-dr + - name: vmselect-dr + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-select-dr + - name: vmalert-dr + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert-dr + - name: vminsert-dr + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-insert-dr + - name: vmstorage-dr + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-storage-dr + - name: vmagent-fb + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent-fb + - name: vmalert-fb + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert-fb + - name: vmsingle-fb + namespace: victoriametrics + chartDir: victoria-metrics-single + valuesDir: victoria-metrics-single-fb + - name: vminsert-dbackup + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-insert-dbackup + - name: vmstorage-dbackup + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-storage-dbackup + - name: vmselect-dbackup + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-select-dbackup + - name: vmalert-config + namespace: victoriametrics + chartDir: vm-alert-config + valuesDir: vm-alert-config + - name: vmauth + namespace: victoriametrics + chartDir: victoria-metrics-auth + valuesDir: victoria-metrics-auth + - name: vmalert-secured + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert-secured + - name: sonarqube + namespace: sonarqube + chartDir: sonarqube + valuesDir: sonarqube + - name: sonarqube-public + namespace: sonarqube-public + chartDir: sonarqube + valuesDir: sonarqube-public + - name: alertmanager + namespace: alertmanager + chartDir: alertmanager + valuesDir: alertmanager + - name: grafana + namespace: grafana + chartDir: grafana + valuesDir: grafana + - name: grafana-secured + namespace: grafana + chartDir: grafana + valuesDir: grafana-sec + - name: jenkins + namespace: jenkins + chartDir: jenkins-grn + valuesDir: jenkins + - name: dind + namespace: jenkins + chartDir: dind + valuesDir: dind + - name: dind-int + namespace: jenkins + chartDir: dind + valuesDir: dind-int + - name: jenkins-admin + namespace: jenkins-admin + chartDir: jenkins + valuesDir: jenkins-admin + - name: jfrog + namespace: jfrog + chartDir: jfrog + valuesDir: jfrog + - name: jfrog-public + namespace: jfrog-public + chartDir: jfrog + valuesDir: jfrog-public + - name: opentelemetry-collector + namespace: opentelemetry + chartDir: opentelemetry-collector + valuesDir: opentelemetry-collector + - name: fluentd + namespace: fluentd + chartDir: fluentd + valuesDir: fluentd + - name: deepfence-agent + nameOverride: admin-prd-deepfence-agent + namespace: deepfence + chartDir: deepfence-agent + valuesDir: deepfence-agent + - name: canary-bot + nameOverride: canary-bot + namespace: canary-bot + chartDir: canary-bot-gcp + valuesDir: canary-bot-gcp + - name: kube-events + namespace: kube-events + chartDir: kube-events + valuesDir: kube-events + - name: paused-container + namespace: paused-container + chartDir: paused-container + valuesDir: paused-container + - name: uptime-kuma + namespace: uptime-kuma + chartDir: uptime-kuma + valuesDir: uptime-kuma + - name: pmm-mongo + nameOverride: pmmmongo-admin-prd + namespace: pmmmongo-admin-prd + chartDir: pmm + valuesDir: pmm-mongo + - name: grafana-edge + namespace: observability + chartDir: grafana-edge + valuesDir: grafana-edge + - name: opentelemetry-deployment + namespace: opentelemetry + chartDir: opentelemetry-collector-latest + valuesDir: opentelemetry-deployment + - name: superset-infra + namespace: prd-superset-infra + chartDir: superset + valuesDir: superset + - name: aurva-dataplane + namespace: aurva-dataplane + chartDir: aurva-dataplane + valuesDir: aurva-dataplane + - name: argocd + nameOverride: argocd-ml-platform-prd + namespace: argocd-ml-platform-prd + chartDir: argo-cd + valuesDir: argocd-ml-platform + - name: athens-proxy + namespace: athens-proxy + chartDir: athens-proxy + valuesDir: athens-proxy + - name: pyroscope + namespace: prd-pyroscope + chartDir: pyroscope + valuesDir: pyroscope + - name: eck-operator-admin + namespace: elastic-operator + chartDir: eck-operator + valuesDir: eck-operator + - name: elastalert2-admin-prd + namespace: elastalert-prd + chartDir: elastalert2 + valuesDir: elastalert2 + - name: contour-internal-0 + namespace: contour-internal-0-admin-prd + chartDir: contour-v1.33.3 + valuesDir: contour-internal-0 + - name: cert-manager + namespace: cert-manager-admin-prd + chartDir: cert-manager + valuesDir: cert-manager + - name: contour-ca-issuer + namespace: contour-ca-issuer-admin-prd + chartDir: contour-ca-issuer + valuesDir: contour-ca-issuer + - name: contour-cert-checker + namespace: contour-cert-checker-ns + chartDir: contour-cert-checker + valuesDir: contour-cert-checker + - name: kubectl-mcp-server + namespace: prd-kubectl-mcp-server + chartDir: kubectl-mcp-server + valuesDir: kubectl-mcp-server diff --git a/values/prd/incubator-infra-k8s-central-mqkafka-prd-ase1-values.yaml b/values/prd/incubator-infra-k8s-central-mqkafka-prd-ase1-values.yaml new file mode 100644 index 0000000..bbc8e87 --- /dev/null +++ b/values/prd/incubator-infra-k8s-central-mqkafka-prd-ase1-values.yaml @@ -0,0 +1,111 @@ +clusterSpec: + destination: + server: "" + name: "k8s-central-mqkafka-prd-ase1" + +argocdSpec: + namespace: argocd-prd + +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-templates + valueFiles: ../../helm-overrides/k8s-central-mqkafka-prd-ase1 + labels: + bu: infra + team: devops + env: prd + cluster: k8s-central-mqkafka-prd-ase1 + +appSpec: + - name: keda + namespace: keda-mq-prd + chartDir: keda + valuesDir: keda + - name: kube-state-metrics + namespace: kube-system + chartDir: kube-state-metrics + valuesDir: kube-state-metrics + - name: prometheus-node-exporter + namespace: monitoring + chartDir: prometheus-node-exporter + valuesDir: prometheus-node-exporter + - name: fluentd + namespace: fluentd + chartDir: fluentd + valuesDir: fluentd + - name: kube-events + namespace: kube-events + chartDir: kube-events + valuesDir: kube-events + - name: nginx-int + namespace: nginx-int + chartDir: ingress-nginx + valuesDir: ingress-nginx-internal + - name: nginx-prd + namespace: nginx-prd + chartDir: ingress-nginx + valuesDir: ingress-nginx-internal-v1 + - name: nginx-ds + namespace: nginx-ds + chartDir: ingress-nginx + valuesDir: ds-kafka-clusters-nginx + - name: nginx-backend + namespace: nginx-backend + chartDir: ingress-nginx + valuesDir: backend-nginx-cluster + - name: nginx-demand + namespace: nginx-demand + chartDir: ingress-nginx + valuesDir: nginx-demand + - name: nginx-supply + namespace: nginx-supply + chartDir: ingress-nginx + valuesDir: nginx-supply + - name: vmagent + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent + - name: vmselect + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-select + - name: vminsert + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-insert + - name: vmstorage + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-storage + - name: vmalert + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert + - name: vm-agent + namespace: victoriametrics + chartDir: victoria-metrics-agent-latest + valuesDir: victoriametrics-agent + - name: vm-select + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-select + - name: vm-insert + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-insert + - name: vm-storage + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-storage + - name: external-secrets + namespace: external-secrets-mq-prd + chartDir: external-secrets + valuesDir: external-secrets + - name: flagger + namespace: flagger-mq-prd + chartDir: flagger + valuesDir: flagger + diff --git a/values/prd/incubator-infra-k8s-central-prd-ase1-values.yaml b/values/prd/incubator-infra-k8s-central-prd-ase1-values.yaml new file mode 100644 index 0000000..950740c --- /dev/null +++ b/values/prd/incubator-infra-k8s-central-prd-ase1-values.yaml @@ -0,0 +1,243 @@ +clusterSpec: + destination: + server: "" + name: "k8s-central-prd-ase1" + +argocdSpec: + namespace: argocd-prd + +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-templates + valueFiles: ../../helm-overrides/k8s-central-prd-ase1 + labels: + bu: infra + team: devops + env: prd + cluster: k8s-central-prd-ase1 + +appSpec: + - name: keda + namespace: keda-central-prd + chartDir: keda + valuesDir: keda + - name: argocd-test + namespace: argocd-central-prd + chartDir: argo-cd + valuesDir: argocd + - name: contour-internal-0 + namespace: contour-internal-0-central-prd + chartDir: contour-v1.33.3 + valuesDir: contour-internal-0 + - name: vmalert-stateful + namespace: victoriametrics + chartDir: victoria-metrics-alert-stateful + valuesDir: victoria-metrics-alert-stateful + - name: vmalert-secured-stateful + namespace: victoriametrics + chartDir: victoria-metrics-alert-stateful + valuesDir: victoria-metrics-alert-secured-stateful + - name: contour-internal-1 + namespace: contour-internal-1-central-prd + chartDir: contour-v1.33.3 + valuesDir: contour-internal-1 + - name: contour-internal-0-central-intra-prd + nameOverride: contour-internal-0-central-intra-prd + namespace: contour-internal-0-central-prd-intra + chartDir: contour-v1.33.3 + valuesDir: contour-internal-intra-0 + - name: contour-internal-1-central-intra-prd + nameOverride: contour-internal-1-central-intra-prd + namespace: contour-internal-1-central-prd-intra + chartDir: contour-v1.33.3 + valuesDir: contour-internal-intra-1 + - name: contour-external + namespace: contour-external-central-prd + chartDir: contour-v1.33.3 + valuesDir: contour-external + - name: contour-external-1 + namespace: contour-external-1-central-prd + chartDir: contour-v1.33.3 + valuesDir: contour-external-1 + - name: vmagent + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent + - name: vmselect + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-select + - name: vminsert + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-insert + - name: vmstorage + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-storage + - name: kube-state-metrics + namespace: kube-system + chartDir: kube-state-metrics + valuesDir: kube-state-metrics + - name: external-secrets + namespace: external-secrets-central-prd + chartDir: external-secrets + valuesDir: external-secrets + - name: flagger + namespace: flagger-central-prd + chartDir: flagger + valuesDir: flagger + - name: coredns + namespace: kube-system + chartDir: coredns + valuesDir: coredns + additionalValueFiles: + - ../../helm-templates/coredns/gcp-ase1a-values.yaml + - name: kube-dns + namespace: kube-system + chartDir: kube-dns + valuesDir: kube-dns + - name: prometheus-node-exporter + namespace: monitoring + chartDir: prometheus-node-exporter + valuesDir: prometheus-node-exporter + - name: prometheus-stackdriver-exporter + namespace: monitoring + chartDir: prometheus-stackdriver-exporter + valuesDir: prometheus-stackdriver-exporter + - name: telegraf-operator + namespace: telegraf-operator + chartDir: telegraf-operator + valuesDir: telegraf-operator + - name: opentelemetry-coralogix + namespace: opentelemetry + chartDir: opentelemetry-collector + valuesDir: opentelemetry-coralogix + - name: fluentd + namespace: fluentd + chartDir: fluentd + valuesDir: fluentd + - name: fluentd-copy + namespace: fluentd-copy + chartDir: fluentd + valuesDir: fluentd-copy + - name: loadtester + namespace: loadtester + chartDir: loadtester + valuesDir: loadtester + - name: kube-events + namespace: kube-events + chartDir: kube-events + valuesDir: kube-events + - name: vmagent-dr + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent-dr + - name: vmagent-fb + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent-fb + - name: vmalert-dr + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert-dr + - name: vmalert + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert + - name: vmalert-secured + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert-secured + - name: opentelemetry-daemonset + namespace: opentelemetry + chartDir: opentelemetry-collector-latest + valuesDir: opentelemetry-daemonset + - name: opentelemetry-claude-metrics + namespace: claude-observability + chartDir: opentelemetry-collector-latest + valuesDir: opentelemetry-claude-metrics + - name: opentelemetry-codex-metrics + namespace: codex-observability + chartDir: opentelemetry-collector-latest + valuesDir: opentelemetry-codex-metrics + - name: etcd + namespace: etcd-prd + chartDir: etcd + valuesDir: etcd + - name: contour-cert-checker + namespace: contour-cert-checker-ns + chartDir: contour-cert-checker + valuesDir: contour-cert-checker + - name: aurva-dataplane + namespace: aurva-dataplane + chartDir: aurva-dataplane + valuesDir: aurva-dataplane + - name: shared-temporal + namespace: shared-temporal + chartDir: temporal + valuesDir: temporal + - name: coroot-node-agent + namespace: coroot-node-agent + chartDir: coroot-node-agent + valuesDir: coroot-node-agent + - name: vm-agent + namespace: victoriametrics + chartDir: victoria-metrics-agent-latest + valuesDir: victoriametrics-agent + - name: vm-select + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-select + - name: vm-insert + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-insert + - name: vm-storage + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-storage + - name: kyverno-central-prd + nameOverride: kyverno-central-prd + namespace: kyverno + chartDir: kyverno + valuesDir: kyverno + - name: langfuse + namespace: langfuse + chartDir: langfuse + valuesDir: langfuse + - name: loghouse + namespace: prd-loghouse + chartDir: clickhouse + valuesDir: clickhouse + - name: ai-gateway + namespace: prd-ai-gateway + chartDir: bifrost + valuesDir: ai-gateway + - name: elasticsearch-mcp + namespace: elasticsearch-mcp + chartDir: elasticsearch-mcp + valuesDir: elasticsearch-mcp + - name: cert-manager + namespace: cert-manager-central-prd + chartDir: cert-manager + valuesDir: cert-manager + - name: contour-ca-issuer + namespace: contour-ca-issuer-central-prd + chartDir: contour-ca-issuer + valuesDir: contour-ca-issuer + - name: akamai-observability-mcp + namespace: akamai-observability-mcp + chartDir: grafana-mcp + valuesDir: akamai-observability-mcp + - name: kubectl-mcp-server + namespace: prd-kubectl-mcp-server + chartDir: kubectl-mcp-server + valuesDir: kubectl-mcp-server + - name: fireworks-ai + namespace: prd-fireworks-ai + chartDir: bifrost-v1.5.12 + valuesDir: fireworks-ai diff --git a/values/prd/incubator-infra-k8s-central-prd-ase1c-values.yaml b/values/prd/incubator-infra-k8s-central-prd-ase1c-values.yaml new file mode 100644 index 0000000..6395405 --- /dev/null +++ b/values/prd/incubator-infra-k8s-central-prd-ase1c-values.yaml @@ -0,0 +1,160 @@ +clusterSpec: + destination: + server: "" + name: "k8s-central-prd-ase1c" + +argocdSpec: + namespace: argocd-prd + +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-templates + valueFiles: ../../helm-overrides/k8s-central-prd-ase1c + labels: + bu: infra + team: devops + env: prd + cluster: k8s-central-prd-ase1c + +appSpec: + - name: keda + namespace: keda-central-prd + chartDir: keda + valuesDir: keda + # - name: argocd-test + # namespace: argocd-central-prd + # chartDir: argo-cd + # valuesDir: argocd + - name: contour-internal-0 + appNameOverride: contour-internal-0-central-c-prd + namespace: contour-internal-0-central-prd + chartDir: contour + valuesDir: contour-internal-0 + - name: contour-internal-1 + namespace: contour-internal-1-central-prd + chartDir: contour + valuesDir: contour-internal-1 + - name: contour-internal-0-central-c-intra-prd + nameOverride: contour-internal-0-central-c-intra-prd + namespace: contour-internal-0-central-prd-intra + chartDir: contour + valuesDir: contour-internal-intra-0 + - name: contour-internal-1-central-c-intra-prd + nameOverride: contour-internal-1-central-c-intra-prd + namespace: contour-internal-1-central-prd-intra + chartDir: contour + valuesDir: contour-internal-intra-1 + - name: contour-external + namespace: contour-external-central-prd + chartDir: contour + valuesDir: contour-external + - name: contour-external-1 + namespace: contour-external-1-central-prd + chartDir: contour + valuesDir: contour-external-1 + - name: vmagent + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent + - name: vmselect + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-select + - name: vminsert + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-insert + - name: vmstorage + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-storage + - name: nginx + namespace: nginx-central-ase1c-prd + chartDir: ingress-nginx + valuesDir: ingress-nginx + - name: kube-state-metrics + namespace: kube-system + chartDir: kube-state-metrics + valuesDir: kube-state-metrics + - name: external-secrets + appNameOverride: external-secrets-central-c-prd + namespace: external-secrets-central-prd + chartDir: external-secrets + valuesDir: external-secrets + - name: flagger + namespace: flagger-central-prd + chartDir: flagger + valuesDir: flagger + - name: coredns + namespace: kube-system + chartDir: coredns + valuesDir: coredns + additionalValueFiles: + - ../../helm-templates/coredns/gcp-ase1c-values.yaml + - name: kube-dns + namespace: kube-system + chartDir: kube-dns + valuesDir: kube-dns + - name: prometheus-node-exporter + namespace: monitoring + chartDir: prometheus-node-exporter + valuesDir: prometheus-node-exporter + - name: prometheus-stackdriver-exporter + namespace: monitoring + chartDir: prometheus-stackdriver-exporter + valuesDir: prometheus-stackdriver-exporter + - name: telegraf-operator + namespace: telegraf-operator + chartDir: telegraf-operator + valuesDir: telegraf-operator + # - name: opentelemetry-coralogix + # namespace: opentelemetry + # chartDir: opentelemetry-collector + # valuesDir: opentelemetry-coralogix + - name: fluentd + namespace: fluentd + chartDir: fluentd + valuesDir: fluentd + # - name: loadtester + # namespace: loadtester + # chartDir: loadtester + # valuesDir: loadtester + - name: kube-events + namespace: kube-events + chartDir: kube-events + valuesDir: kube-events + # - name: vmagent-dr + # namespace: victoriametrics + # chartDir: victoria-metrics-agent + # valuesDir: victoria-metrics-agent-dr + # - name: vmalert-dr + # namespace: victoriametrics + # chartDir: victoria-metrics-alert + # valuesDir: victoria-metrics-alert-dr + # - name: alloy + # namespace: observability + # chartDir: alloy + # valuesDir: alloy + # - name: vmalert + # namespace: victoriametrics + # chartDir: victoria-metrics-alert + # valuesDir: victoria-metrics-alert + - name: opentelemetry-daemonset + namespace: opentelemetry + chartDir: opentelemetry-collector-latest + valuesDir: opentelemetry-daemonset + - name: opentelemetry-deployment + namespace: opentelemetry + chartDir: opentelemetry-collector-latest + valuesDir: opentelemetry-deployment + # - name: etcd + # namespace: etcd-prd + # chartDir: etcd + # valuesDir: etcd + - name: contour-cert-checker + namespace: contour-cert-checker-ns + chartDir: contour-cert-checker + valuesDir: contour-cert-checker diff --git a/values/prd/incubator-infra-k8s-dataengg-prd-ase1-values.yaml b/values/prd/incubator-infra-k8s-dataengg-prd-ase1-values.yaml new file mode 100644 index 0000000..ffb217f --- /dev/null +++ b/values/prd/incubator-infra-k8s-dataengg-prd-ase1-values.yaml @@ -0,0 +1,227 @@ +clusterSpec: + destination: + server: "" + name: "k8s-dataengg-prd-ase1" + +argocdSpec: + namespace: argocd-prd + +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-templates + valueFiles: ../../helm-overrides/k8s-dataengg-prd-ase1 + labels: + bu: infra + team: devops + env: prd + cluster: k8s-dataengg-prd-ase1 + +appSpec: + - name: keda + namespace: keda-dataengg-prd + chartDir: keda + valuesDir: keda + - name: vmalert-stateful + namespace: victoriametrics + chartDir: victoria-metrics-alert-stateful + valuesDir: victoria-metrics-alert-stateful + - name: vmalert-startree-stateful + namespace: victoriametrics + chartDir: victoria-metrics-alert-stateful + valuesDir: victoria-metrics-alert-startree-stateful + - name: contour-internal-0 + namespace: contour-internal-0-dataengg-prd + chartDir: contour-v1.33.3 + valuesDir: contour-internal-0 + - name: contour-internal-1 + namespace: contour-internal-1-dataengg-prd + chartDir: contour-v1.33.3 + valuesDir: contour-internal-1 + - name: contour-internal-0-dataengg-intra-prd + nameOverride: contour-internal-0-dataengg-intra-prd + namespace: contour-internal-0-dataengg-prd-intra + chartDir: contour-v1.33.3 + valuesDir: contour-internal-intra-0 + - name: contour-internal-1-dataengg-intra-prd + nameOverride: contour-internal-1-dataengg-intra-prd + namespace: contour-internal-1-dataengg-prd-intra + chartDir: contour-v1.33.3 + valuesDir: contour-internal-intra-1 + - name: contour-external + namespace: contour-external-dataengg-prd + chartDir: contour-v1.33.3 + valuesDir: contour-external + - name: vmagent + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent + - name: vmagent-startree + namespace: victoriametrics-startree + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent-startree + - name: vmselect + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-select + - name: vmselect-startree + namespace: victoriametrics-startree + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-select-startree + - name: vminsert + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-insert + - name: vminsert-startree + namespace: victoriametrics-startree + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-insert-startree + - name: vmstorage + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-storage + - name: vmstorage-startree + namespace: victoriametrics-startree + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-storage-startree + - name: vmalert-startree + namespace: victoriametrics-startree + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert-startree + - name: kube-state-metrics + namespace: kube-system + chartDir: kube-state-metrics + valuesDir: kube-state-metrics + - name: external-secrets + namespace: external-secrets-dataengg-prd + chartDir: external-secrets + valuesDir: external-secrets + - name: flagger + namespace: flagger-dataengg-prd + chartDir: flagger + valuesDir: flagger + - name: coredns + namespace: kube-system + chartDir: coredns + valuesDir: coredns + additionalValueFiles: + - ../../helm-templates/coredns/gcp-ase1a-values.yaml + - name: kube-dns + namespace: kube-system + chartDir: kube-dns + valuesDir: kube-dns + - name: prometheus-node-exporter + namespace: monitoring + chartDir: prometheus-node-exporter + valuesDir: prometheus-node-exporter + - name: prometheus-stackdriver-exporter + namespace: monitoring + chartDir: prometheus-stackdriver-exporter + valuesDir: prometheus-stackdriver-exporter + - name: telegraf-operator + namespace: telegraf-operator + chartDir: telegraf-operator + valuesDir: telegraf-operator + - name: opentelemetry-coralogix + namespace: opentelemetry + chartDir: opentelemetry-collector + valuesDir: opentelemetry-coralogix + - name: fluentd + namespace: fluentd + chartDir: fluentd + valuesDir: fluentd + - name: loadtester + namespace: loadtester + chartDir: loadtester + valuesDir: loadtester + - name: nginx-external + namespace: nginx-dataengg-external + chartDir: ingress-nginx + valuesDir: ingress-nginx-external + - name: nginx-internal + namespace: nginx-dataengg-internal + chartDir: ingress-nginx + valuesDir: ingress-nginx-internal + - name: nginx-secured + namespace: nginx-dataengg-secured + chartDir: ingress-nginx + valuesDir: ingress-nginx-secured + - name: kube-events + namespace: kube-events + chartDir: kube-events + valuesDir: kube-events + - name: grafana + namespace: grafana + chartDir: grafana + valuesDir: grafana + - name: vmalert + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert + - name: vmagent-dr + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent-dr + - name: vmagent-fb + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent-fb + - name: vmalert-dr + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert-dr + - name: opentelemetry-daemonset + namespace: opentelemetry + chartDir: opentelemetry-collector-latest + valuesDir: opentelemetry-daemonset + - name: kubernetes-dashboard + namespace: kubernetes-dashboard + chartDir: kubernetes-dashboard + valuesDir: kubernetes-dashboard + - name: contour-cert-checker + namespace: contour-cert-checker-ns + chartDir: contour-cert-checker + valuesDir: contour-cert-checker + - name: aurva-dataplane + namespace: aurva-dataplane + chartDir: aurva-dataplane + valuesDir: aurva-dataplane + - name: coroot-node-agent + namespace: coroot-node-agent + chartDir: coroot-node-agent + valuesDir: coroot-node-agent + - name: vm-agent + namespace: victoriametrics + chartDir: victoria-metrics-agent-latest + valuesDir: victoriametrics-agent + - name: vm-select + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-select + - name: vm-insert + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-insert + - name: vm-storage + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-storage + - name: kyverno-dataengg-prd + nameOverride: kyverno-dataengg-prd + namespace: kyverno + chartDir: kyverno + valuesDir: kyverno + - name: cert-manager + namespace: cert-manager-dataengg-prd + chartDir: cert-manager + valuesDir: cert-manager + - name: contour-ca-issuer + namespace: contour-ca-issuer-dataengg-prd + chartDir: contour-ca-issuer + valuesDir: contour-ca-issuer + - name: kubectl-mcp-server + namespace: prd-kubectl-mcp-server + chartDir: kubectl-mcp-server + valuesDir: kubectl-mcp-server diff --git a/values/prd/incubator-infra-k8s-dataengg-prd-ase1c-values.yaml b/values/prd/incubator-infra-k8s-dataengg-prd-ase1c-values.yaml new file mode 100644 index 0000000..adc7f49 --- /dev/null +++ b/values/prd/incubator-infra-k8s-dataengg-prd-ase1c-values.yaml @@ -0,0 +1,156 @@ +clusterSpec: + destination: + server: "" + name: "k8s-dataengg-prd-ase1c" + +argocdSpec: + namespace: argocd-prd + +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-templates + valueFiles: ../../helm-overrides/k8s-dataengg-prd-ase1c + labels: + bu: infra + team: devops + env: prd + cluster: k8s-dataengg-prd-ase1c + +appSpec: + - name: keda + namespace: keda-dataengg-prd + chartDir: keda + valuesDir: keda + # - name: argocd-test + # namespace: argocd-central-prd + # chartDir: argo-cd + # valuesDir: argocd + - name: contour-internal-0 + appNameOverride: contour-internal-0-dataengg-c-prd + namespace: contour-internal-0-dataengg-prd + chartDir: contour + valuesDir: contour-internal-0 + - name: contour-internal-1 + namespace: contour-internal-1-dataengg-prd + chartDir: contour + valuesDir: contour-internal-1 + - name: contour-internal-0-dataengg-c-intra-prd + nameOverride: contour-internal-0-dataengg-c-intra-prd + namespace: contour-internal-0-dataengg-prd-intra + chartDir: contour + valuesDir: contour-internal-intra-0 + - name: contour-internal-1-dataengg-c-intra-prd + nameOverride: contour-internal-1-dataengg-c-intra-prd + namespace: contour-internal-1-dataengg-prd-intra + chartDir: contour + valuesDir: contour-internal-intra-1 + - name: contour-external + namespace: contour-external-dataengg-prd + chartDir: contour + valuesDir: contour-external + - name: vmagent + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent + - name: vmselect + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-select + - name: vminsert + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-insert + - name: vmstorage + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-storage + - name: nginx-ext + namespace: nginx-dataengg-external + chartDir: ingress-nginx + valuesDir: ingress-nginx-external + - name: nginx-int + namespace: nginx-dataengg-ase1c-prd + chartDir: ingress-nginx + valuesDir: ingress-nginx-internal + - name: kube-state-metrics + namespace: kube-system + chartDir: kube-state-metrics + valuesDir: kube-state-metrics + - name: external-secrets + appNameOverride: external-secrets-dataengg-c-prd + namespace: external-secrets-dataengg-prd + chartDir: external-secrets + valuesDir: external-secrets + - name: flagger + namespace: flagger-dataengg-prd + chartDir: flagger + valuesDir: flagger + - name: coredns + namespace: kube-system + chartDir: coredns + valuesDir: coredns + additionalValueFiles: + - ../../helm-templates/coredns/gcp-ase1c-values.yaml + - name: kube-dns + namespace: kube-system + chartDir: kube-dns + valuesDir: kube-dns + - name: prometheus-node-exporter + namespace: monitoring + chartDir: prometheus-node-exporter + valuesDir: prometheus-node-exporter + - name: prometheus-stackdriver-exporter + namespace: monitoring + chartDir: prometheus-stackdriver-exporter + valuesDir: prometheus-stackdriver-exporter + - name: telegraf-operator + namespace: telegraf-operator + chartDir: telegraf-operator + valuesDir: telegraf-operator + # - name: opentelemetry-coralogix + # namespace: opentelemetry + # chartDir: opentelemetry-collector + # valuesDir: opentelemetry-coralogix + - name: fluentd + namespace: fluentd + chartDir: fluentd + valuesDir: fluentd + # - name: loadtester + # namespace: loadtester + # chartDir: loadtester + # valuesDir: loadtester + - name: kube-events + namespace: kube-events + chartDir: kube-events + valuesDir: kube-events + # - name: vmagent-dr + # namespace: victoriametrics + # chartDir: victoria-metrics-agent + # valuesDir: victoria-metrics-agent-dr + # - name: vmalert-dr + # namespace: victoriametrics + # chartDir: victoria-metrics-alert + # valuesDir: victoria-metrics-alert-dr + # - name: alloy + # namespace: observability + # chartDir: alloy + # valuesDir: alloy + # - name: vmalert + # namespace: victoriametrics + # chartDir: victoria-metrics-alert + # valuesDir: victoria-metrics-alert + - name: opentelemetry-daemonset + namespace: opentelemetry + chartDir: opentelemetry-collector-latest + valuesDir: opentelemetry-daemonset + # - name: etcd + # namespace: etcd-prd + # chartDir: etcd + # valuesDir: etcd + - name: contour-cert-checker + namespace: contour-cert-checker-ns + chartDir: contour-cert-checker + valuesDir: contour-cert-checker diff --git a/values/prd/incubator-infra-k8s-datascience-prd-ase1-values.yaml b/values/prd/incubator-infra-k8s-datascience-prd-ase1-values.yaml new file mode 100644 index 0000000..b5d2cd1 --- /dev/null +++ b/values/prd/incubator-infra-k8s-datascience-prd-ase1-values.yaml @@ -0,0 +1,204 @@ +clusterSpec: + destination: + server: "" + name: "k8s-datascience-prd-ase1" + +argocdSpec: + namespace: argocd-prd + +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-templates + valueFiles: ../../helm-overrides/k8s-datascience-prd-ase1 + labels: + bu: infra + team: devops + env: prd + cluster: k8s-datascience-prd-ase1 + +appSpec: + - name: keda + namespace: keda-datascience-prd + chartDir: keda + valuesDir: keda + - name: contour-internal-0 + namespace: contour-internal-0-datascience-prd + chartDir: contour-v1.33.3 + valuesDir: contour-internal-0 + - name: vmalert-stateful + namespace: victoriametrics + chartDir: victoria-metrics-alert-stateful + valuesDir: victoria-metrics-alert-stateful + - name: vmalert-secured-stateful + namespace: victoriametrics + chartDir: victoria-metrics-alert-stateful + valuesDir: victoria-metrics-alert-secured-stateful + - name: contour-internal-1 + namespace: contour-internal-1-datascience-prd + chartDir: contour-v1.33.3 + valuesDir: contour-internal-1 + - name: contour-internal-0-datascience-intra-prd + nameOverride: contour-internal-0-datascience-intra-prd + namespace: contour-internal-0-datascience-prd-intra + chartDir: contour + valuesDir: contour-internal-intra-0 + - name: contour-internal-dataproc-prd + nameOverride: contour-internal-dataproc-prd + namespace: contour-internal-dataproc-prd + chartDir: contour + valuesDir: contour-internal-dataproc + - name: contour-internal-1-datascience-intra-prd + nameOverride: contour-internal-1-datascience-intra-prd + namespace: contour-internal-1-datascience-prd-intra + chartDir: contour + valuesDir: contour-internal-intra-1 + - name: vmagent + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent + - name: vmselect + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-select + - name: vminsert + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-insert + - name: vmstorage + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-storage + - name: kube-state-metrics + namespace: kube-system + chartDir: kube-state-metrics + valuesDir: kube-state-metrics + - name: external-secrets + namespace: external-secrets-datascience-prd + chartDir: external-secrets + valuesDir: external-secrets + - name: flagger + namespace: flagger-datascience-prd + chartDir: flagger + valuesDir: flagger + - name: coredns + namespace: kube-system + chartDir: coredns + valuesDir: coredns + additionalValueFiles: + - ../../helm-templates/coredns/gcp-ase1a-values.yaml + - name: kube-dns + namespace: kube-system + chartDir: kube-dns + valuesDir: kube-dns + - name: prometheus-node-exporter + namespace: monitoring + chartDir: prometheus-node-exporter + valuesDir: prometheus-node-exporter + - name: prometheus-stackdriver-exporter + namespace: monitoring + chartDir: prometheus-stackdriver-exporter + valuesDir: prometheus-stackdriver-exporter + - name: telegraf-operator + namespace: telegraf-operator + chartDir: telegraf-operator + valuesDir: telegraf-operator + - name: opentelemetry-coralogix + namespace: opentelemetry + chartDir: opentelemetry-collector + valuesDir: opentelemetry-coralogix + - name: fluentd + namespace: fluentd + chartDir: fluentd + valuesDir: fluentd + - name: loadtester + namespace: loadtester + chartDir: loadtester + valuesDir: loadtester + - name: kube-events + namespace: kube-events + chartDir: kube-events + valuesDir: kube-events + - name: paused-container + namespace: paused-container + chartDir: paused-container + valuesDir: paused-container + - name: vmalert + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert + - name: vmalert-secured + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert-secured + - name: nginx-int + namespace: nginx-int + chartDir: ingress-nginx + valuesDir: ingress-nginx-internal + - name: vmagent-dr + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent-dr + - name: vmagent-fb + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent-fb + - name: vmalert-dr + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert-dr + - name: opentelemetry-daemonset + namespace: opentelemetry + chartDir: opentelemetry-collector-latest + valuesDir: opentelemetry-daemonset + - name: contour-cert-checker + namespace: contour-cert-checker-ns + chartDir: contour-cert-checker + valuesDir: contour-cert-checker + - name: aurva-dataplane + namespace: aurva-dataplane + chartDir: aurva-dataplane + valuesDir: aurva-dataplane + - name: kubernetes-dashboard + namespace: kubernetes-dashboard + chartDir: kubernetes-dashboard + valuesDir: kubernetes-dashboard + - name: coroot-node-agent + namespace: coroot-node-agent + chartDir: coroot-node-agent + valuesDir: coroot-node-agent + - name: vm-agent + namespace: victoriametrics + chartDir: victoria-metrics-agent-latest + valuesDir: victoriametrics-agent + - name: vm-select + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-select + - name: vm-insert + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-insert + - name: vm-storage + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-storage + - name: kyverno-datascience-prd + nameOverride: kyverno-datascience-prd + namespace: kyverno + chartDir: kyverno + valuesDir: kyverno + - name: cert-manager + namespace: cert-manager-datascience-prd + chartDir: cert-manager + valuesDir: cert-manager + - name: contour-ca-issuer + namespace: contour-ca-issuer-datascience-prd + chartDir: contour-ca-issuer + valuesDir: contour-ca-issuer + - name: kubectl-mcp-server + namespace: prd-kubectl-mcp-server + chartDir: kubectl-mcp-server + valuesDir: kubectl-mcp-server diff --git a/values/prd/incubator-infra-k8s-datascience-prd-ase1c-values.yaml b/values/prd/incubator-infra-k8s-datascience-prd-ase1c-values.yaml new file mode 100644 index 0000000..1801be9 --- /dev/null +++ b/values/prd/incubator-infra-k8s-datascience-prd-ase1c-values.yaml @@ -0,0 +1,156 @@ +clusterSpec: + destination: + server: "" + name: "k8s-datascience-prd-ase1c" + +argocdSpec: + namespace: argocd-prd + +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-templates + valueFiles: ../../helm-overrides/k8s-datascience-prd-ase1c + labels: + bu: infra + team: devops + env: prd + cluster: k8s-datascience-prd-ase1c + +appSpec: + - name: keda + namespace: keda-datascience-prd + chartDir: keda + valuesDir: keda + # - name: argocd-test + # namespace: argocd-central-prd + # chartDir: argo-cd + # valuesDir: argocd + - name: contour-internal-0 + appNameOverride: contour-internal-0-dsci-c-prd + namespace: contour-internal-0-datascience-prd + chartDir: contour + valuesDir: contour-internal-0 + - name: contour-internal-1 + namespace: contour-internal-1-datascience-prd + chartDir: contour + valuesDir: contour-internal-1 + - name: contour-internal-0-datascience-c-intra-prd + nameOverride: contour-internal-0-datascience-c-intra-prd + namespace: contour-internal-0-datascience-prd-intra + chartDir: contour + valuesDir: contour-internal-intra-0 + - name: contour-internal-1-datascience-c-intra-prd + nameOverride: contour-internal-1-datascience-c-intra-prd + namespace: contour-internal-1-datascience-prd-intra + chartDir: contour + valuesDir: contour-internal-intra-1 + - name: contour-external + namespace: contour-external-datascience-prd + chartDir: contour + valuesDir: contour-external + - name: vmagent + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent + - name: vmselect + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-select + - name: vminsert + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-insert + - name: vmstorage + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-storage + - name: nginx-ext + namespace: nginx-datascience-external + chartDir: ingress-nginx + valuesDir: ingress-nginx-external + - name: nginx-int + namespace: nginx-datascience-ase1c-prd + chartDir: ingress-nginx + valuesDir: ingress-nginx-internal + - name: kube-state-metrics + namespace: kube-system + chartDir: kube-state-metrics + valuesDir: kube-state-metrics + - name: external-secrets + appNameOverride: external-secrets-datascience-c-prd + namespace: external-secrets-datascience-prd + chartDir: external-secrets + valuesDir: external-secrets + - name: flagger + namespace: flagger-datascience-prd + chartDir: flagger + valuesDir: flagger + - name: coredns + namespace: kube-system + chartDir: coredns + valuesDir: coredns + additionalValueFiles: + - ../../helm-templates/coredns/gcp-ase1c-values.yaml + - name: kube-dns + namespace: kube-system + chartDir: kube-dns + valuesDir: kube-dns + - name: prometheus-node-exporter + namespace: monitoring + chartDir: prometheus-node-exporter + valuesDir: prometheus-node-exporter + - name: prometheus-stackdriver-exporter + namespace: monitoring + chartDir: prometheus-stackdriver-exporter + valuesDir: prometheus-stackdriver-exporter + - name: telegraf-operator + namespace: telegraf-operator + chartDir: telegraf-operator + valuesDir: telegraf-operator + # - name: opentelemetry-coralogix + # namespace: opentelemetry + # chartDir: opentelemetry-collector + # valuesDir: opentelemetry-coralogix + - name: fluentd + namespace: fluentd + chartDir: fluentd + valuesDir: fluentd + # - name: loadtester + # namespace: loadtester + # chartDir: loadtester + # valuesDir: loadtester + - name: kube-events + namespace: kube-events + chartDir: kube-events + valuesDir: kube-events + # - name: vmagent-dr + # namespace: victoriametrics + # chartDir: victoria-metrics-agent + # valuesDir: victoria-metrics-agent-dr + # - name: vmalert-dr + # namespace: victoriametrics + # chartDir: victoria-metrics-alert + # valuesDir: victoria-metrics-alert-dr + # - name: alloy + # namespace: observability + # chartDir: alloy + # valuesDir: alloy + # - name: vmalert + # namespace: victoriametrics + # chartDir: victoria-metrics-alert + # valuesDir: victoria-metrics-alert + - name: opentelemetry-daemonset + namespace: opentelemetry + chartDir: opentelemetry-collector-latest + valuesDir: opentelemetry-daemonset + # - name: etcd + # namespace: etcd-prd + # chartDir: etcd + # valuesDir: etcd + - name: contour-cert-checker + namespace: contour-cert-checker-ns + chartDir: contour-cert-checker + valuesDir: contour-cert-checker diff --git a/values/prd/incubator-infra-k8s-demand-prd-ase1-values.yaml b/values/prd/incubator-infra-k8s-demand-prd-ase1-values.yaml new file mode 100644 index 0000000..0ae47e4 --- /dev/null +++ b/values/prd/incubator-infra-k8s-demand-prd-ase1-values.yaml @@ -0,0 +1,203 @@ +clusterSpec: + destination: + server: "" + name: "k8s-demand-prd-ase1" + +argocdSpec: + namespace: argocd-prd + +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-templates + valueFiles: ../../helm-overrides/k8s-demand-prd-ase1 + labels: + bu: infra + team: devops + env: prd + cluster: k8s-demand-prd-ase1 + +appSpec: + - name: keda + namespace: keda-demand-prd + chartDir: keda + valuesDir: keda + # - name: kube-state-metrics + # namespace: kube-system + # chartDir: kube-state-metrics + # valuesDir: kube-state-metrics + - name: contour-internal-0 + namespace: contour-internal-0-demand-prd + chartDir: contour-v1.33.3 + valuesDir: contour-internal-0 + - name: vmalert-stateful + namespace: victoriametrics + chartDir: victoria-metrics-alert-stateful + valuesDir: victoria-metrics-alert-stateful + - name: vmalert-secured-stateful + namespace: victoriametrics + chartDir: victoria-metrics-alert-stateful + valuesDir: victoria-metrics-alert-secured-stateful + - name: contour-internal-1 + namespace: contour-internal-1-demand-prd + chartDir: contour-v1.33.3 + valuesDir: contour-internal-1 + - name: contour-internal-0-demand-intra-prd + nameOverride: contour-internal-0-demand-intra-prd + namespace: contour-internal-0-demand-prd-intra + chartDir: contour-v1.33.3 + valuesDir: contour-internal-intra-0 + - name: contour-internal-1-demand-intra-prd + nameOverride: contour-internal-1-demand-intra-prd + namespace: contour-internal-1-demand-prd-intra + chartDir: contour-v1.33.3 + valuesDir: contour-internal-intra-1 + - name: contour-external + namespace: contour-external-demand-prd + chartDir: contour-v1.33.3 + valuesDir: contour-external + - name: vmagent-shared + namespace: victoriametrics + chartDir: victoria-metrics-agent-latest + valuesDir: victoriametrics-agent-shared + - name: vmselect + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-select + - name: vminsert + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-insert + - name: vmstorage + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-storage + - name: kube-state-metrics + namespace: kube-system + chartDir: kube-state-metrics + valuesDir: kube-state-metrics + - name: external-secrets + namespace: external-secrets-demand-prd + chartDir: external-secrets + valuesDir: external-secrets + - name: flagger + namespace: flagger-demand-prd + chartDir: flagger + valuesDir: flagger + - name: coredns + namespace: kube-system + chartDir: coredns + valuesDir: coredns + additionalValueFiles: + - ../../helm-templates/coredns/gcp-ase1a-values.yaml + - name: kube-dns + namespace: kube-system + chartDir: kube-dns + valuesDir: kube-dns + - name: prometheus-node-exporter + namespace: monitoring + chartDir: prometheus-node-exporter + valuesDir: prometheus-node-exporter + - name: prometheus-stackdriver-exporter + namespace: monitoring + chartDir: prometheus-stackdriver-exporter + valuesDir: prometheus-stackdriver-exporter + - name: telegraf-operator + namespace: telegraf-operator + chartDir: telegraf-operator + valuesDir: telegraf-operator + - name: opentelemetry-coralogix + namespace: opentelemetry + chartDir: opentelemetry-collector + valuesDir: opentelemetry-coralogix + - name: fluentd + namespace: fluentd + chartDir: fluentd + valuesDir: fluentd + - name: loadtester + namespace: loadtester + chartDir: loadtester + valuesDir: loadtester + - name: kube-events + namespace: kube-events + chartDir: kube-events + valuesDir: kube-events + - name: vmalert + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert + - name: vmalert-secured + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert-secured + - name: vmagent-dr + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent-dr + - name: vmagent-fb + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent-fb + - name: vmalert-dr + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert-dr + - name: opentelemetry-daemonset + namespace: opentelemetry + chartDir: opentelemetry-collector-latest + valuesDir: opentelemetry-daemonset + - name: contour-cert-checker + namespace: contour-cert-checker-ns + chartDir: contour-cert-checker + valuesDir: contour-cert-checker + - name: aurva-dataplane + namespace: aurva-dataplane + chartDir: aurva-dataplane + valuesDir: aurva-dataplane + - name: coroot-node-agent + namespace: coroot-node-agent + chartDir: coroot-node-agent + valuesDir: coroot-node-agent + - name: node-thp-config + namespace: prd-node-thp-config + chartDir: node-thp-config + valuesDir: node-thp-config + - name: vm-agent + namespace: victoriametrics + chartDir: victoria-metrics-agent-latest + valuesDir: victoriametrics-agent + - name: vm-select + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-select + - name: vm-insert + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-insert + - name: vm-storage + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-storage + - name: kyverno-demand-prd + nameOverride: kyverno-demand-prd + namespace: kyverno + chartDir: kyverno + valuesDir: kyverno + - name: vm-agent-secondary + namespace: victoriametrics + chartDir: victoria-metrics-agent-latest + valuesDir: victoriametrics-agent-secondary + - name: cert-manager + namespace: cert-manager-demand-prd + chartDir: cert-manager + valuesDir: cert-manager + - name: contour-ca-issuer + namespace: contour-ca-issuer-demand-prd + chartDir: contour-ca-issuer + valuesDir: contour-ca-issuer + - name: kubectl-mcp-server + namespace: prd-kubectl-mcp-server + chartDir: kubectl-mcp-server + valuesDir: kubectl-mcp-server diff --git a/values/prd/incubator-infra-k8s-demand-prd-ase1c-values.yaml b/values/prd/incubator-infra-k8s-demand-prd-ase1c-values.yaml new file mode 100644 index 0000000..57ff396 --- /dev/null +++ b/values/prd/incubator-infra-k8s-demand-prd-ase1c-values.yaml @@ -0,0 +1,152 @@ +clusterSpec: + destination: + server: "" + name: "k8s-demand-prd-ase1c" + +argocdSpec: + namespace: argocd-prd + +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-templates + valueFiles: ../../helm-overrides/k8s-demand-prd-ase1c + labels: + bu: infra + team: devops + env: prd + cluster: k8s-demand-prd-ase1c + +appSpec: + - name: keda + namespace: keda-demand-prd + chartDir: keda + valuesDir: keda + # - name: argocd-test + # namespace: argocd-demand-prd + # chartDir: argo-cd + # valuesDir: argocd + - name: contour-internal-0 + appNameOverride: contour-internal-0-demand-c-prd + namespace: contour-internal-0-demand-prd + chartDir: contour + valuesDir: contour-internal-0 + - name: contour-internal-1 + namespace: contour-internal-1-demand-prd + chartDir: contour + valuesDir: contour-internal-1 + - name: contour-internal-0-demand-c-intra-prd + nameOverride: contour-internal-0-demand-c-intra-prd + namespace: contour-internal-0-demand-prd-intra + chartDir: contour + valuesDir: contour-internal-intra-0 + - name: contour-internal-1-demand-c-intra-prd + nameOverride: contour-internal-1-demand-c-intra-prd + namespace: contour-internal-1-demand-prd-intra + chartDir: contour + valuesDir: contour-internal-intra-1 + - name: contour-external + namespace: contour-external-demand-prd + chartDir: contour + valuesDir: contour-external + - name: vmagent + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent + - name: vmselect + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-select + - name: vminsert + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-insert + - name: vmstorage + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-storage + - name: nginx + namespace: nginx-demand-ase1c-prd + chartDir: ingress-nginx + valuesDir: ingress-nginx + - name: kube-state-metrics + namespace: kube-system + chartDir: kube-state-metrics + valuesDir: kube-state-metrics + - name: external-secrets + appNameOverride: external-secrets-demand-c-prd + namespace: external-secrets-demand-prd + chartDir: external-secrets + valuesDir: external-secrets + - name: flagger + namespace: flagger-demand-prd + chartDir: flagger + valuesDir: flagger + - name: coredns + namespace: kube-system + chartDir: coredns + valuesDir: coredns + additionalValueFiles: + - ../../helm-templates/coredns/gcp-ase1c-values.yaml + - name: kube-dns + namespace: kube-system + chartDir: kube-dns + valuesDir: kube-dns + - name: prometheus-node-exporter + namespace: monitoring + chartDir: prometheus-node-exporter + valuesDir: prometheus-node-exporter + - name: prometheus-stackdriver-exporter + namespace: monitoring + chartDir: prometheus-stackdriver-exporter + valuesDir: prometheus-stackdriver-exporter + - name: telegraf-operator + namespace: telegraf-operator + chartDir: telegraf-operator + valuesDir: telegraf-operator + # - name: opentelemetry-coralogix + # namespace: opentelemetry + # chartDir: opentelemetry-collector + # valuesDir: opentelemetry-coralogix + - name: fluentd + namespace: fluentd + chartDir: fluentd + valuesDir: fluentd + # - name: loadtester + # namespace: loadtester + # chartDir: loadtester + # valuesDir: loadtester + - name: kube-events + namespace: kube-events + chartDir: kube-events + valuesDir: kube-events + # - name: vmagent-dr + # namespace: victoriametrics + # chartDir: victoria-metrics-agent + # valuesDir: victoria-metrics-agent-dr + # - name: vmalert-dr + # namespace: victoriametrics + # chartDir: victoria-metrics-alert + # valuesDir: victoria-metrics-alert-dr + # - name: alloy + # namespace: observability + # chartDir: alloy + # valuesDir: alloy + # - name: vmalert + # namespace: victoriametrics + # chartDir: victoria-metrics-alert + # valuesDir: victoria-metrics-alert + - name: opentelemetry-daemonset + namespace: opentelemetry + chartDir: opentelemetry-collector-latest + valuesDir: opentelemetry-daemonset + # - name: etcd + # namespace: etcd-prd + # chartDir: etcd + # valuesDir: etcd + - name: contour-cert-checker + namespace: contour-cert-checker-ns + chartDir: contour-cert-checker + valuesDir: contour-cert-checker diff --git a/values/prd/incubator-infra-k8s-dengspark-di-prd-ase1-values.yaml b/values/prd/incubator-infra-k8s-dengspark-di-prd-ase1-values.yaml new file mode 100644 index 0000000..177ce2f --- /dev/null +++ b/values/prd/incubator-infra-k8s-dengspark-di-prd-ase1-values.yaml @@ -0,0 +1,103 @@ +clusterSpec: + destination: + server: "" + name: "k8s-dengspark-di-prd-ase1" + +argocdSpec: + namespace: argocd-prd + +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-templates + valueFiles: ../../helm-overrides/k8s-dengspark-di-prd-ase1 + labels: + bu: infra + team: devops + env: prd + cluster: k8s-dengspark-di-prd-ase1 + +appSpec: + - name: keda + namespace: keda-dengspark-di-prd + chartDir: keda + valuesDir: keda + - name: kube-state-metrics + namespace: kube-system + chartDir: kube-state-metrics + valuesDir: kube-state-metrics + # - name: coredns + # namespace: kube-system + # chartDir: coredns + # valuesDir: coredns + # - name: kube-dns + # namespace: kube-system + # chartDir: kube-dns + # valuesDir: kube-dns + - name: prometheus-node-exporter + namespace: monitoring + chartDir: prometheus-node-exporter + valuesDir: prometheus-node-exporter + # - name: prometheus-stackdriver-exporter + # namespace: monitoring + # chartDir: prometheus-stackdriver-exporter + # valuesDir: prometheus-stackdriver-exporter + - name: fluentd + namespace: fluentd + chartDir: fluentd + valuesDir: fluentd + - name: kube-events + namespace: kube-events + chartDir: kube-events + valuesDir: kube-events + - name: nginx-int + namespace: nginx-int + chartDir: ingress-nginx + valuesDir: ingress-nginx-internal + - name: vmagent + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent + - name: vmselect + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-select + - name: vminsert + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-insert + - name: vmstorage + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-storage + - name: vmalert + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert + - name: vm-agent + namespace: victoriametrics + chartDir: victoria-metrics-agent-latest + valuesDir: victoriametrics-agent + - name: vm-select + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-select + - name: vm-insert + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-insert + - name: vm-storage + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-storage + - name: external-secrets + namespace: external-secrets-dengspark-di-prd + chartDir: external-secrets + valuesDir: external-secrets + - name: flagger + namespace: flagger-dengspark-di-prd + chartDir: flagger + valuesDir: flagger + diff --git a/values/prd/incubator-infra-k8s-dengspark-notebook-prd-ase1-values.yaml b/values/prd/incubator-infra-k8s-dengspark-notebook-prd-ase1-values.yaml new file mode 100644 index 0000000..e02cbd3 --- /dev/null +++ b/values/prd/incubator-infra-k8s-dengspark-notebook-prd-ase1-values.yaml @@ -0,0 +1,90 @@ +clusterSpec: + destination: + server: "" + name: "k8s-dengspark-notebook-prd-ase1" + +argocdSpec: + namespace: argocd-prd + +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-templates + valueFiles: ../../helm-overrides/k8s-dengspark-notebook-prd-ase1 + labels: + bu: infra + team: devops + env: prd + cluster: k8s-dengspark-notebook-prd-ase1 + +appSpec: + - name: keda + namespace: keda-dengspark-notebook-prd + chartDir: keda + valuesDir: keda + - name: kube-state-metrics + namespace: kube-system + chartDir: kube-state-metrics + valuesDir: kube-state-metrics + # - name: coredns + # namespace: kube-system + # chartDir: coredns + # valuesDir: coredns + # - name: kube-dns + # namespace: kube-system + # chartDir: kube-dns + # valuesDir: kube-dns + - name: prometheus-node-exporter + namespace: monitoring + chartDir: prometheus-node-exporter + valuesDir: prometheus-node-exporter + # - name: prometheus-stackdriver-exporter + # namespace: monitoring + # chartDir: prometheus-stackdriver-exporter + # valuesDir: prometheus-stackdriver-exporter + - name: fluentd + namespace: fluentd + chartDir: fluentd + valuesDir: fluentd + - name: kube-events + namespace: kube-events + chartDir: kube-events + valuesDir: kube-events + - name: nginx-int + namespace: nginx-int + chartDir: ingress-nginx + valuesDir: ingress-nginx-internal + - name: vmagent + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent + - name: vmselect + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-select + - name: vminsert + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-insert + - name: vmstorage + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-storage + - name: vmalert + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert + - name: external-secrets + namespace: external-secrets-dengspark-notebook-prd + chartDir: external-secrets + valuesDir: external-secrets + - name: flagger + namespace: flagger-dengspark-notebook-prd + chartDir: flagger + valuesDir: flagger + - name: rancher + namespace: cattle-system + chartDir: rancher + valuesDir: rancher diff --git a/values/prd/incubator-infra-k8s-dengspark-prd-ase1-values.yaml b/values/prd/incubator-infra-k8s-dengspark-prd-ase1-values.yaml new file mode 100644 index 0000000..4bfe11a --- /dev/null +++ b/values/prd/incubator-infra-k8s-dengspark-prd-ase1-values.yaml @@ -0,0 +1,109 @@ +clusterSpec: + destination: + server: "" + name: "k8s-dengspark-prd-ase1" + +argocdSpec: + namespace: argocd-prd + +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-templates + valueFiles: ../../helm-overrides/k8s-dengspark-prd-ase1 + labels: + bu: infra + team: devops + env: prd + cluster: k8s-dengspark-prd-ase1 + +appSpec: + - name: keda + namespace: keda-dengspark-prd + chartDir: keda + valuesDir: keda + - name: vmalert-stateful + namespace: victoriametrics + chartDir: victoria-metrics-alert-stateful + valuesDir: victoria-metrics-alert-stateful + - name: kube-state-metrics + namespace: kube-system + chartDir: kube-state-metrics + valuesDir: kube-state-metrics + - name: coredns + namespace: kube-system + chartDir: coredns + valuesDir: coredns + additionalValueFiles: + - ../../helm-templates/coredns/gcp-ase1a-values.yaml + - name: kube-dns + namespace: kube-system + chartDir: kube-dns + valuesDir: kube-dns + - name: prometheus-node-exporter + namespace: monitoring + chartDir: prometheus-node-exporter + valuesDir: prometheus-node-exporter + - name: prometheus-stackdriver-exporter + namespace: monitoring + chartDir: prometheus-stackdriver-exporter + valuesDir: prometheus-stackdriver-exporter + - name: fluentd + namespace: fluentd + chartDir: fluentd + valuesDir: fluentd + - name: kube-events + namespace: kube-events + chartDir: kube-events + valuesDir: kube-events + - name: nginx-int + namespace: nginx-int + chartDir: ingress-nginx + valuesDir: ingress-nginx-internal + - name: vmagent + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent + - name: vmselect + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-select + - name: vminsert + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-insert + - name: vmstorage + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-storage + - name: vmalert + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert + - name: vm-agent + namespace: victoriametrics + chartDir: victoria-metrics-agent-latest + valuesDir: victoriametrics-agent + - name: vm-select + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-select + - name: vm-insert + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-insert + - name: vm-storage + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-storage + - name: external-secrets + namespace: external-secrets-dengspark-prd + chartDir: external-secrets + valuesDir: external-secrets + - name: flagger + namespace: flagger-dengspark-prd + chartDir: flagger + valuesDir: flagger + diff --git a/values/prd/incubator-infra-k8s-dscispark-prd-ase1-values.yaml b/values/prd/incubator-infra-k8s-dscispark-prd-ase1-values.yaml new file mode 100644 index 0000000..a4c9cec --- /dev/null +++ b/values/prd/incubator-infra-k8s-dscispark-prd-ase1-values.yaml @@ -0,0 +1,95 @@ +clusterSpec: + destination: + server: "" + name: "k8s-dscispark-prd-ase1" + +argocdSpec: + namespace: argocd-prd + +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-templates + valueFiles: ../../helm-overrides/k8s-dscispark-prd-ase1 + labels: + bu: infra + team: devops + env: prd + cluster: k8s-dscispark-prd-ase1 + +appSpec: + - name: keda + namespace: keda-dscispark-prd + chartDir: keda + valuesDir: keda + - name: kube-state-metrics + namespace: kube-system + chartDir: kube-state-metrics + valuesDir: kube-state-metrics + - name: vmalert-stateful + namespace: victoriametrics + chartDir: victoria-metrics-alert-stateful + valuesDir: victoria-metrics-alert-stateful + - name: prometheus-node-exporter + namespace: monitoring + chartDir: prometheus-node-exporter + valuesDir: prometheus-node-exporter + - name: fluentd + namespace: fluentd + chartDir: fluentd + valuesDir: fluentd + - name: kube-events + namespace: kube-events + chartDir: kube-events + valuesDir: kube-events + - name: nginx-int + namespace: nginx-int + chartDir: ingress-nginx + valuesDir: ingress-nginx-internal + - name: vmagent + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent + - name: vmselect + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-select + - name: vminsert + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-insert + - name: vmstorage + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-storage + - name: vmalert + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert + - name: vm-agent + namespace: victoriametrics + chartDir: victoria-metrics-agent-latest + valuesDir: victoriametrics-agent + - name: vm-select + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-select + - name: vm-insert + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-insert + - name: vm-storage + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-storage + - name: external-secrets + namespace: external-secrets-dscispark-prd + chartDir: external-secrets + valuesDir: external-secrets + - name: flagger + namespace: flagger-dscispark-prd + chartDir: flagger + valuesDir: flagger + diff --git a/values/prd/incubator-infra-k8s-dsgpu-prd-ase1-values.yaml b/values/prd/incubator-infra-k8s-dsgpu-prd-ase1-values.yaml new file mode 100644 index 0000000..280d35c --- /dev/null +++ b/values/prd/incubator-infra-k8s-dsgpu-prd-ase1-values.yaml @@ -0,0 +1,190 @@ +clusterSpec: + destination: + server: "" + name: "k8s-dsgpu-prd-ase1" + +argocdSpec: + namespace: argocd-prd + +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-templates + valueFiles: ../../helm-overrides/k8s-dsgpu-prd-ase1 + labels: + bu: infra + team: devops + env: prd + cluster: k8s-dsgpu-prd-ase1 + +appSpec: + - name: keda + namespace: keda-dsgpu-prd + chartDir: keda + valuesDir: keda + - name: contour-internal-0 + namespace: contour-internal-0-dsgpu-prd + chartDir: contour-v1.33.3 + valuesDir: contour-internal-0 + - name: vmalert-stateful + namespace: victoriametrics + chartDir: victoria-metrics-alert-stateful + valuesDir: victoria-metrics-alert-stateful + - name: vmalert-secured-stateful + namespace: victoriametrics + chartDir: victoria-metrics-alert-stateful + valuesDir: victoria-metrics-alert-secured-stateful + - name: contour-internal-1 + namespace: contour-internal-1-dsgpu-prd + chartDir: contour-v1.33.3 + valuesDir: contour-internal-1 + - name: contour-internal-0-dsgpu-intra-prd + nameOverride: contour-internal-0-dsgpu-intra-prd + namespace: contour-internal-0-dsgpu-prd-intra + chartDir: contour + valuesDir: contour-internal-intra-0 + - name: contour-internal-1-dsgpu-intra-prd + nameOverride: contour-internal-1-dsgpu-intra-prd + namespace: contour-internal-1-dsgpu-prd-intra + chartDir: contour + valuesDir: contour-internal-intra-1 + - name: vmagent + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent + - name: vmselect + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-select + - name: vminsert + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-insert + - name: vmstorage + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-storage + - name: kube-state-metrics + namespace: kube-system + chartDir: kube-state-metrics + valuesDir: kube-state-metrics + - name: external-secrets + namespace: external-secrets-dsgpu-prd + chartDir: external-secrets + valuesDir: external-secrets + - name: flagger + namespace: flagger-dsgpu-prd + chartDir: flagger + valuesDir: flagger + - name: coredns + namespace: kube-system + chartDir: coredns + valuesDir: coredns + additionalValueFiles: + - ../../helm-templates/coredns/gcp-ase1a-values.yaml + - name: kube-dns + namespace: kube-system + chartDir: kube-dns + valuesDir: kube-dns + - name: prometheus-node-exporter + namespace: monitoring + chartDir: prometheus-node-exporter + valuesDir: prometheus-node-exporter + - name: prometheus-stackdriver-exporter + namespace: monitoring + chartDir: prometheus-stackdriver-exporter + valuesDir: prometheus-stackdriver-exporter + - name: telegraf-operator + namespace: telegraf-operator + chartDir: telegraf-operator + valuesDir: telegraf-operator + - name: opentelemetry-coralogix + namespace: opentelemetry + chartDir: opentelemetry-collector + valuesDir: opentelemetry-coralogix + - name: fluentd + namespace: fluentd + chartDir: fluentd + valuesDir: fluentd + - name: loadtester + namespace: loadtester + chartDir: loadtester + valuesDir: loadtester + - name: kube-events + namespace: kube-events + chartDir: kube-events + valuesDir: kube-events + - name: paused-container + namespace: paused-container + chartDir: paused-container + valuesDir: paused-container + - name: vmalert + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert + - name: vmalert-secured + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert-secured + - name: nginx-int + namespace: nginx-int + chartDir: ingress-nginx + valuesDir: ingress-nginx-internal + - name: vmagent-dr + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent-dr + - name: vmagent-fb + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent-fb + - name: vmalert-dr + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert-dr + - name: opentelemetry-daemonset + namespace: opentelemetry + chartDir: opentelemetry-collector-latest + valuesDir: opentelemetry-daemonset + - name: contour-cert-checker + namespace: contour-cert-checker-ns + chartDir: contour-cert-checker + valuesDir: contour-cert-checker + - name: aurva-dataplane + namespace: aurva-dataplane + chartDir: aurva-dataplane + valuesDir: aurva-dataplane + - name: vm-agent + namespace: victoriametrics + chartDir: victoria-metrics-agent-latest + valuesDir: victoriametrics-agent + - name: vm-select + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-select + - name: vm-insert + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-insert + - name: vm-storage + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-storage + - name: external-dns + namespace: prd-external-dns + chartDir: external-dns + valuesDir: external-dns + - name: cert-manager + namespace: cert-manager-dsgpu-prd + chartDir: cert-manager + valuesDir: cert-manager + - name: contour-ca-issuer + namespace: contour-ca-issuer-dsgpu-prd + chartDir: contour-ca-issuer + valuesDir: contour-ca-issuer + - name: kubectl-mcp-server + namespace: prd-kubectl-mcp-server + chartDir: kubectl-mcp-server + valuesDir: kubectl-mcp-server diff --git a/values/prd/incubator-infra-k8s-farmiso-prd-ase1-values.yaml b/values/prd/incubator-infra-k8s-farmiso-prd-ase1-values.yaml new file mode 100644 index 0000000..daa031a --- /dev/null +++ b/values/prd/incubator-infra-k8s-farmiso-prd-ase1-values.yaml @@ -0,0 +1,154 @@ +clusterSpec: + destination: + server: "" + name: "k8s-farmiso-prd-ase1" + +argocdSpec: + namespace: argocd-prd + +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-templates + valueFiles: ../../helm-overrides/k8s-farmiso-prd-ase1 + labels: + bu: infra + team: devops + env: prd + cluster: k8s-farmiso-prd-ase1 + +appSpec: + - name: keda + namespace: keda-farmiso-prd + chartDir: keda + valuesDir: keda + - name: contour-internal-0 + namespace: contour-internal-0-farmiso-prd + chartDir: contour-v1.33.3 + valuesDir: contour-internal-0 + - name: vmalert-stateful + namespace: victoriametrics + chartDir: victoria-metrics-alert-stateful + valuesDir: victoria-metrics-alert-stateful + - name: contour-internal-0-farmiso-intra-prd + nameOverride: contour-internal-0-farmiso-intra-prd + namespace: contour-internal-0-farmiso-prd-intra + chartDir: contour-v1.33.3 + valuesDir: contour-internal-intra-0 + - name: contour-external + namespace: contour-external-farmiso-prd + chartDir: contour-v1.33.3 + valuesDir: contour-external + - name: external-secrets + namespace: external-secrets-farmiso-prd + chartDir: external-secrets + valuesDir: external-secrets + - name: flagger + namespace: flagger-farmiso-prd + chartDir: flagger + valuesDir: flagger + - name: coredns + namespace: kube-system + chartDir: coredns + valuesDir: coredns + additionalValueFiles: + - ../../helm-templates/coredns/gcp-ase1a-values.yaml + - name: kube-dns + namespace: kube-system + chartDir: kube-dns + valuesDir: kube-dns + - name: kube-state-metrics + namespace: kube-system + chartDir: kube-state-metrics + valuesDir: kube-state-metrics + - name: prometheus-node-exporter + namespace: monitoring + chartDir: prometheus-node-exporter + valuesDir: prometheus-node-exporter + - name: prometheus-stackdriver-exporter + namespace: monitoring + chartDir: prometheus-stackdriver-exporter + valuesDir: prometheus-stackdriver-exporter + - name: telegraf-operator + namespace: telegraf-operator + chartDir: telegraf-operator + valuesDir: telegraf-operator + - name: loadtester + namespace: loadtester + chartDir: loadtester + valuesDir: loadtester + - name: opentelemetry-coralogix + namespace: opentelemetry + chartDir: opentelemetry-collector + valuesDir: opentelemetry-coralogix + - name: fluentd + namespace: fluentd + chartDir: fluentd + valuesDir: fluentd + - name: kube-events + namespace: kube-events + chartDir: kube-events + valuesDir: kube-events + - name: alloy + namespace: observability + chartDir: alloy + valuesDir: alloy + - name: vmalert + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert + - name: vmagent-dr + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent-dr + - name: vmagent-fb + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent-fb + - name: vmalert-dr + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert-dr + - name: opentelemetry-daemonset + namespace: opentelemetry + chartDir: opentelemetry-collector-latest + valuesDir: opentelemetry-daemonset + - name: contour-cert-checker + namespace: contour-cert-checker-ns + chartDir: contour-cert-checker + valuesDir: contour-cert-checker + - name: aurva-dataplane + namespace: aurva-dataplane + chartDir: aurva-dataplane + valuesDir: aurva-dataplane + - name: vm-agent + namespace: victoriametrics + chartDir: victoria-metrics-agent-latest + valuesDir: victoriametrics-agent + - name: vm-select + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-select + - name: vm-insert + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-insert + - name: vm-storage + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-storage + - name: kyverno-farmiso-prd + nameOverride: kyverno-farmiso-prd + namespace: kyverno + chartDir: kyverno + valuesDir: kyverno + - name: cert-manager + namespace: cert-manager-farmiso-prd + chartDir: cert-manager + valuesDir: cert-manager + - name: kubectl-mcp-server + namespace: prd-kubectl-mcp-server + chartDir: kubectl-mcp-server + valuesDir: kubectl-mcp-server diff --git a/values/prd/incubator-infra-k8s-ml-platform-prd-ase1-values.yaml b/values/prd/incubator-infra-k8s-ml-platform-prd-ase1-values.yaml new file mode 100644 index 0000000..fa96578 --- /dev/null +++ b/values/prd/incubator-infra-k8s-ml-platform-prd-ase1-values.yaml @@ -0,0 +1,112 @@ +clusterSpec: + destination: + server: "" + name: "k8s-ml-platform-prd-ase1" + +argocdSpec: + namespace: argocd-prd + +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-templates + valueFiles: ../../helm-overrides/k8s-ml-platform-prd-ase1 + labels: + bu: infra + team: devops + env: prd + cluster: k8s-ml-platform-prd-ase1 + +appSpec: + - name: keda + namespace: keda-ml-platform-prd + chartDir: keda + valuesDir: keda + - name: contour-internal-0 + namespace: contour-internal-0-ml-platform-prd + chartDir: contour + valuesDir: contour-internal-0 + - name: contour-internal-1 + namespace: contour-internal-1-ml-platform-prd + chartDir: contour + valuesDir: contour-internal-1 + - name: vmagent + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent + - name: vmselect + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-select + - name: vminsert + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-insert + - name: vmstorage + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-storage + - name: kube-state-metrics + namespace: kube-system + chartDir: kube-state-metrics + valuesDir: kube-state-metrics + - name: external-secrets + namespace: external-secrets-ml-platform-prd + chartDir: external-secrets + valuesDir: external-secrets + - name: flagger + namespace: flagger-ml-platform-prd + chartDir: flagger + valuesDir: flagger + - name: coredns + namespace: kube-system + chartDir: coredns + valuesDir: coredns + additionalValueFiles: + - ../../helm-templates/coredns/gcp-ase1a-values.yaml + - name: kube-dns + namespace: kube-system + chartDir: kube-dns + valuesDir: kube-dns + - name: prometheus-node-exporter + namespace: monitoring + chartDir: prometheus-node-exporter + valuesDir: prometheus-node-exporter + - name: prometheus-stackdriver-exporter + namespace: monitoring + chartDir: prometheus-stackdriver-exporter + valuesDir: prometheus-stackdriver-exporter + - name: telegraf-operator + namespace: telegraf-operator + chartDir: telegraf-operator + valuesDir: telegraf-operator + - name: fluentd + namespace: fluentd + chartDir: fluentd + valuesDir: fluentd + - name: kube-events + namespace: kube-events + chartDir: kube-events + valuesDir: kube-events + - name: vmalert + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert + - name: vmalert-stateful + namespace: victoriametrics + chartDir: victoria-metrics-alert-stateful + valuesDir: victoria-metrics-alert-stateful + - name: nginx-int + namespace: nginx-int + chartDir: ingress-nginx + valuesDir: ingress-nginx-internal + - name: opentelemetry-daemonset + namespace: opentelemetry + chartDir: opentelemetry-collector-latest + valuesDir: opentelemetry-daemonset + - name: contour-cert-checker + namespace: contour-cert-checker-ns + chartDir: contour-cert-checker + valuesDir: contour-cert-checker diff --git a/values/prd/incubator-infra-k8s-supply-prd-ase1-values.yaml b/values/prd/incubator-infra-k8s-supply-prd-ase1-values.yaml new file mode 100644 index 0000000..111cc72 --- /dev/null +++ b/values/prd/incubator-infra-k8s-supply-prd-ase1-values.yaml @@ -0,0 +1,239 @@ +clusterSpec: + destination: + server: "" + name: "k8s-supply-prd-ase1" + +argocdSpec: + namespace: argocd-prd + +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-templates + valueFiles: ../../helm-overrides/k8s-supply-prd-ase1 + labels: + bu: infra + team: devops + env: prd + cluster: k8s-supply-prd-ase1 + +appSpec: + - name: keda + namespace: keda-supply-prd + chartDir: keda + valuesDir: keda + - name: contour-internal-0 + namespace: contour-internal-0-supply-prd + chartDir: contour-v1.33.3 + valuesDir: contour-internal-0 + - name: contour-internal-1 + namespace: contour-internal-1-supply-prd + chartDir: contour-v1.33.3 + valuesDir: contour-internal-1 + - name: contour-internal-0-supply-intra-prd + nameOverride: contour-internal-0-supply-intra-prd + namespace: contour-internal-0-supply-prd-intra + chartDir: contour-v1.33.3 + valuesDir: contour-internal-intra-0 + - name: contour-internal-intra-1-supply-intra-prd + nameOverride: contour-internal-1-supply-intra-prd + namespace: contour-internal-1-supply-prd-intra + chartDir: contour-v1.33.3 + valuesDir: contour-internal-intra-1 + - name: contour-external + namespace: contour-external-supply-prd + chartDir: contour-v1.33.3 + valuesDir: contour-external + - name: vmalert-secured + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert-secured + - name: vmagent + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent + - name: vmselect + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-select + - name: vminsert + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-insert + - name: vmstorage + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-storage + - name: kube-state-metrics + namespace: kube-system + chartDir: kube-state-metrics + valuesDir: kube-state-metrics + - name: external-secrets + namespace: external-secrets-supply-prd + chartDir: external-secrets + valuesDir: external-secrets + - name: flagger + namespace: flagger-supply-prd + chartDir: flagger + valuesDir: flagger + - name: coredns + namespace: kube-system + chartDir: coredns + valuesDir: coredns + additionalValueFiles: + - ../../helm-templates/coredns/gcp-ase1a-values.yaml + - name: kube-dns + namespace: kube-system + chartDir: kube-dns + valuesDir: kube-dns + - name: prometheus-node-exporter + namespace: monitoring + chartDir: prometheus-node-exporter + valuesDir: prometheus-node-exporter + - name: prometheus-stackdriver-exporter + namespace: monitoring + chartDir: prometheus-stackdriver-exporter + valuesDir: prometheus-stackdriver-exporter + - name: telegraf-operator + namespace: telegraf-operator + chartDir: telegraf-operator + valuesDir: telegraf-operator + - name: telegraf-operator-custom + namespace: telegraf-operator-custom + chartDir: telegraf-operator + valuesDir: telegraf-operator-custom + - name: opentelemetry-coralogix + namespace: opentelemetry + chartDir: opentelemetry-collector + valuesDir: opentelemetry-coralogix + - name: fluentd + namespace: fluentd + chartDir: fluentd + valuesDir: fluentd + - name: loadtester + namespace: loadtester + chartDir: loadtester + valuesDir: loadtester + - name: kube-events + namespace: kube-events + chartDir: kube-events + valuesDir: kube-events + - name: vmalert + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert + - name: vmalert-stateful + namespace: victoriametrics + chartDir: victoria-metrics-alert-stateful + valuesDir: victoria-metrics-alert-stateful + - name: vmalert-secured-stateful + namespace: victoriametrics + chartDir: victoria-metrics-alert-stateful + valuesDir: victoria-metrics-alert-secured-stateful + - name: deepgram + namespace: dg-self-hosted + chartDir: deepgram-onprem + valuesDir: deepgram-onprem + - name: deepgram-v2 + namespace: dg-self-hosted-v2 + chartDir: deepgram-onprem + valuesDir: deepgram-onprem-v2 + - name: vmagent-dr + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent-dr + - name: vmagent-fb + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent-fb + - name: vmalert-dr + namespace: victoriametrics + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-alert-dr + - name: opentelemetry-daemonset + namespace: opentelemetry + chartDir: opentelemetry-collector-latest + valuesDir: opentelemetry-daemonset + - name: contour-cert-checker + namespace: contour-cert-checker-ns + chartDir: contour-cert-checker + valuesDir: contour-cert-checker + - name: kubernetes-dashboard + namespace: kubernetes-dashboard + chartDir: kubernetes-dashboard + valuesDir: kubernetes-dashboard + - name: aurva-dataplane + namespace: aurva-dataplane + chartDir: aurva-dataplane + valuesDir: aurva-dataplane + - name: fluentd-sumoduolite-np + namespace: fluentd + chartDir: fluentd + valuesDir: fluentd-sumoduolite-np + - name: opentelemetry-daemonset-medium-np + namespace: opentelemetry + chartDir: opentelemetry-collector-latest + valuesDir: opentelemetry-daemonset-medium-np + - name: vmcluster + namespace: victoriametrics-cluster + chartDir: victoria-metrics-cluster-latest + valuesDir: victoria-metrics-cluster + - name: vmcluster-alert + namespace: victoriametrics-cluster + chartDir: victoria-metrics-alert + valuesDir: victoria-metrics-cluster-alert + - name: coroot-node-agent + namespace: coroot-node-agent + chartDir: coroot-node-agent + valuesDir: coroot-node-agent + - name: node-thp-config + namespace: prd-node-thp-config + chartDir: node-thp-config + valuesDir: node-thp-config + - name: vm-agent + namespace: victoriametrics + chartDir: victoria-metrics-agent-latest + valuesDir: victoriametrics-agent + - name: vm-select + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-select + - name: vm-insert + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-insert + - name: vm-storage + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-storage + - name: vm-select-ht + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-select-ht + - name: vm-insert-ht + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-insert-ht + - name: vm-storage-ht + namespace: victoriametrics + chartDir: victoria-metrics-cluster-latest + valuesDir: victoriametrics-storage-ht + - name: kyverno-supply-prd + nameOverride: kyverno-supply-prd + namespace: kyverno + chartDir: kyverno + valuesDir: kyverno + - name: cert-manager + namespace: cert-manager-supply-prd + chartDir: cert-manager + valuesDir: cert-manager + - name: contour-ca-issuer + namespace: contour-ca-issuer-supply-prd + chartDir: contour-ca-issuer + valuesDir: contour-ca-issuer + - name: kubectl-mcp-server + namespace: prd-kubectl-mcp-server + chartDir: kubectl-mcp-server + valuesDir: kubectl-mcp-server diff --git a/values/prd/incubator-infra-k8s-supply-prd-ase1c-values.yaml b/values/prd/incubator-infra-k8s-supply-prd-ase1c-values.yaml new file mode 100644 index 0000000..da00be9 --- /dev/null +++ b/values/prd/incubator-infra-k8s-supply-prd-ase1c-values.yaml @@ -0,0 +1,152 @@ +clusterSpec: + destination: + server: "" + name: "k8s-supply-prd-ase1c" + +argocdSpec: + namespace: argocd-prd + +teamSpec: + devops: + source: + repoURL: https://github.com/Meesho/devops-infra-helm-charts + targetRevision: main + path: helm-templates + valueFiles: ../../helm-overrides/k8s-supply-prd-ase1c + labels: + bu: infra + team: devops + env: prd + cluster: k8s-supply-prd-ase1c + +appSpec: + - name: keda + namespace: keda-supply-prd + chartDir: keda + valuesDir: keda + # - name: argocd-test + # namespace: argocd-supply-prd + # chartDir: argo-cd + # valuesDir: argocd + - name: contour-internal-0 + appNameOverride: contour-internal-0-supply-c-prd + namespace: contour-internal-0-supply-prd + chartDir: contour + valuesDir: contour-internal-0 + - name: contour-internal-1 + namespace: contour-internal-1-supply-prd + chartDir: contour + valuesDir: contour-internal-1 + - name: contour-internal-0-supply-c-intra-prd + nameOverride: contour-internal-0-supply-c-intra-prd + namespace: contour-internal-0-supply-prd-intra + chartDir: contour + valuesDir: contour-internal-intra-0 + - name: contour-internal-1-supply-c-intra-prd + nameOverride: contour-internal-1-supply-c-intra-prd + namespace: contour-internal-1-supply-prd-intra + chartDir: contour + valuesDir: contour-internal-intra-1 + - name: contour-external + namespace: contour-external-supply-prd + chartDir: contour + valuesDir: contour-external + - name: vmagent + namespace: victoriametrics + chartDir: victoria-metrics-agent + valuesDir: victoria-metrics-agent + - name: vmselect + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-select + - name: vminsert + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-insert + - name: vmstorage + namespace: victoriametrics + chartDir: victoria-metrics-cluster + valuesDir: victoria-metrics-storage + - name: nginx + namespace: nginx-supply-ase1c-prd + chartDir: ingress-nginx + valuesDir: ingress-nginx + - name: kube-state-metrics + namespace: kube-system + chartDir: kube-state-metrics + valuesDir: kube-state-metrics + - name: external-secrets + appNameOverride: external-secrets-supply-c-prd + namespace: external-secrets-supply-prd + chartDir: external-secrets + valuesDir: external-secrets + - name: flagger + namespace: flagger-supply-prd + chartDir: flagger + valuesDir: flagger + - name: coredns + namespace: kube-system + chartDir: coredns + valuesDir: coredns + additionalValueFiles: + - ../../helm-templates/coredns/gcp-ase1c-values.yaml + - name: kube-dns + namespace: kube-system + chartDir: kube-dns + valuesDir: kube-dns + - name: prometheus-node-exporter + namespace: monitoring + chartDir: prometheus-node-exporter + valuesDir: prometheus-node-exporter + - name: prometheus-stackdriver-exporter + namespace: monitoring + chartDir: prometheus-stackdriver-exporter + valuesDir: prometheus-stackdriver-exporter + - name: telegraf-operator + namespace: telegraf-operator + chartDir: telegraf-operator + valuesDir: telegraf-operator + # - name: opentelemetry-coralogix + # namespace: opentelemetry + # chartDir: opentelemetry-collector + # valuesDir: opentelemetry-coralogix + - name: fluentd + namespace: fluentd + chartDir: fluentd + valuesDir: fluentd + # - name: loadtester + # namespace: loadtester + # chartDir: loadtester + # valuesDir: loadtester + - name: kube-events + namespace: kube-events + chartDir: kube-events + valuesDir: kube-events + # - name: vmagent-dr + # namespace: victoriametrics + # chartDir: victoria-metrics-agent + # valuesDir: victoria-metrics-agent-dr + # - name: vmalert-dr + # namespace: victoriametrics + # chartDir: victoria-metrics-alert + # valuesDir: victoria-metrics-alert-dr + # - name: alloy + # namespace: observability + # chartDir: alloy + # valuesDir: alloy + # - name: vmalert + # namespace: victoriametrics + # chartDir: victoria-metrics-alert + # valuesDir: victoria-metrics-alert + - name: opentelemetry-daemonset + namespace: opentelemetry + chartDir: opentelemetry-collector-latest + valuesDir: opentelemetry-daemonset + # - name: etcd + # namespace: etcd-prd + # chartDir: etcd + # valuesDir: etcd + - name: contour-cert-checker + namespace: contour-cert-checker-ns + chartDir: contour-cert-checker + valuesDir: contour-cert-checker diff --git a/wiki/analyses/ADR-I1-generic-chart-per-cluster.md b/wiki/analyses/ADR-I1-generic-chart-per-cluster.md new file mode 100644 index 0000000..07b6e2c --- /dev/null +++ b/wiki/analyses/ADR-I1-generic-chart-per-cluster.md @@ -0,0 +1,101 @@ +# ADR-I1: Single Generic Helm Chart for All Infra Tool Applications + +> **Status:** Accepted +> +> **Date:** Retroactive (pattern established before documentation) +> +> **Decision makers:** DevOps / Platform team + +--- + +## Context + +Meesho manages ~19 Kubernetes clusters, each running 20–50 infrastructure tools (ingress controllers, observability stacks, policy engines, etc.). Each tool needs an ArgoCD `Application` resource to be deployed and managed. + +The question: how should we generate and maintain these ArgoCD Application manifests? + +--- + +## Decision + +Use a **single generic Helm chart** (`generic-argo-apps-chart/`) that renders one ArgoCD `Application` per entry in an `appSpec` list. Each cluster gets one values file that defines its `appSpec[]`. + +### How it works + +1. **One chart** — `generic-argo-apps-chart/templates/genericTemplate.yaml` iterates over `appSpec[]` and renders a standard ArgoCD Application for each entry. +2. **One values file per cluster** — `values//-values.yaml` defines `clusterSpec` (routing), `teamSpec` (source repo/labels), and `appSpec[]` (list of tools). +3. **One incubator Application per cluster** — `incubator//.yaml` is the parent Application that points ArgoCD at the generic chart + the cluster's values file. + +### The template contract + +Every `appSpec` entry provides four fields: `name`, `namespace`, `chartDir`, `valuesDir`. The template computes: + +- **Application name:** `--` (with deterministic cluster name munging) +- **Source:** `repoURL/path/` with `valueFiles//custom-values.yaml` +- **Destination:** `clusterSpec.destination.name` + `namespace` +- **Sync policy:** `CreateNamespace=true`, finalizer for cleanup + +--- + +## Alternatives considered + +### Alternative 1: One Helm chart per tool + +Each tool (keda, contour, victoriametrics, etc.) gets its own chart that wraps the upstream chart AND the ArgoCD Application definition. + +**Rejected because:** +- 74 charts x 19 clusters = massive maintenance surface. +- Tool onboarding requires creating a new chart every time. +- ArgoCD Application boilerplate is duplicated across every chart. +- Changes to Application conventions (labels, sync policy, finalizers) require updating every chart. + +### Alternative 2: Handwritten Application YAML per tool per cluster + +Every tool-on-cluster gets a dedicated YAML file checked in as a static ArgoCD Application. + +**Rejected because:** +- ~19 clusters x ~30 tools = ~570 YAML files, all with near-identical structure. +- Adding a tool to a cluster means creating a new file from a template. +- Drift between files is inevitable; conventions are enforced by review, not by template. +- Bulk operations (change all Application labels) require editing hundreds of files. + +### Alternative 3: Kustomize overlays + +Use Kustomize bases and overlays instead of Helm to generate Applications. + +**Rejected because:** +- The team already uses Helm for chart rendering; adding Kustomize introduces a second rendering engine. +- Kustomize's overlay model works well for patching but poorly for list-based generation (one Application per list entry). +- The Helm approach allows `appSpec` to be a simple YAML list — easier to review and diff. + +--- + +## Consequences + +### Positive + +- **Adding a tool to a cluster** is a 4-line YAML addition to a values file. No new files, no new charts. +- **Consistency** is enforced by the template. All Applications get the same labels, finalizers, sync policy, and naming convention. +- **Bulk changes** to Application conventions (e.g., adding a new label) require editing one template file, not hundreds. +- **Reviewing PRs** is straightforward — a values file diff clearly shows what tools were added/removed/changed. +- **Template rendering is testable** — `helm template` validates the entire cluster's tooling in one command. + +### Negative + +- **The generic chart is a single point of failure.** A bad merge to the template breaks ALL clusters immediately via auto-sync. This is mitigated by requiring explicit platform-team review for template changes (HIGH RISK operation). +- **The template's cluster name munging logic is complex** — it uses placeholder-based string replacement to handle edge cases (`dp-`, `backup`, `-ase1c`). This logic is load-bearing and poorly documented in the template itself. +- **No per-tool sync policy customization.** All tools get the same `CreateNamespace=true` syncOptions. Tools that need custom sync policies (e.g., prune=true, self-heal=true) can't express this in the current template without adding optional fields to `appSpec`. +- **Cross-repo dependency.** The `chartDir` and `valuesDir` in `appSpec` must exist in `devops-infra-helm-charts`. There's no compile-time check — a typo in these fields is only caught at ArgoCD render time. + +--- + +## Verification + +To validate that the generic chart correctly renders all Applications for a cluster: + +```bash +helm template generic-argo-apps-chart/ \ + -f values/prd/incubator-infra-k8s-central-prd-ase1-values.yaml +``` + +This produces the full set of ArgoCD Application manifests that ArgoCD would create from the values file. diff --git a/wiki/analyses/ADR-I2-incubator-pattern.md b/wiki/analyses/ADR-I2-incubator-pattern.md new file mode 100644 index 0000000..0900ca7 --- /dev/null +++ b/wiki/analyses/ADR-I2-incubator-pattern.md @@ -0,0 +1,84 @@ +# ADR-I2: Why the Incubator + Generic Chart Pattern + +> Architecture Decision Record for `devops-infra-argo-config`. +> +> **Status:** Accepted (in production use) +> +> **Layer:** 1-T reference. This ADR documents the load-bearing architectural decision behind the repo's structure. + +--- + +## Context + +`devops-infra-argo-config` manages ArgoCD `Application` resources for infrastructure tooling across ~19 Kubernetes clusters. The early approach was direct Application YAML files — one file per tool per cluster. + +**Problem with the direct approach:** +- Adding a tool to 15 clusters = 15 new YAML files +- Each file had ~40 lines of near-identical boilerplate (metadata, syncPolicy, finalizers, source URLs) +- Updating a field common to all clusters (e.g., `targetRevision`) required editing 15 files +- Drift between files was hard to detect and frequently occurred + +--- + +## Decision + +Adopt the **App-of-Applications incubator pattern**: + +1. One **parent Application** per cluster (the "incubator"). It points at a Helm chart in this repo + a values file. +2. One **generic Helm chart** (`generic-argo-apps-chart/`) that templates child Applications from a list. +3. One **values file** per cluster that defines `clusterSpec`, `teamSpec`, `argocdSpec`, and the `appSpec[]` list. + +To add a tool to a cluster: add one entry to `appSpec[]` in the values file. The chart renders the Application. No boilerplate. + +--- + +## Consequences + +### Positive + +| Benefit | Detail | +| ------- | ------ | +| **Single editing surface** | Adding or removing a tool = one list entry in one values file | +| **Consistent Application shape** | All child Applications are rendered by the same template → same syncPolicy, finalizers, label schema | +| **Drift is visible** | Comparing `appSpec[]` across values files is trivially scriptable | +| **Chart-level changes propagate instantly** | Update `generic-argo-apps-chart/` once → all clusters reflect it on next sync | +| **Naming is deterministic** | Application names are generated by the template, not hand-typed | + +### Negative / constraints + +| Constraint | Detail | +| ---------- | ------ | +| **`generic-argo-apps-chart/` changes are fleet-wide** | A bug in the template breaks ALL clusters simultaneously — HIGH RISK edits | +| **Three-file invariant** | Adding a cluster requires coordinated creation of incubator + values file + helm-overrides folder in the sister repo | +| **Cross-repo dependency** | `appSpec[].chartDir` and `valuesDir` must exist in `devops-infra-helm-charts` — the repos are coupled | +| **No per-cluster template customization** | If a cluster needs a fundamentally different Application shape (different syncPolicy, different project), the generic chart must be extended rather than overridden per cluster | + +--- + +## Alternatives considered + +### Alternative 1: Direct Application YAMLs per tool per cluster + +Rejected. Scale problem: 50 tools × 19 clusters = 950 files. Drift is unmanageable. + +### Alternative 2: ApplicationSet with cluster generators + +Considered for a future phase. ApplicationSet would allow truly declarative fleet management (define a tool once, it appears on all matching clusters). Not adopted yet because: +- Migration cost is high (existing Applications would need recreation) +- ApplicationSet behavior on cluster removal requires careful finalizer design +- The current pattern is working and well-understood by the team + +ApplicationSet remains a candidate for Phase 2. + +### Alternative 3: Separate generic chart per team/BU + +Rejected. The complexity of maintaining multiple templates outweighs the benefit of per-team customization. A single chart with cluster-level values is sufficient. + +--- + +## References + +- [SANCTITY_RULES.md R2](../../docs/global/SANCTITY_RULES.md) — the incubator ↔ values ↔ generic-chart contract is sacred +- [ADR-I1: Why one generic chart per cluster](ADR-I1-generic-chart-per-cluster.md) — companion ADR on the chart design +- [values-file-schema.md](../../docs/platform/schemas/values-file-schema.md) — full field reference +- [incubator-values-schema.md](../../docs/platform/schemas/incubator-values-schema.md) — incubator Application schema diff --git a/wiki/entities/DevOps Infra ArgoCD Config.md b/wiki/entities/DevOps Infra ArgoCD Config.md new file mode 100644 index 0000000..761ddae --- /dev/null +++ b/wiki/entities/DevOps Infra ArgoCD Config.md @@ -0,0 +1,115 @@ +# DevOps Infra ArgoCD Config + +> Wiki entity page for the `devops-infra-argo-config` repository. + +--- + +## Identity + +| Field | Value | +| ----- | ----- | +| **Repository** | [Meesho/devops-infra-argo-config](https://github.com/Meesho/devops-infra-argo-config) | +| **Purpose** | Infrastructure tooling GitOps control plane — ArgoCD App-of-Applications pattern | +| **Layer** | Layer 1-T (Tool-Mediated) | +| **Owner** | DevOps / Platform team | +| **Related repos** | `devops-infra-helm-charts` (charts + values), `devops-argo-config` (service workloads), `terraform-google-modules` (cluster provisioning) | + +--- + +## What it does + +This repo is the **source of truth** for every ArgoCD `Application` and `AppProject` that manages **infrastructure tooling** across Meesho's Kubernetes fleet. A merge to `main` immediately deploys via ArgoCD auto-sync. + +Unlike `devops-argo-config` (which manages service/application workloads), this repo manages **cluster tooling**: ingress controllers (Contour), observability stacks (VictoriaMetrics, Grafana, Loki), policy engines (Kyverno), autoscalers (KEDA), secrets management (external-secrets), AI gateways, and more. + +--- + +## Architecture + +### App-of-Applications pattern + +``` +incubator//.yaml ← Parent Application (one per cluster) + │ + │ points at + ▼ +generic-argo-apps-chart/ ← Single Helm chart + │ + │ rendered with + ▼ +values//-values.yaml ← appSpec[] list + │ + │ produces + ▼ +One ArgoCD Application per appSpec entry ← Child Applications (tools) + │ + │ sources charts + values from + ▼ +devops-infra-helm-charts ← Sister repo (Helm charts + overrides) +``` + +### Key directories + +| Directory | Purpose | +| --------- | ------- | +| `incubator//` | Parent ArgoCD Application YAML per cluster | +| `values//` | Values files defining which tools deploy per cluster | +| `generic-argo-apps-chart/` | Helm chart that renders child Applications | +| `projects/` | ArgoCD AppProject definitions (`sre`, `sec`) | +| `external-name-service-*` | Cross-cluster DNS routing (MCS topology) | + +--- + +## Scale + +| Metric | Count | +| ------ | ----- | +| Clusters managed (values files) | ~19 | +| Production clusters | k8s-central, k8s-demand, k8s-supply, k8s-dataengg, k8s-datascience, k8s-dengspark, k8s-dscispark, k8s-dsgpu, k8s-farmiso, k8s-ml-platform (ase1 + ase1c variants) | +| Admin clusters | k8s-admin-prd, k8s-devops-admin, k8s-sec-admin | +| Tools per cluster | ~20-50 (varies by cluster role) | +| ArgoCD projects | `sre` (all namespaces/clusters), `sec` (security-scoped) | + +--- + +## Relationships + +### Depends on + +| System | How | +| ------ | --- | +| `devops-infra-helm-charts` | Every `appSpec[].chartDir` and `valuesDir` must exist here | +| ArgoCD (admin cluster) | Reads incubator Applications and syncs child Applications | +| GKE clusters | Target destinations for deployed tools | + +### Depended on by + +| System | How | +| ------ | --- | +| All infrastructure tools | This repo controls their deployment lifecycle | +| Platform team operations | Adding/removing/upgrading tools goes through this repo | + +### Sibling + +| Repo | Relationship | +| ---- | ------------ | +| `devops-argo-config` | Same pattern but for service workloads, not infra tooling | + +--- + +## Key constraints + +1. **Auto-sync:** Merge to `main` = immediate deploy. No staging gate. +2. **No CI:** Pre-commit hooks are the only client-side guard. +3. **Cross-repo dependency:** Chart and values must exist in `devops-infra-helm-charts` before `appSpec` can reference them. +4. **Naming is structural:** Cluster names, Application names, and file names are routing identifiers, not cosmetic labels. + +--- + +## Entry points + +| Audience | Start here | +| -------- | ---------- | +| Agents | [CLAUDE.md](../../CLAUDE.md) | +| New team members | [index.md](../../index.md) | +| PR reviewers | [docs/global/coding-guidelines/infra-argo.md](../../docs/global/coding-guidelines/infra-argo.md) |