Documents the complete migration process, safety measures, and verification steps for the Pocket ID Argo CD migration. Co-Authored-By: Paperclip <noreply@paperclip.ing>
5.7 KiB
5.7 KiB
Pocket ID Migration to Argo CD - Verification & Rollout
Status: ✅ Manifests committed to Git (commit 794cf51)
Date: 2026-07-12
Task: DEV-291
Pre-Migration State (Backed Up)
All existing manifests have been exported and saved to:
- Location:
/tmp/paperclip-run-dev-291-b33dbd3d-76c-1s9MK2/pocket-id-backup/ - Includes: deployment, service, PVC, ingress, secrets (with TLS certificate)
Current Running State
- Pod:
pocket-id-644b9969b8-4b5fq- Running (2 restarts, 16h age) - Service: ClusterIP on 10.97.209.99:1411
- PVC:
pocket-id-data- Bound topvc-d784e4fc-48e8-464a-8807-cee01ee70e66(5Gi) - Ingress: https://auth.basicstack.de (TLS via cert-manager)
- Secrets:
pocket-id-secrets(managed by SealedSecret),pocket-id-tls(managed by cert-manager)
Migration Changes
Files Added to Git (apps/pocket-id/)
- deployment.yaml - Cleaned manifest for pocket-id deployment
- service.yaml - ClusterIP service definition
- pvc.yaml - PVC with
Delete=falseannotation for safety - ingress.yaml - Traefik ingress with cert-manager TLS
- README.md - Documentation and safety notes
- MIGRATION.md - This document
Files Already in Git
- pocket-id-secrets-sealed.yaml - SealedSecret (existed before migration)
- ../app-pocket-id.yaml - Argo CD Application manifest (existed before)
Safety Measures Applied
-
✅ PVC Protection: Added
argocd.argoproj.io/sync-options: Delete=falseannotation- Prevents Argo CD from ever deleting the PVC
- Existing volume
pvc-d784e4fc-48e8-464a-8807-cee01ee70e66will be preserved
-
✅ Secret Management:
- Existing SealedSecret will continue to manage
pocket-id-secrets - TLS secret excluded from Git (managed by cert-manager)
- Existing SealedSecret will continue to manage
-
✅ Non-Destructive Sync:
- All manifests match current cluster state
- Argo CD will adopt existing resources without recreation
- No service interruption expected
-
✅ Backup Created:
- Full export of all resources saved
- Can be restored if needed
Rollout Steps
Step 1: Refresh Argo CD Application
# Option A: Wait for automatic refresh (every 3 minutes by default)
# Option B: Manual refresh via UI or CLI
kubectl patch application pocket-id -n argocd -p '{"metadata":{"annotations":{"argocd.argoproj.io/refresh":"hard"}}}' --type merge
Step 2: Review Diff in Argo CD UI
- Open Argo CD UI: https://argocd.basicstack.de (or your Argo CD URL)
- Navigate to
pocket-idapplication - Click "APP DIFF" to review changes
- Expected diff:
- New resources: deployment, service, ingress (should show as "in sync" if they match existing)
- PVC: should show as "synced" with existing resource
- No deletions should be shown
Step 3: Sync Application
# Via kubectl (if you want to trigger sync programmatically)
kubectl patch application pocket-id -n argocd -p '{"operation":{"sync":{"syncStrategy":{"hook":{}}}}}' --type merge
# OR via Argo CD UI:
# Click "SYNC" button, review the resources to be synced, then "SYNCHRONIZE"
Step 4: Verification Checklist
After sync completes, verify:
- Application status is "Healthy" and "Synced" in Argo CD UI
- Pod is running:
kubectl get pods -n pocket-id(should still be the same pod) - Service endpoints are correct:
kubectl get endpoints -n pocket-id - Ingress is working:
curl -I https://auth.basicstack.de - Web UI is accessible: Open https://auth.basicstack.de in browser
- Login flow works: Test OIDC login with existing client
- Admin access works: Verify you can access admin UI with existing credentials
- OIDC clients preserved: Check that all existing clients are still present
- No data loss: Verify user accounts and configurations are intact
Step 5: Verify GitOps Workflow
Test that Argo CD is properly managing the deployment:
# Make a test change in Git (e.g., add a label to deployment)
# Wait for Argo CD to detect the change (or refresh manually)
# Verify change is applied automatically or shown as "OutOfSync"
Rollback Plan
If issues occur during or after sync:
Option 1: Revert Git Commit
cd stack.basicstack.de
git revert 794cf51
git push
# Wait for Argo CD to sync the revert
Option 2: Manual Restore from Backup
# Restore from exported manifests in backup directory
kubectl apply -f /tmp/paperclip-run-dev-291-b33dbd3d-76c-1s9MK2/pocket-id-backup/
Option 3: Disable Argo CD Management Temporarily
# Remove Application from Argo CD (does not delete resources)
kubectl delete application pocket-id -n argocd
# Manually manage resources with kubectl until issue is resolved
Success Criteria
Migration is considered successful when:
- ✅ All resources are "Healthy" and "Synced" in Argo CD
- ✅ https://auth.basicstack.de is accessible and functioning
- ✅ All existing OIDC clients work without reconfiguration
- ✅ User login and admin access work as before
- ✅ No data loss in PVC
- ✅ Subsequent Git commits to apps/pocket-id/ are automatically detected by Argo CD
- ✅ No service interruptions occurred during migration
Important Notes
- DO NOT manually modify resources in the cluster after Argo CD takes over
- All changes should go through Git commits to apps/pocket-id/
- The PVC is protected by
Delete=falsebut still be careful with any PVC-related changes - TLS certificate is managed by cert-manager - do not add it to Git
- The ENCRYPTION_KEY must never change - it's needed to decrypt existing data
Contact
If issues arise during rollout:
- Check Argo CD UI for detailed sync status and error messages
- Review pod logs:
kubectl logs -n pocket-id -l app=pocket-id - Escalate to CTO agent if automated rollback is needed