Phase 07: GitOps Foundation - 2 plan(s) in 2 wave(s) - Wave 1: 07-01 (register application) - Wave 2: 07-02 (verify gitops behavior) - Ready for execution Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
7.6 KiB
phase, plan, type, wave, depends_on, files_modified, autonomous, must_haves
| phase | plan | type | wave | depends_on | files_modified | autonomous | must_haves | |||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 07-gitops-foundation | 01 | execute | 1 |
|
true |
|
Purpose: Enable GitOps workflow where ArgoCD manages TaskPlanner deployment from Git source of truth. Output: TaskPlanner Application registered in ArgoCD showing "Synced" status.
<execution_context> @/home/tho/.claude/get-shit-done/workflows/execute-plan.md @/home/tho/.claude/get-shit-done/templates/summary.md </execution_context>
@.planning/PROJECT.md @.planning/ROADMAP.md @.planning/STATE.md @.planning/phases/07-gitops-foundation/07-CONTEXT.md @argocd/application.yaml @helm/taskplaner/values.yaml Task 1: Create ArgoCD repository secret for TaskPlanner argocd/repo-secret.yaml Create a Kubernetes Secret for ArgoCD to access the TaskPlanner Gitea repository.The secret must:
- Be in namespace
argocd - Have label
argocd.argoproj.io/secret-type: repository - Use internal cluster URL:
http://gitea-http.gitea.svc.cluster.local:3000/tho/taskplaner.git - Use same credentials as existing gitea-repo secret (username: admin)
Create the file argocd/repo-secret.yaml:
apiVersion: v1
kind: Secret
metadata:
name: taskplaner-repo
namespace: argocd
labels:
argocd.argoproj.io/secret-type: repository
stringData:
type: git
url: http://gitea-http.gitea.svc.cluster.local:3000/tho/taskplaner.git
username: admin
password: <GET_FROM_EXISTING_SECRET>
Get the password from existing gitea-repo secret:
kubectl get secret gitea-repo -n argocd -o jsonpath='{.data.password}' | base64 -d
Apply the secret:
kubectl apply -f argocd/repo-secret.yaml
Note: Do NOT commit the password to Git. The file should use a placeholder or be gitignored. Actually, create the secret directly with kubectl instead of a file with real credentials:
PASSWORD=$(kubectl get secret gitea-repo -n argocd -o jsonpath='{.data.password}' | base64 -d)
kubectl create secret generic taskplaner-repo \
--namespace argocd \
--from-literal=type=git \
--from-literal=url=http://gitea-http.gitea.svc.cluster.local:3000/tho/taskplaner.git \
--from-literal=username=admin \
--from-literal=password="$PASSWORD" \
--dry-run=client -o yaml | kubectl label -f - argocd.argoproj.io/secret-type=repository --local -o yaml | kubectl apply -f -
Or simpler approach - just apply with label:
PASSWORD=$(kubectl get secret gitea-repo -n argocd -o jsonpath='{.data.password}' | base64 -d)
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Secret
metadata:
name: taskplaner-repo
namespace: argocd
labels:
argocd.argoproj.io/secret-type: repository
stringData:
type: git
url: http://gitea-http.gitea.svc.cluster.local:3000/tho/taskplaner.git
username: admin
password: "$PASSWORD"
EOF
Changes needed in application.yaml:
- Change
repoURLfromhttps://git.kube2.tricnet.de/tho/taskplaner.gittohttp://gitea-http.gitea.svc.cluster.local:3000/tho/taskplaner.git - Remove the
---separated Secret at the bottom (gitea-registry-secret with placeholder) - The helm values already reference
gitea-registry-secretfor imagePullSecrets
The registry secret needs to exist separately. Check if it exists:
kubectl get secret gitea-registry-secret -n default
If it doesn't exist, create it (the helm chart expects it). Get Gitea registry credentials and create:
# Create the registry secret for image pulls
kubectl create secret docker-registry gitea-registry-secret \
--namespace default \
--docker-server=git.kube2.tricnet.de \
--docker-username=admin \
--docker-password="$(kubectl get secret gitea-repo -n argocd -o jsonpath='{.data.password}' | base64 -d)"
Then apply the Application:
kubectl apply -f argocd/application.yaml
# Wait for sync (up to 5 minutes)
kubectl wait --for=jsonpath='{.status.sync.status}'=Synced application/taskplaner -n argocd --timeout=300s
# Check health status
kubectl get application taskplaner -n argocd -o jsonpath='{.status.health.status}'
# Get full status
kubectl get application taskplaner -n argocd -o wide
If sync fails, check:
- ArgoCD logs:
kubectl logs -n argocd -l app.kubernetes.io/name=argocd-repo-server - Application status:
kubectl describe application taskplaner -n argocd - Repo connectivity: ArgoCD UI Settings -> Repositories
Common issues:
- Repo credentials incorrect: Check taskplaner-repo secret
- Helm chart errors: Check argocd-repo-server logs
- Image pull errors: Check gitea-registry-secret
kubectl get application taskplaner -n argocd -o jsonpath='{.status.sync.status}'
kubectl get application taskplaner -n argocd -o jsonpath='{.status.health.status}'
Should output: Synced and Healthy
Application shows "Synced" status and "Healthy" health in ArgoCD.
<success_criteria>
- Repository secret created with correct labels
- Application manifest applied successfully
- ArgoCD shows TaskPlanner as Synced
- ArgoCD shows TaskPlanner as Healthy
- Requirements GITOPS-01 (already done) and GITOPS-02 satisfied </success_criteria>