| Age | Commit message (Collapse) | Author |
|
Updated 17 application manifests to use internal git-server:
- Monitoring: grafana-ingress, prometheus, pushgateway
- Services: anki-sync-server, audiobookshelf, filebrowser, immich, keybr,
kobo-sync-server, miniflux, opodsync, radicale, syncthing,
tracing-demo, wallabag, webdav
- Infra: registry
All applications now fetch from:
ssh://git@git-server.cicd.svc.cluster.local/repos/repos/conf.git
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
|
Test migration of first application from Codeberg to internal git-server.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
|
Debug logging was useful for troubleshooting but not needed in production.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
|
SSH requires user accounts to be unlocked (not have ! in shadow).
Use 'passwd -u' to unlock the git user account.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
|
SELinux prevents root from accessing 700 directories in some contexts.
Use 755 for directory and 644 for authorized_keys to allow access.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
|
The emptyDir needs to be writable for SSH to access authorized_keys.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
|
SSH requires user shells to be listed in /etc/shells.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
|
Remove extra .ssh directory creation in initContainer.
The emptyDir mount point itself is /home/git/.ssh.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
|
Copy authorized_keys from secret to emptyDir with git user ownership.
This allows SSH to read the keys for authentication.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
|
SSH privilege separation requires setgroups() and setuid() syscalls.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
|
- Enable SYS_CHROOT capability for git-server SSH to work in containers
- Configure ArgoCD repo-server to use SSH key for git-server access
- Set DEBUG3 logging in sshd for troubleshooting (temp)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
|
Nginx workers (running as user nginx) couldn't connect to fcgiwrap.sock
created by root. Add chmod 666 to make the socket world-accessible.
|
|
The cgit nginx default.conf listens on port 80, not 8080.
Update:
- Container port from 8080 to 80
- Service targetPort from 8080 to 80
|
|
Nginx workers need these capabilities to drop privileges.
Add SETGID and SETUID to allow nginx workers to start properly.
|
|
The fsGroup: 1000 was causing nginx workers to fail with setgid errors
even after removing 'user nginx;' directive. Since both containers run
as root, fsGroup is not needed for repo access.
|
|
When running as root with fsGroup, nginx workers fail trying to setgid.
Remove the 'user nginx;' directive from nginx.conf at startup using sed.
This allows nginx to run workers as root without permission errors.
|
|
Remove -u nginx -g nginx from spawn-fcgi command to run as root.
This avoids nginx worker process setgid permission errors.
|
|
The cgit image entrypoint always tries to chown /var/cache/cgit which
fails with permission errors. Override the entrypoint to directly:
1. Spawn fcgiwrap as nginx user
2. Start nginx in foreground
This skips the problematic chown/chmod and template substitution.
|
|
Instead of fighting permission issues with the cgit cache directory,
disable caching entirely by:
- Setting cache-size=0 in cgitrc
- Removing cgit-cache emptyDir volume and mounts
- Simplifying initContainer (only SSH keys setup needed)
cgit will work without caching, just slightly slower for large repos.
|
|
cgit image needs root to:
- Bind sockets with spawn-fcgi
- Run nginx master process
- Write to /var/run/nginx.pid
The initContainer already sets up cache dir with proper permissions.
|
|
The cgit entrypoint tries to write to /etc/cgitrc which is mounted
read-only from our ConfigMap. Set USE_CUSTOM_CONFIG=true to use our
custom cgitrc directly without template substitution.
|
|
The cgit image runs as nginx user (UID 101), not www-data (UID 33).
- Update initContainer to chown cache to 101:1000
- Update cgit securityContext to runAsUser: 101
|
|
Follow webdav/filebrowser pattern for proper permission handling:
- Add fsGroup: 1000 at pod level for git repo access
- Add initContainer to chown emptyDir volumes
- Run git-server as root (required for sshd)
- Run cgit as user 33 (www-data)
- Restore cgit-cache emptyDir volume with proper ownership
|
|
- Mount emptyDir for /etc/ssh to allow SSH host key generation
- Mount emptyDir for /var/cache/cgit to allow cache initialization
- Run both containers as root with proper capabilities
- Copy sshd_config at runtime from /tmp to /etc/ssh
- Add imagePullPolicy: Always to force image refresh
|
|
- Generate SSH host keys at runtime via entrypoint script
- Remove fsGroup security context to fix emptyDir permissions
- Allow cgit to initialize cache directory as root
|
|
- Remove unsupported UsePAM option from sshd_config
- Run cgit as root to allow cache directory initialization
- Add CHOWN and DAC_OVERRIDE capabilities for cgit
|
|
- Use registry.lan.buetow.org for deployment (internal DNS)
- Add emptyDir volume for cgit cache directory
- Add README.md with deployment and secret management instructions
This fixes image pull issues and cgit permission errors.
|
|
Deploy a self-hosted git repository solution to replace external Codeberg dependency.
Components:
- SSH git server: Alpine-based container with OpenSSH and git
- cgit web UI: Browse repositories at cgit.f3s.buetow.org
- Single pod design: git-server + cgit containers sharing storage
Infrastructure:
- Docker image in git-server/docker-image/ with Justfile build automation
- Helm chart in git-server/helm-chart/ for Kubernetes deployment
- 5Gi ReadWriteMany PVC for NFS-backed repository storage
- ClusterIP service for ArgoCD internal access
- NodePort 30022 for external SSH push access
- Traefik ingress for cgit web UI
ArgoCD Application manifest deployed to cicd namespace.
Note: SSH keys must be created as Kubernetes secrets manually, not in git.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Amp-Thread-ID: https://ampcode.com/threads/T-019b9eec-b607-7271-9b75-f05255a60742
Co-authored-by: Amp <amp@ampcode.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
K3s embeds kube-proxy and kube-scheduler functionality into the main
k3s server process, unlike standard Kubernetes where they run as
separate components.
This change disables monitoring for these components to prevent
false-positive critical alerts:
- KubeProxyDown
- KubeSchedulerDown
These alerts were firing because kube-prometheus-stack expects
standard Kubernetes architecture with separate kube-proxy and
kube-scheduler pods/processes.
Cluster info:
- Running k3s v1.32.6+k3s1
- 3 control-plane nodes (r0, r1, r2)
- Components embedded in k3s binary
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
|
Added enhanced port-forward targets with helpful UI information:
- 'just alerts' - Quick access to Prometheus alerts view
- 'just alertmanager' - Quick access to Alertmanager UI
- Enhanced output showing all relevant URLs
All port-forward commands now display:
- Access URLs with direct links to specific views
- Clear instructions for stopping (Ctrl+C)
Usage:
cd prometheus/
just alerts # Opens Prometheus alerts (port 9090)
just alertmanager # Opens Alertmanager (port 9093)
just port-forward-prometheus [port]
just port-forward-grafana [port]
After running, access:
- Prometheus Alerts: http://localhost:9090/alerts
- Alertmanager: http://localhost:9093
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
|
Added Alertmanager configuration to:
- Route ArgoCD application alerts to dedicated 'argocd-alerts' receiver
- Group ArgoCD alerts by alertname, name (app name), and severity
- Faster alert grouping for ArgoCD (10s wait vs 30s default)
- Repeat ArgoCD alerts every 6 hours
- Suppress Watchdog test alerts
- Configure inhibit rules to prevent alert spam
Alerts are visible in:
- Prometheus UI: http://localhost:9090/alerts
- Alertmanager UI: http://localhost:9093
- Grafana dashboard: ArgoCD Applications - Health & Sync Status
This ensures critical application issues are properly routed and visible
in the monitoring UI for immediate action.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
|
|
|
Created comprehensive Grafana dashboard showing:
- Total applications count
- Healthy vs unhealthy applications
- Out-of-sync status
- Detailed table with all applications and their status
- Health status timeline graph
- Sync operations rate
- Active ArgoCD-related alerts
Dashboard will auto-load in Grafana via ConfigMap with label grafana_dashboard='1'
Access at: https://grafana.f3s.buetow.org → Dashboards → ArgoCD Applications
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
|
This implements monitoring for ALL services deployed via ArgoCD by leveraging ArgoCD's native Prometheus metrics instead of scraping individual services.
Changes:
- Created ArgoCD application alerts for health and sync status monitoring
- Alert when applications are unhealthy (Degraded, Missing, Unknown, Suspended)
- Alert when applications are out of sync for >10 minutes
- Alert when sync operations are failing repeatedly
- Alert when applications are stuck in Progressing state
- Added recording rules for unhealthy/out-of-sync application counts
- Added radicale health monitoring via scrape config
- Added radicale to additional-scrape-configs for direct health checks
- Monitors radicale web interface availability
Benefits:
- Single monitoring solution for all 21 ArgoCD-managed applications
- Automatic monitoring for new applications added to ArgoCD
- Early detection of configuration drift and deployment issues
- Centralized alerting with actionable remediation steps
Monitored applications include: radicale, registry, alloy, grafana, loki,
prometheus, tempo, anki-sync-server, audiobookshelf, filebrowser, immich,
keybr, kobo-sync-server, miniflux, opodsync, and more.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
|
- Create subdirectories: monitoring/, services/, infra/, test/
- Move 6 monitoring apps to monitoring/
- Move 13 service apps to services/
- Move 1 infra app to infra/
- Move 1 test app to test/
- Add README.md documenting the structure and usage
This organization:
- Makes it easier to understand which apps belong to which namespace
- Allows applying apps by namespace: kubectl apply -f argocd-apps/monitoring/
- Supports namespace-scoped app-of-apps patterns
- Provides better clarity when browsing the repository
All 21 applications remain functional and validated with kubectl --dry-run.
|
|
- Created ArgoCD Application for grafana-ingress
- Simple custom Helm chart exposing Grafana via Traefik
- Updated Justfile with ArgoCD commands
- Status: Synced and Healthy
- Ingress working at https://grafana.f3s.buetow.org
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|