K8s Migration Phase 2: Grafana to Kubernetes #30

Merged
eblume merged 8 commits from feature/k8s-phase2-grafana into main 2026-01-19 14:40:25 -08:00
Owner

Summary

  • Migrate Grafana from Homebrew/Ansible to Kubernetes deployment
  • Switch CloudNativePG to use forge-mirrored Helm chart (HTTPS, no auth needed)
  • Add Grafana Helm chart deployment via ArgoCD with multi-source pattern
  • Add Grafana config (Tailscale Ingress, 9 dashboard ConfigMaps)
  • Update Loki to bind 0.0.0.0 for k8s pod access via host.containers.internal

Key Changes

  • argocd/apps/grafana.yaml - Grafana Helm chart Application
  • argocd/apps/grafana-config.yaml - Ingress + dashboard ConfigMaps
  • argocd/apps/cloudnative-pg.yaml - Now uses forge mirror instead of external Helm repo
  • ansible/roles/loki/templates/loki-config.yaml.j2 - Bind 0.0.0.0

Deployment and Testing

  • Deploy Loki config change: mise run provision-indri -- --tags loki
  • Create namespace: ki create namespace monitoring
  • Create secret: op inject -i argocd/manifests/grafana-config/secret-admin.yaml.tpl | ki apply -f -
  • Sync ArgoCD apps (grafana, grafana-config)
  • Verify Grafana works at https://grafana.tail8d86e.ts.net
  • Remove svc:grafana from ansible tailscale_serve
  • Stop brew grafana: ssh indri 'brew services stop grafana'
  • Delete ansible grafana role

🤖 Generated with Claude Code

## Summary - Migrate Grafana from Homebrew/Ansible to Kubernetes deployment - Switch CloudNativePG to use forge-mirrored Helm chart (HTTPS, no auth needed) - Add Grafana Helm chart deployment via ArgoCD with multi-source pattern - Add Grafana config (Tailscale Ingress, 9 dashboard ConfigMaps) - Update Loki to bind 0.0.0.0 for k8s pod access via `host.containers.internal` ## Key Changes - `argocd/apps/grafana.yaml` - Grafana Helm chart Application - `argocd/apps/grafana-config.yaml` - Ingress + dashboard ConfigMaps - `argocd/apps/cloudnative-pg.yaml` - Now uses forge mirror instead of external Helm repo - `ansible/roles/loki/templates/loki-config.yaml.j2` - Bind 0.0.0.0 ## Deployment and Testing - [x] Deploy Loki config change: `mise run provision-indri -- --tags loki` - [x] Create namespace: `ki create namespace monitoring` - [x] Create secret: `op inject -i argocd/manifests/grafana-config/secret-admin.yaml.tpl | ki apply -f -` - [x] Sync ArgoCD apps (grafana, grafana-config) - [x] Verify Grafana works at https://grafana.tail8d86e.ts.net - [x] Remove svc:grafana from ansible tailscale_serve - [x] Stop brew grafana: `ssh indri 'brew services stop grafana'` - [x] Delete ansible grafana role 🤖 Generated with [Claude Code](https://claude.com/claude-code)
- Migrate Grafana from Homebrew/Ansible to Kubernetes deployment
- Switch CloudNativePG to use forge-mirrored Helm chart (HTTPS)
- Add Grafana Helm chart deployment via ArgoCD
- Add Grafana config (Tailscale Ingress, dashboard ConfigMaps)
- Update Loki to bind 0.0.0.0 for k8s pod access
- Update P2 plan document with detailed implementation steps

Helm chart mirrors created in forge:
- cloudnative-pg-charts (from github.com/cloudnative-pg/charts)
- grafana-helm-charts (from github.com/grafana/helm-charts)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Temporarily point ArgoCD apps at feature/k8s-phase2-grafana branch
for testing. Will update back to 'main' before merging PR.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update app-of-apps and all ArgoCD applications to point at
this feature branch for testing. Will change back to main
before merging.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update cloudnative-pg and grafana apps to use SSH URLs
- Convert repo-forge secret to repo-creds-forge credential template
- The credential template matches all repos under eblume/ using URL prefix
- SSH key is now added to Forgejo user (not as deploy key) for all-repo access

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add argocd-ssh-known-hosts-cm.yaml patch with forge (indri:2200) host key
- Include upstream ArgoCD default host keys for github, gitlab, bitbucket, etc.
- Required for ArgoCD to connect to forge via SSH

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Grafana is now running in Kubernetes with its own Tailscale Ingress.
Removing the ansible-managed Tailscale Serve entry frees up the
'grafana' hostname for the k8s ingress to claim.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Grafana is now running in Kubernetes with:
- Helm chart from forge-mirrored grafana-helm-charts repo
- Tailscale Ingress at grafana.tail8d86e.ts.net
- SQLite persistence via PVC
- Dashboards provisioned via ConfigMaps

Removed:
- ansible/roles/grafana/ directory (dashboards migrated to k8s ConfigMaps)
- grafana role from indri.yml playbook

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Removed TODOs and updated targetRevision from feature/k8s-phase2-grafana
to main for all ArgoCD Applications in preparation for PR merge.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
eblume merged commit 7e6742ad24 into main 2026-01-19 14:40:25 -08:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
eblume/blumeops!30
No description provided.